Thomas Viehmann wrote: > Hi, > > Steve M. Robbins wrote: >> The buildd log pages, e.g. [1], used to be sorted by package version >> (or maybe build date). However that is no longer the case. > > It seems that build.php relies on the results of opendir/readdir to be > in order and that assumption not being valid anymore. > >> Can this be fixed? The current situation is less than useful since >> the latest build is buried in other output. > > If someone could attest to > http://buildd.debian.org/~tviehmann/cmp_versions_php.txt > (translated from the perl that udd uses) being wrong in only harmless > ways (except showing that C->Perl->PHP with the last step being done by > someone disliking PHP is not a good idea), I could ask Ryan to put > http://buildd.debian.org/~tviehmann/build.php > in the appropriate location.
Nice, yet another rewrite of dpkg's code, but now in PHP[1]. So, let's test it with a script I wrote during DC8 (as suggested by Lucas): 8<------------------------------------------------------------------------->8 buildd.php failed test 'foo- foo 0'/tests/foo with '1' buildd.php failed test 'foo fo 1'/tests/foo with '-1' buildd.php failed test 'foo- foo+ -1'/tests/foo with '1' buildd.php failed test 'foo~1 foo -1'/tests/foo with '1' buildd.php failed test 'foo.bar foo1bar 1'/tests/foo with '-1' buildd.php failed test 'foo.bar foo0bar 1'/tests/foo with '-1' buildd.php failed test '1foo:bar 1:bar x This is a syntax violation so the result is "undetermined" but shouldn't be any of these: -1 0 1'/tests/foo with '-1' buildd.php failed test '1foo-1 foo-1 -1'/tests/foo with '1' buildd.php failed test '0.8.0a-1 0.8.0-2 1 gnunet'/tests/versions.lenny-sid with '-1' buildd.php failed test '0.8.0a-1 0.8.0-1 1 gnunet-gtk'/tests/versions.lenny-sid with '-1' buildd.php reached the 10 tolerated failures The remaining tests will be skipped 8<------------------------------------------------------------------------->8 With regard to the '1foo:bar 1:bar' test: this test is usually passed when the versions comparing function returns null (in PHP terms), making the 'case' script exit with a non-zero status. In your implementation I see parseversion returning null when it encounters an invalid version, but cmp_version doesn't care about it. The tests are in a "version1 version2 expected_result comments"-format. I will later test udd's perl implementation just to make sure it is ok (although I believe it's PET's which is not perfect either). [1] I promised Christoph Berg that I am going to write a PHP extension, actually an interface, to libapt's functions; but I haven't been lucky enough to find the docs (libapt-pkg-doc isn't what I expected). If somebody can point me to the right documents it would be great. > > Kind regards > > T. Cheers, Raphael Geissert -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]