[Debconf-devel] Bug#779920: Bug#779920: debconf: questions sourced from a template owned by another package block purge/install of other package

Paul Gevers elbrus at debian.org
Sun Jul 12 20:12:52 UTC 2015


Hi Colin,

Thanks for responding.

On 12-07-15 19:33, Colin Watson wrote:
> I think I would want to see a full DEBCONF_DEBUG=developer log
> demonstrating the exact sequence of steps that's going wrong before
> trying to recommend a solution, though.

Please see below. The logging starts with uninstalling cacti (which was
installed before, although without db, but that doesn't change the
behavior). Then dbconfig-common is purged. Then dbconfig-common is
installed and finally cacti again. I hope this helps to find the issue.
The issue fails with:
debconf (developer): <-- REGISTER dbconfig-common/database-type
cacti/database-type
debconf (developer): --> 10 No such template,
"dbconfig-common/database-type"

The reason why dbconfig-common doesn't fail completely here is that in
the configure phase of cacti it allow for itself to not be configured.
Therefor, under those circumstances, this is postponed to the postinst
phase. (Mostly this is not needed).

Paul

root at sid:~# DEBIAN_FRONTEND=readline DEBCONF_DEBUG=developer apt-get
remove cacti
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
  apache2 apache2-bin apache2-data apache2-utils bsd-mailx cron exim4
exim4-base exim4-config exim4-daemon-light fontconfig
  fontconfig-config fonts-dejavu-core inetutils-ping javascript-common
libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
  libaprutil1-ldap libcairo2 libdatrie1 libdbi1 libfontconfig1
libfreetype6 libgraphite2-3 libharfbuzz0b libhtml-template-perl
  libjs-jquery libjs-jquery-cookie libjs-jquery-ui
libjs-jquery-ui-theme-ui-lightness libjson-c2 liblua5.1-0 libonig2
libpango-1.0-0
  libpangocairo-1.0-0 libpangoft2-1.0-0 libpci3 libperl4-corelibs-perl
libperl5.20 libphp-adodb libpixman-1-0 libpopt0 libqdbm14 librrd4
  libsensors4 libsnmp-base libsnmp30 libthai-data libthai0 libx11-6
libx11-data libxau6 libxcb-render0 libxcb-shm0 libxcb1 libxdmcp6
  libxext6 libxrender1 logrotate lsof mysql-server mysql-server-5.6
mysql-server-core-5.6 php5-cli php5-common php5-json php5-mysql
  php5-readline php5-snmp rrdtool snmp ssl-cert
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  cacti
0 upgraded, 0 newly installed, 1 to remove and 130 not upgraded.
After this operation, 5608 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 25934 files and directories currently installed.)
Removing cacti (0.8.8d+ds1-1) ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is cacti
debconf (developer): starting /var/lib/dpkg/info/cacti.prerm remove
debconf (developer): <-- SET cacti/dbconfig-remove true
debconf (developer): --> 0 value set
debconf (developer): <-- INPUT high cacti/dbconfig-remove
debconf (developer): --> 30 question skipped
debconf (developer): <-- GO
debconf (developer): --> 0 ok
debconf (developer): <-- GET cacti/dbconfig-remove
debconf (developer): --> 0 true
debconf (developer): <-- INPUT high cacti/purge
debconf (developer): --> 30 question skipped
debconf (developer): <-- GO
debconf (developer): --> 0 ok
debconf (developer): <-- GET cacti/purge
debconf (developer): --> 0 true
debconf (developer): <-- FGET cacti/mysql/admin-pass seen
debconf (developer): --> 0 false
debconf (developer): <-- GET cacti/mysql/admin-user
debconf (developer): --> 0 root
debconf (developer): <-- SUBST cacti/mysql/admin-pass dbadmin root
debconf (developer): --> 0
debconf (developer): <-- INPUT high cacti/mysql/admin-pass
debconf (developer): --> 0 question will be asked
debconf (developer): <-- GO
Configuring cacti
-----------------

Please provide the password for the administrative account "root" with
which this package should create its MySQL database and user.

Password of the database's administrative user:


debconf (developer): --> 0 ok
debconf (developer): <-- GET cacti/mysql/admin-pass
debconf (developer): --> 0 xxx
debconf (developer): <-- GET cacti/mysql/admin-pass
debconf (developer): --> 0 xxx
dbconfig-common: dumping mysql database cacti to
/var/tmp/cacti.cacti.2015-07-12-21.48.mysql.RQgx6n.
database does not exist.
dbconfig-common: dropping mysql database cacti.
dropping database cacti: database does not exist.
dbconfig-common: revoking privileges for user cacti on cacti.
revoking access to database cacti from cacti at localhost: access does not
exist.
debconf (developer): frontend started
debconf (developer): frontend running, package name is cacti
debconf (developer): starting /var/lib/dpkg/info/cacti.postrm remove
debconf (developer): <-- VERSION 2.0
debconf (developer): --> 0 2.0
root at sid:~# DEBIAN_FRONTEND=readline DEBCONF_DEBUG=developer apt-get
purge dbconfig-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
  apache2 apache2-bin apache2-data apache2-utils bsd-mailx cron exim4
exim4-base exim4-config exim4-daemon-light fontconfig
  fontconfig-config fonts-dejavu-core inetutils-ping javascript-common
libaio1 libapache2-mod-php5 libapr1 libaprutil1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap libcairo2 libdatrie1
libdbd-mysql-perl libdbi-perl libdbi1 libfontconfig1 libfreetype6
  libgraphite2-3 libharfbuzz0b libhtml-template-perl libjs-jquery
libjs-jquery-cookie libjs-jquery-ui libjs-jquery-ui-theme-ui-lightness
  libjson-c2 liblua5.1-0 libmysqlclient18 libonig2 libpango-1.0-0
libpangocairo-1.0-0 libpangoft2-1.0-0 libpci3 libperl4-corelibs-perl
  libperl5.20 libphp-adodb libpixman-1-0 libpopt0 libpq5
libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libqdbm14 librrd4
  libsensors4 libsnmp-base libsnmp30 libsqlite3-0 libterm-readkey-perl
libthai-data libthai0 libx11-6 libx11-data libxau6 libxcb-render0
  libxcb-shm0 libxcb1 libxdmcp6 libxext6 libxrender1 logrotate
lsb-release lsof mime-support mysql-client mysql-client-5.6
  mysql-client-core-5.6 mysql-common mysql-server mysql-server-5.6
mysql-server-core-5.6 php5-cli php5-common php5-json php5-mysql
  php5-readline php5-snmp postgresql-client postgresql-client-9.4
postgresql-client-common python python-minimal python2.7
  python2.7-minimal rrdtool snmp ssl-cert ucf
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  dbconfig-common*
0 upgraded, 0 newly installed, 1 to remove and 130 not upgraded.
After this operation, 1369 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 25474 files and directories currently installed.)
Removing dbconfig-common (1.8.52) ...
Purging configuration files for dbconfig-common (1.8.52) ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is dbconfig-common
debconf (developer): starting /var/lib/dpkg/info/dbconfig-common.postrm
purge
debconf (developer): <-- PURGE
debconf (developer): --> 0
dpkg: warning: while removing dbconfig-common, directory
'/etc/dbconfig-common' not empty so not removed
Processing triggers for man-db (2.7.0.2-5) ...
root at sid:~# DEBIAN_FRONTEND=readline DEBCONF_DEBUG=developer apt-get
install dbconfig-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
  apache2 apache2-bin apache2-data apache2-utils bsd-mailx cron exim4
exim4-base exim4-config exim4-daemon-light fontconfig
  fontconfig-config fonts-dejavu-core inetutils-ping javascript-common
libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
  libaprutil1-ldap libcairo2 libdatrie1 libdbi1 libfontconfig1
libfreetype6 libgraphite2-3 libharfbuzz0b libhtml-template-perl
  libjs-jquery libjs-jquery-cookie libjs-jquery-ui
libjs-jquery-ui-theme-ui-lightness libjson-c2 liblua5.1-0 libonig2
libpango-1.0-0
  libpangocairo-1.0-0 libpangoft2-1.0-0 libpci3 libperl4-corelibs-perl
libperl5.20 libphp-adodb libpixman-1-0 libpopt0 libqdbm14 librrd4
  libsensors4 libsnmp-base libsnmp30 libthai-data libthai0 libx11-6
libx11-data libxau6 libxcb-render0 libxcb-shm0 libxcb1 libxdmcp6
  libxext6 libxrender1 logrotate lsof mysql-server mysql-server-5.6
mysql-server-core-5.6 php5-cli php5-common php5-json php5-mysql
  php5-readline php5-snmp rrdtool snmp ssl-cert
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  dbconfig-common
0 upgraded, 1 newly installed, 0 to remove and 130 not upgraded.
Need to get 0 B/585 kB of archives.
After this operation, 1369 kB of additional disk space will be used.
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package dbconfig-common.
(Reading database ... 25227 files and directories currently installed.)
Preparing to unpack .../dbconfig-common_1.8.52_all.deb ...
Unpacking dbconfig-common (1.8.52) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up dbconfig-common (1.8.52) ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is dbconfig-common
debconf (developer): starting /var/lib/dpkg/info/dbconfig-common.config
configure
debconf (developer): <-- INPUT low dbconfig-common/remember-admin-pass
debconf (developer): --> 30 question skipped
debconf (developer): <-- INPUT low dbconfig-common/remote-questions-default
debconf (developer): --> 30 question skipped
debconf (developer): <-- GO
debconf (developer): --> 0 ok
debconf (developer): starting
/var/lib/dpkg/info/dbconfig-common.postinst configure
debconf (developer): <-- GET dbconfig-common/remember-admin-pass
debconf (developer): --> 0 false
debconf (developer): <-- GET dbconfig-common/remote-questions-default
debconf (developer): --> 0 false
debconf (developer): <-- X_LOADTEMPLATEFILE
/var/lib/dpkg/info/ucf.templates ucf
debconf (developer): --> 0

