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

Re: debconf reconfiguration from postinst of another package



]] Jonas Smedegaard 

> How to reconfigure one package from another?

I don't think this is supported today at all, and any success at doing
so would be a bug.

If you have a package that uses debconf as the UI to ask questions that
go into a configuration file, that's fine.  If you then later change the
values in the debconf database and run dpkg-reconfigure, the config
script should grab the current settings from the configuration file on
disk and seed the debconf db with those, overwriting your changes.  This
is the whole «debconf is not a registry» thing.

What you could do is provide your own debconf database with a higher
priority, with those settings then pre-seeded (you would then accept and
discard writes to «locked» keys).  This makes the problem slightly
easier, since you're then just left with «how do you trigger a
dpkg-reconfigure».  Sadly, I don't think dpkg provides the hooks you
need to do that today.  I think it could be useful to have it, so you
could do «dpkg --needs-reconfigure A B C» and those would then be put in
a state where they'd be reconfigured at the next opportunity.  Care
would of course have to be taken to avoid loops.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are


Reply to: