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

[Guillem Jover] Parsing of dpkg status file considered harmful



This affects us...

--- Begin Message ---
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


-- 
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



--- End Message ---

-- 
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)

Reply to: