Re: Need perl code to compare Debian packages version numbers...
On Sun 01 Aug 1999, Julian Gilbey wrote:
> You can extract it from the code in /usr/share/devscripts/versort in
> the devscripts package. It's certainly non-trivial, and unless you
> have a good reason to do it in Perl directly, dpkg --compare-versions
> would be much easier.
Well, pulling it out of that script is also quite easy :-)
But seriously: dpkg --compare-versions is seriously slow if you're
comparing thousands of packages. I hacked some perl code to do the
comparison when writing my script to compare the i386 tree to the
alpha tree (to see what's out of date), and I agree that it is
non-trivial. I wish /usr/share/devscripts/versort had been around when
I wrote my script :-)
Better, faster, | home: email@example.com http://www.wurtel.demon.nl/
cheaper: | debian: firstname.lastname@example.org isdn4linux: email@example.com
choose any two. | work: firstname.lastname@example.org Murphy Software, Enschede, NL