Installation loops in db-config-common when ran from software-center

Bug #962393 reported by Alkis Georgopoulos on 2012-03-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
aptdaemon (Ubuntu)
Medium
Unassigned
dbconfig-common (Ubuntu)
Undecided
Unassigned
software-center (Ubuntu)
Medium
Unassigned

Bug Description

While installing phpmyadmin in Precise from the console, everything runs perfectly.
But when installing from software center, the following debconf questions don't appear:

(from debian/config):
if [ ! -f /etc/phpmyadmin/htpasswd.setup ]; then
 db_input low phpmyadmin/setup-username || true
 db_input low phpmyadmin/setup-password || true
fi

This results in an endless loop, where a debconf dialog is presented mentioning that the db configuration failed and asking for abort/retry/retry (skip questions).

Maybe the solution is to increase the db_input priority?

Alkis Georgopoulos (alkisg) wrote :

I'm not sure if the erroneously hidden root password debconf question comes from phpmyadmin or from dbconfig-common, so I put dbconfig-common to the affects list as well.

Alkis Georgopoulos (alkisg) wrote :

I ran software-center from the console, and I noticed this error:
debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: access denied

Then I tried from scratch, by running ***sudo*** software-center

And everything worked fine, the password questions were displayed.

So I removed phpmyadmin from the Affects list and added software-center, the bug is either in software-center or in dbconfig-common.

no longer affects: phpmyadmin (Ubuntu)
Alkis Georgopoulos (alkisg) wrote :

I tried: gdebi-gtk /var/cache/apt/archives/phpmyadmin_4%3a3.4.10.1-1_all.deb
without using sudo, and everything worked fine again, the debconf password questions were displayed.

So the bug is probably in software-center.

Alkis Georgopoulos (alkisg) wrote :

Maybe the problem is that software-center spawns debconf-communicate with the user id instead of as root:

alkisg 7368 1.7 0.5 65404 23364 pts/1 Sl+ 07:48 0:00 /usr/bin/perl -w /usr/bin/debconf-communicate

I tried making a debconf-communicate wrapper, to force running it as root instead, and everything worked fine again:
$ cat /usr/bin/debconf-communicate
#!/bin/sh
exec sudo -E /usr/bin/debconf-communicate.real "$@"

Of course to avoid sudo prompts, I've setup sudoers to not require a password for debconf-communicate.real for my user id.

Michael Vogt (mvo) wrote :

Hey Alkis, thanks for your bugreport and your analysis.

This looks like its indeed a problem in the communication for password via debconf that may require additional privs.

Changed in aptdaemon (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
James Page (james-page) wrote :

Marking task for dbconfig-common 'Invalid' as this looks like a software center issue.

Changed in dbconfig-common (Ubuntu):
status: New → Invalid
Changed in software-center (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers