Hi guys, (Finally) Looking closer at this, I'm suspecting this may actually be a debconf bug, or at least some kind of not-as-documented corner case of debconf usage. I'm including joeyh into the discussion here for his input about whether this should be reassigned to debconf or whether we need to craft a workaround.
Basically, this is what happens:
dbconfig-common installs a collection of templates. Example from
debconf config.dat cache file:
Name: dbconfig-common/database-type
Template: dbconfig-common/database-type
Owners: dbconfig-common
Later, someone installs a webapp (say, phpbb3), which registers a subset
of these packages from dbconfig-common. Relevant entries in debconf
cache file:
Name: dbconfig-common/database-type
Template: dbconfig-common/database-type
Owners: dbconfig-common
Name: phpbb3/database-type
Template: dbconfig-common/database-type
Value:
Owners: phpbb3
Variables:
database_types = mysql, pgsql, sqlite
pkg = phpbb3
Later, both packages are removed, and even later dbconfig-common is
purged (but not phpbb3). config.dat cache now contains:
Name: phpbb3/database-type
Template: dbconfig-common/database-type
Value:
Owners: phpbb3
Variables:
database_types = mysql, pgsql, sqlite
pkg = phpbb3
And the template still exists in templates.dat
And even later, dbconfig-common is reinstalled. However, config.dat
cache is the same as before (i.e. no dbconfig-common/database-type ).
I'm guessing that the un-purged package with the registered copy of the
template is preventing dbconfig-common from properly setting up its own
debconf-stuff, and as David has pointed out it requires purging not just
dbconfig-common but all dbconfig-common using packages in order to get a
working behavior again.
Joey, any comments?
sean
On Tue, 2010-04-27 at 18:12 -0400, David Prévot wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I noticed that, in order to "repair" dbconfig-common, one need to purge
> every uninstalled package that depends on dbconfig-common.
>
>
> For example, I just installed phpmyadmin (so dbconfig-common is
> installed as a dependency):
>
> $ sudo debconf-show phpmyadmin
> phpmyadmin/app-password-confirm: (password omitted)
> phpmyadmin/mysql/admin-pass: (password omitted)
> phpmyadmin/password-confirm: (password omitted)
> phpmyadmin/setup-password: (password omitted)
> phpmyadmin/mysql/app-pass: (password omitted)
> phpmyadmin/remove-error: abort
> phpmyadmin/setup-username: admin
> * phpmyadmin/db/app-user: phpmyadmin
> phpmyadmin/remote/host:
> * phpmyadmin/dbconfig-install: true
> phpmyadmin/remote/port:
> phpmyadmin/dbconfig-upgrade: true
> phpmyadmin/missing-db-package-error: abort
> phpmyadmin/upgrade-error: abort
> phpmyadmin/dbconfig-reinstall: false
> * phpmyadmin/db/dbname: phpmyadmin
> phpmyadmin/database-type: mysql
> phpmyadmin/dbconfig-remove:
> * phpmyadmin/mysql/method: unix socket
> phpmyadmin/purge: false
> phpmyadmin/install-error: abort
> * phpmyadmin/reconfigure-webserver: apache2
> * phpmyadmin/mysql/admin-user: root
> phpmyadmin/internal/reconfiguring: false
> phpmyadmin/remote/newhost:
> phpmyadmin/internal/skip-preseed: false
> phpmyadmin/upgrade-backup: true
> phpmyadmin/passwords-do-not-match:
>
> Now, if I purge dbconfig-common, phpmyadmin is uninstalled (the only
> difference with "debconf-show phpmyadmin" is:
>
> * phpmyadmin/dbconfig-remove: false
>
>
> Then, I install phpbb3 (dbconfig-common is installed as a dependency),
> only the two first debconf screen about dbconfig-common are shown,
> phpbb3 is not configured, no dbconfig-common question about it, so it is
> partially broken: no dbconfig-common feature is usable):
>
> $ sudo debconf-show phpbb3
> * phpbb3/httpd: apache2
>
> $ sudo debconf-show dbconfig-common
> dbconfig-common/pgsql/app-pass: (password omitted)
> dbconfig-common/pgsql/admin-pass: (password omitted)
> * dbconfig-common/remote-questions-default: false
> dbconfig-common/pgsql/revertconf: false
> dbconfig-common/pgsql/manualconf:
> dbconfig-common/pgsql/authmethod-admin: ident
> dbconfig-common/db/basepath:
> dbconfig-common/pgsql/no-empty-passwords:
> dbconfig-common/pgsql/admin-user: postgres
> dbconfig-common/pgsql/changeconf: false
> dbconfig-common/pgsql/no-user-choose-other-method:
> * dbconfig-common/remember-admin-pass: false
> dbconfig-common/pgsql/method: unix socket
> dbconfig-common/pgsql/authmethod-user:
>
> I needed to purge every packages that depends on dbconfig-common
> (phpmyadmin, phpbb3 and dbconfig-common), before I can install properly
> phpbb3 with dbconfig-common):
>
>
> $ sudo debconf-show phpbb3
> phpbb3/password-confirm: (password omitted)
> phpbb3/pgsql/admin-pass: (password omitted)
> phpbb3/mysql/app-pass: (password omitted)
> phpbb3/mysql/admin-pass: (password omitted)
> phpbb3/pgsql/app-pass: (password omitted)
> phpbb3/app-password-confirm: (password omitted)
> phpbb3/db/basepath:
> * phpbb3/db/app-user: phpbb3
> phpbb3/dbconfig-reinstall: false
> * phpbb3/db/dbname: phpbb3
> phpbb3/install-error: abort
> phpbb3/upgrade-backup: true
> * phpbb3/dbconfig-install: true
> * phpbb3/mysql/method: unix socket
> phpbb3/remote/newhost:
> phpbb3/pgsql/manualconf:
> phpbb3/dbconfig-remove:
> phpbb3/internal/reconfiguring: false
> phpbb3/pgsql/authmethod-user:
> phpbb3/upgrade-error: abort
> phpbb3/pgsql/authmethod-admin: ident
> phpbb3/pgsql/method: unix socket
> * phpbb3/database-type: mysql
> * phpbb3/mysql/admin-user: root
> phpbb3/remote/host:
> * phpbb3/httpd: apache
> phpbb3/remove-error: abort
> phpbb3/dbconfig-upgrade: true
> phpbb3/purge: false
> phpbb3/missing-db-package-error: abort
> phpbb3/pgsql/changeconf: false
> phpbb3/internal/skip-preseed: false
> phpbb3/pgsql/admin-user: postgres
> phpbb3/remote/port:
> phpbb3/pgsql/no-empty-passwords:
> phpbb3/passwords-do-not-match:
>
> $ sudo debconf-show dbconfig-common
> dbconfig-common/mysql/app-pass: (password omitted)
> dbconfig-common/pgsql/app-pass: (password omitted)
> dbconfig-common/mysql/admin-pass: (password omitted)
> dbconfig-common/password-confirm: (password omitted)
> dbconfig-common/pgsql/admin-pass: (password omitted)
> dbconfig-common/app-password-confirm: (password omitted)
> * dbconfig-common/remote-questions-default: false
> dbconfig-common/pgsql/revertconf: false
> dbconfig-common/internal/skip-preseed: false
> dbconfig-common/db/dbname:
> dbconfig-common/pgsql/manualconf:
> dbconfig-common/dbconfig-remove: true
> dbconfig-common/mysql/method: unix socket
> dbconfig-common/upgrade-backup: true
> dbconfig-common/pgsql/authmethod-admin: ident
> dbconfig-common/upgrade-error: abort
> dbconfig-common/purge: false
> dbconfig-common/db/basepath:
> dbconfig-common/install-error: abort
> dbconfig-common/pgsql/no-empty-passwords:
> dbconfig-common/pgsql/admin-user: postgres
> dbconfig-common/dbconfig-install: true
> dbconfig-common/dbconfig-reinstall: false
> dbconfig-common/remote/host:
> dbconfig-common/pgsql/changeconf: false
> dbconfig-common/remote/newhost:
> dbconfig-common/missing-db-package-error: abort
> dbconfig-common/dbconfig-upgrade: true
> dbconfig-common/pgsql/no-user-choose-other-method:
> dbconfig-common/internal/reconfiguring: false
> dbconfig-common/passwords-do-not-match:
> dbconfig-common/remove-error: abort
> * dbconfig-common/remember-admin-pass: false
> dbconfig-common/mysql/admin-user: root
> dbconfig-common/pgsql/method: unix socket
> dbconfig-common/pgsql/authmethod-user:
> dbconfig-common/database-type:
> dbconfig-common/db/app-user:
> dbconfig-common/remote/port:
>
> Hope this helps.
>
> Cheers
>
> David
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkvXYS8ACgkQ18/WetbTC/p9wACdFhZf/+8/P/Y1gkWzF0qgt8mr
> 2icAn1a09QKGZ4IqrdkuJWNU2kkxwJPA
> =XVWc
> -----END PGP SIGNATURE-----
>
>
signature.asc
Description: This is a digitally signed message part

