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

Parsing of dpkg status file considered harmful



Hi,

I've been meaning to send this for some time, but latest docbook-xml
upload finally triggered it.

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

which is also cleaner. If there happens to be any reentrancy problem
in dpkg-query, that will be considered a bug and fixed, so this should
be considered the standard api for maintainer scripts.

I'll be filing bug reports on lintian and linda so that they give
errors on maintainer scripts poking at the file...

thanks,
guillem



Reply to: