debconf-set-selections + dpkg-reconfigure: why don't my settings stick?
I would like to configure some packages "the Debian way", but
non-interactively,
I used debconf-set-selections to set the settings I wanted.
Then I used debconf-get-selections to verify that the setting had
been correctly registered.
Finally I ran dpkg-reconfigure in non-interactive mode on the packages
expecting that the just-set settings would be applied, but in all
cases I get the previous setting being applied, i.e. as if I had not
run debconf-set-selections at all.
Am I missing some step here?
Here's an example:
nidi# echo -e "tzdata tzdata/Areas select Europe\ntzdata tzdata/Zones/Europe select London" | debconf-set-selections
nidi# debconf-get-selections | grep tzdata
tzdata tzdata/Zones/Australia select
tzdata tzdata/Zones/Asia select
tzdata tzdata/Zones/Etc select UTC
tzdata tzdata/Zones/SystemV select
tzdata tzdata/Zones/Africa select
tzdata tzdata/Zones/America select
tzdata tzdata/Zones/Arctic select
tzdata tzdata/Zones/Pacific select
tzdata tzdata/Areas select Europe
tzdata tzdata/Zones/Antarctica select
tzdata tzdata/Zones/Atlantic select
tzdata tzdata/Zones/Europe select London
tzdata tzdata/Zones/Indian select
nidi#
It now looks like the setting I want, but when I reconfigure:
nidi# dpkg-reconfigure -f noninteractive tzdata
Current default timezone: 'Etc/UTC'
Local time is now: Fri Oct 5 22:31:17 UTC 2007.
Universal Time is now: Fri Oct 5 22:31:17 UTC 2007.
nidi#
I poked around in the postinstall script of the packages I tried
(tzdata and locales) and I think that the script puts the actual
setting in effect (e.g. as defined by /etc/timezone or /etc/locale.gen
depending on the package) at a *higher* priority than the value in
the debconf database.
I can understand this: if someone does things in the traditional
edit-the-config-files way, then that setting is not reset by
using dpkg-reconfigure etc.
But nevertheless, it should be possible to have dpkg-reconfigure
apply the setting I've seeded its db with? Is there nothing like
dpkg-reconfigure --settings-in-debconf-db-get-higher-priority-than-values-found-in-the-field
?
Any advice appreciated!
Alexis
Reply to: