debconf problem: only one owner ???
I'm running against a wall with debconf.
I'm trying to construct a simple example where one templates has two
owners. Whatever I try, only the first package installed is registered
as owner.
I've attached a tarball with the sources for a minimal package
(in directory test). You can compile multiple packages out of these
sources:
PKG=test0 ./debian/rules binary
PKG=test1 ./debian/rules binary
results in two packages, test0.deb and test1.deb (for you convenience,
I've included these packages).
Both share a common template, "shared/test".
The strange thing is, that depending on the installation order of the
packages, only the first one is registered as owner of the template:
WOODY:/tmp/d/debconf-test# DEBCONF_DEBUG=developer dpkg -i
test1_0.0-1_i386.deb test2_0.0-1_i386.deb
Selecting previously deselected package test1.
(Reading database ... 18739 files and directories currently installed.)
Unpacking test1 (from test1_0.0-1_i386.deb) ...
Selecting previously deselected package test2.
Unpacking test2 (from test2_0.0-1_i386.deb) ...
Setting up test1 (0.0-1) ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is test1
debconf (developer): starting /var/lib/dpkg/info/test1.config configure
debconf (developer): <-- VERSION 2.0
debconf (developer): --> 0 2.0
debconf (developer): <-- METAGET shared/test owners
debconf (developer): --> 0 test1
debconf (developer): <-- METAGET shared/test choices
debconf (developer): --> 0
debconf (developer): starting /var/lib/dpkg/info/test1.postinst
configure
debconf (developer): <-- GET shared/test
debconf (developer): --> 0
Setting up test2 (0.0-1) ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is test2
debconf (developer): starting /var/lib/dpkg/info/test2.config configure
debconf (developer): <-- VERSION 2.0
debconf (developer): --> 0 2.0
debconf (developer): <-- METAGET shared/test owners
debconf (developer): --> 0 test1
debconf (developer): <-- METAGET shared/test choices
debconf (developer): --> 0
debconf (developer): starting /var/lib/dpkg/info/test2.postinst
configure
debconf (developer): <-- GET shared/test
debconf (developer): --> 0
WOODY:/tmp/d/debconf-test# debconf-show test1
shared/test:
WOODY:/tmp/d/debconf-test# debconf-show test2
WOODY:/tmp/d/debconf-test#
Only test1 is registered as owner, since it was installed first.
When test1 is now purged, and test2 is reinstalled, then test2 is the
owner of "shared/test":
WOODY:/tmp/d/debconf-test# DEBCONF_DEBUG=developer dpkg --purge test1
(Reading database ... 18745 files and directories currently installed.)
Removing test1 ...
Purging configuration files for test1 ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is test1
debconf (developer): starting /var/lib/dpkg/info/test1.postrm purge
debconf (developer): <-- PURGE
debconf (developer): --> 0
WOODY:/tmp/d/debconf-test# DEBCONF_DEBUG=developer dpkg -i
test2_0.0-1_i386.deb
(Reading database ... 18742 files and directories currently installed.)
Preparing to replace test2 0.0-1 (using test2_0.0-1_i386.deb) ...
Unpacking replacement test2 ...
Setting up test2 (0.0-1) ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is test2
debconf (developer): starting /var/lib/dpkg/info/test2.config configure
0.0-1
debconf (developer): <-- VERSION 2.0
debconf (developer): --> 0 2.0
debconf (developer): <-- METAGET shared/test owners
debconf (developer): --> 0 test2
debconf (developer): <-- METAGET shared/test choices
debconf (developer): --> 0
debconf (developer): starting /var/lib/dpkg/info/test2.postinst
configure 0.0-1
debconf (developer): <-- GET shared/test
debconf (developer): --> 0
When I now reinstall test1, then it doesn't get registered as owner:
WOODY:/tmp/d/debconf-test# DEBCONF_DEBUG=developer dpkg -i
test1_0.0-1_i386.deb
Selecting previously deselected package test1.
(Reading database ... 18742 files and directories currently installed.)
Unpacking test1 (from test1_0.0-1_i386.deb) ...
Setting up test1 (0.0-1) ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is test1
debconf (developer): starting /var/lib/dpkg/info/test1.config configure
debconf (developer): <-- VERSION 2.0
debconf (developer): --> 0 2.0
debconf (developer): <-- METAGET shared/test owners
debconf (developer): --> 0 test2
debconf (developer): <-- METAGET shared/test choices
debconf (developer): --> 0
debconf (developer): starting /var/lib/dpkg/info/test1.postinst
configure
debconf (developer): <-- GET shared/test
debconf (developer): --> 0
I don't know what I'm doing wrong here.
I have an idea how to remove that superfluous "restart server" questions
that come up when installing multiple Zope or Apache modules at once,
but I need that owner variable to implement that with debconf.
Thanks in advance for removing that wall ;-)
Gregor
Reply to: