Hi Vincent, Quoting Vincent Danjean (2014-04-18 14:41:18) > On 18/04/2014 12:43, Jonas Smedegaard wrote: >> How to reconfigure debconf from postinst of another package? > > My opinion is that this is not allowed (but I did not checked > explicitly in Policy, so I may be wrong). > Calling reconfigure is a matter of changing the configuration of > another package. If I recall correctly, it is not allowed for a > package to modify the configuration of another package unless the > second package provides explicit features (dir.d, hooks, ...)
That detail of Policy (ยง 10.7.4) is indeed essential to my question. I believe however that debconf is exactly such "extra feature". > Moreover, debconf is not a registry. So, even if their is something > in debconf, it does not mean that the admin did not modify the real > configuration file. Yes, this detail of debconf is the very reason I ask for help. It seems to me that debconf was intended to cover both initial bootstrapping and later reconfiguration, and cover both interactive and automated use. The dpkg-reconfigure high-level tool shipped with debconf seems only intended for interactive use: I can find no way in the use of that tool to distinguish between cached answers that should be shadowed by current package state and new answers to override package state. > Note that, if, as an admin, I explicitly choose an option in debconf > and then, latter, another package overwrite my choice (or even > reprompt me with another choice by default), it won't please me at > all. Right, that's the most common way to look at it. The opposite view is systems that has *no* administrator - where you want Debian packaging to automatically handle package upgrades without ever asking about changes to conffiles - yet you still want some configuration to be in a certain way. Such configuration is possible today, for packages that use debconf. It is possible at initial install. I dare say it ought to be possible also to reconfigure a running system. > So, perhaps, you should look at and evaluate the other propositions > made by other people... I want to first make sure if debconf is usable to reconfigure one package from another package. If not, I want to make sure that is not an oversight that can be fixed. Only if debconf really is not and will not become a mechanism usable for automated reconfiguration will I give up on promoting debconf. ...and possibly I will then also give up on the whole concept of Debian Pure Blends as well. :-( >> NB! above is again just an *example* meant to illustrate need for >> programmatically changing debconf from another package. I have no >> interest in "solutions" that bypass debconf (unless you seriously >> mean to say that debconf is unusable for automated reconfiguration). > > I think so. My opinion is based on policy that says that a package > must not mess with the configuration files of other packages. If > configuration must be shared with debconf, then use such debconf > feature (as xdm, gdm, kdm, ... did for choose the default dm : they do > not call each other configure script when the default dm is changed) I find it worrisome if only mutually coordinated packages can configure each other: I fear that that scales badly. - Jonas -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private
signature.asc
Description: signature