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

Bug#616060: /usr/sbin/dpkg-reconfigure: should use dpkg-query --control-path to find path for templates/config files

Package: cdebconf
Version: 0.154
Severity: important
File: /usr/sbin/dpkg-reconfigure
User: debian-dpkg@lists.debian.org
Usertags: multiarch

dpkg's internal database will evolve with multiarch and you should not
have to hardcode this knowledge in your program. Instead of accessing
/var/lib/dpkg/info/foo.{templates,config} you should use
dpkg-query --control-path to find out the path to those files.

$ dpkg-query --control-path debconf
$ dpkg-query --control-path debconf templates
$ dpkg-query --control-path debconf config

If the file doesn't exist, it will return nothing.

You must also be aware that users might ask "dpkg-reconfigure foo:i386" to
explain what version of the package they are referring to.

$ dpkg-query --control-path debconf:i386 templates


Reply to: