Re: Multiple 'dpkg --compare-versions' in one process
Daniel Macks writes ("Multiple 'dpkg --compare-versions' in one process"):
> I've got a script that needs to do several thousand comparisons of
> debian version-strings. Is there way for 'dpkg --compare-versions' (or
> a work-alike) to be spawned for an interactive session or a daemon,
> and handle multiple checks via pipe or socket communication?
If it's really only thousands then just spawning dpkg each time should
be fine. I just did a test of 2896 invocations of dpkg
--compare-versions and it took 7.6s of real time on my 2GHz Athlon.
If it's still too slow then you should complain to the glibc
maintainers; `strace dpkg --compare-versions a lt b' shows a lot of
pratting about which could probably be got rid of. Subprocess
execution is supposed to be blindingly fast.