[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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 :-)

Paul Slootman
-- 
Better, faster, | home:   paul@wurtel.demon.nl http://www.wurtel.demon.nl/
cheaper:        | debian: paul@debian.org   isdn4linux: paul@isdn4linux.de
choose any two. | work:   paul@murphy.nl    Murphy Software, Enschede,  NL


Reply to: