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

Re: Parsing of dpkg status file considered harmful



On Thu, 2007-05-31 at 15:22:59 +0200, Daniel Leidert wrote:
> Am Mittwoch, den 30.05.2007, 07:53 +0300 schrieb Guillem Jover:
> > I've been meaning to send this for some time, but latest docbook-xml
> > upload finally triggered it.
> 
> Well, why didn't you send me a CC of this mail? I just stumbled over
> this by fluke.

I should have anonymized the mail, and not make any package reference,
it is a general warning for something that's wrong and that I've been
noticing lately on an increasing number of packages.

> > Please stop parsing dpkg status file from maintainer scripts. No
> > package should assume its location or format (except for now for
> > package managment frontends and the like, until there's a proper
> > library they can use). This might make it really difficult in case
> > we have to change the db layout or whatever in the future.
> > 
> > If you need to retrieve the conffile info, which is why most of those
> > packages are poking at the status file, please use something like:
> > 
> >   $ dpkg-query -W -f='${Conffiles}' docbook-xml
> 
> http://svn.debian.org/wsvn/debian-xml-sgml/packages/docbook-xml/trunk/debian/docbook-xml.preinst?op=file&rev=817&sc=1
> Should solve the issue.

Thanks!

regards,
guillem



Reply to: