Hi, On Thu, 03 Mar 2011, Carsten Hey wrote: > * Raphael Hertzog [2011-03-02 15:06 +0100]: > > In general parsing the status file should not be done, instead you > > should use dpkg-query. > > Is there any reason for this, except that the format of the status files > will evolve?
dpkg-query will automatically respect DPKG_ADMINDIR if it's set (and it's set in maintainer scripts). (this is a new feature in the upcoming version) And the status file is not a public interface. It's a file used by dpkg. If tomorrow dpkg supports an optional SQLite internal database through a plugin, dpkg-query will continue to work but your access to the status file will not. (This is unlikely to happen any time soon, but you get the idea) > > You should use "dpkg-query --control-path <package> <something>" to > > Jftr, there is a lot potential for performance improvements in > dpkg-query, some queries can be done way faster even in gawk. JFTR, there are also 300+ bugs in the BTS and we are two active developers on dpkg. dpkg-query is rarely used in performance sensitive situation, it's not really my priority to improve it. But if you want to help, you're welcome. Cheers, -- Raphaël Hertzog ◈ Debian Developer Follow my Debian News ▶ http://RaphaelHertzog.com (English) ▶ http://RaphaelHertzog.fr (Français) -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110303134551.gd11...@rivendell.home.ouaza.com