Creating config file /etc/dbconfig-common/config with new version
root at sid:~# DEBIAN_FRONTEND=readline DEBCONF_DEBUG=developer apt-get
install cacti
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  php5-ldap moreutils
The following NEW packages will be installed:
  cacti
0 upgraded, 1 newly installed, 0 to remove and 130 not upgraded.
Need to get 0 B/1990 kB of archives.
After this operation, 5608 kB of additional disk space will be used.
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package cacti.
(Reading database ... 25474 files and directories currently installed.)
Preparing to unpack .../cacti_0.8.8d+ds1-1_all.deb ...
Unpacking cacti (0.8.8d+ds1-1) ...
Setting up cacti (0.8.8d+ds1-1) ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is cacti
debconf (developer): starting /var/lib/dpkg/info/cacti.config configure
0.8.8d+ds1-1
debconf (developer): <-- CAPB backup
debconf (developer): --> 0 multiselect escape
debconf (developer): <-- REGISTER dbconfig-common/database-type
cacti/database-type
debconf (developer): --> 10 No such template,
"dbconfig-common/database-type"
debconf (developer): <-- SET cacti/webserver None
debconf (developer): --> 0 value set
debconf (developer): <-- INPUT high cacti/webserver
debconf (developer): --> 30 question skipped
debconf (developer): <-- GO
debconf (developer): --> 0 ok
debconf (developer): starting /var/lib/dpkg/info/cacti.postinst
configure 0.8.8d+ds1-1
debconf (developer): <-- VERSION 2.0
debconf (developer): --> 0 2.0
debconf (developer): <-- GET cacti/dbconfig-install
debconf (developer): --> 0 true
debconf (developer): <-- GET cacti/dbconfig-upgrade
debconf (developer): --> 0 true
debconf (developer): <-- GET cacti/dbconfig-remove
debconf (developer): --> 0 true
debconf (developer): <-- GET cacti/db/app-user
debconf (developer): --> 0 cacti
debconf (developer): <-- GET cacti/mysql/app-pass
debconf (developer): --> 0
debconf (developer): <-- GET cacti/mysql/admin-user
debconf (developer): --> 0 root
debconf (developer): <-- GET cacti/mysql/admin-pass
debconf (developer): --> 0 xxx
debconf (developer): <-- GET cacti/remote/host
debconf (developer): --> 0
debconf (developer): <-- GET cacti/remote/port
debconf (developer): --> 0
debconf (developer): <-- GET cacti/db/dbname
debconf (developer): --> 0 cacti
dbconfig-common: writing config to /etc/dbconfig-common/cacti.conf
debconf (developer): <-- X_LOADTEMPLATEFILE
/var/lib/dpkg/info/ucf.templates ucf
debconf (developer): --> 0
debconf (developer): <-- X_LOADTEMPLATEFILE
/var/lib/dpkg/info/ucf.templates ucf
debconf (developer): --> 0
debconf (developer): <-- GET cacti/internal/reconfiguring
debconf (developer): --> 0 false
dbconfig-common: flushing administrative password
debconf (developer): <-- RESET cacti/mysql/admin-pass
debconf (developer): --> 0
debconf (developer): <-- FSET cacti/mysql/admin-pass seen false
debconf (developer): --> 0 false
debconf (developer): <-- RESET cacti/password-confirm
debconf (developer): --> 0
debconf (developer): <-- FSET cacti/password-confirm seen false
debconf (developer): --> 0 false
debconf (developer): <-- RESET cacti/mysql/app-pass
debconf (developer): --> 0
debconf (developer): <-- FSET cacti/mysql/app-pass seen false
debconf (developer): --> 0 false
debconf (developer): <-- RESET cacti/app-password-confirm
debconf (developer): --> 0
debconf (developer): <-- FSET cacti/app-password-confirm seen false
debconf (developer): --> 0 false
debconf (developer): <-- RESET cacti/internal/skip-preseed
debconf (developer): --> 0
debconf (developer): <-- RESET cacti/internal/reconfiguring
debconf (developer): --> 0
debconf (developer): <-- GET cacti/webserver
debconf (developer): --> 0 None
debconf (developer): <-- X_LOADTEMPLATEFILE
/var/lib/dpkg/info/ucf.templates ucf
debconf (developer): --> 0
debconf (developer): <-- X_LOADTEMPLATEFILE
/var/lib/dpkg/info/ucf.templates ucf
debconf (developer): --> 0
debconf (developer): <-- STOP
Running cli/upgrade_database.php as part of package update...
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Headers and client library minor version
mismatch. Headers:50542 Library:50625 in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
PHP Warning:  mysql_pconnect(): Access denied for user
'cacti'@'localhost' (using password: NO) in
/usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 461
FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure
you have specified a valid MySQL database name in 'include/config.php'
root at sid:~#

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debconf-devel/attachments/20150712/5a02d6fd/attachment-0001.sig>


More information about the Debconf-devel mailing list