On 07/25/2013 05:38 PM, Colin Walters wrote:
On Thu, 2013-07-25 at 14:42 +0200, Miroslav Suchý wrote:

So I put in rpmconf this code (little bit simplified here):
          if [ -x /usr/share/rpmconf/$PACKAGE ]; then
                  /usr/share/rpmconf/$PACKAGE
          fi

Have you looked at Debconf?  In a past life I wrote the Debconf scripts
for Postfix.

The crazy thing about Debconf is that it asks you questions while the
package mangler is in the middle of open heart surgery on your root
filesystem (partly because Debian wants daemons to start immediately
after install);

debconf can still do this, but policy is heavily tilted against that, so it's somewhat rare to see debconf questions during actual package installation these days.

However, during package updates, dpkg does prompt for configuration file changes, using a dialog which is pretty similar to what rpmconf shows. This happens in the middle of an update, and requires interaction. I believe that is possible to run dpkg in an rpm-like mode, where all the new configuration files are saved to .dpkg-new files.

debconf does not help with that because it is not intended as a registry. In most cases, the settings in debconf cannot be used to synthesize a new configuration file based on a new configuration file template in the package. debconf scripts must parse the configuration files and use the current settings found there.

--
Florian Weimer / Red Hat Product Security Team
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Reply via email to