-o Dpkg::Options::=--force-confdef ignored by cleanup run -- makes pkgsync hang
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
aptitude |
Incomplete
|
Undecided
|
Unassigned | ||
aptitude (Ubuntu) |
Expired
|
Undecided
|
Unassigned | ||
synaptic (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: aptitude
When pkgsync is running, it calls aptitude with the options "-o Dpkg::Options:
In the normal case, aptitude propagates options down to dpkg like this:
/bin/sh /etc/cron.
\_ /bin/bash /usr/sbin/pkgsync
\_ aptitude -y -q -o Dpkg::Options:
\_ /usr/bin/dpkg --force-confdef --force-confold --status-fd 34 --configure [...]
\_ /usr/bin/perl -w /usr/share/
However, if a package installation fails, this chunk of code in src/generic/
switch(pmres)
{
case pkgPackageManag
cerr << _("A package failed to install. Trying to recover:") << endl;
This results in the following call tree, which hangs as soon as a conffile is reached:
/bin/sh /etc/cron.
\_ /bin/bash /usr/sbin/pkgsync
\_ aptitude -y -q -o Dpkg::Options:
\_ sh -c DPKG_NO_TSTP=1 dpkg --configure -a
\_ dpkg --configure -a
The rest of aptitude seems to use an pkgDPkgPM object from apt-pkg/
A workaround for this problem is to add these lines to /etc/dpkg/dpkg.cfg:
force-confdef
force-confold
Changed in aptitude (Ubuntu): | |
status: | New → Confirmed |
commit fd28ea8c2af0786 d3a426d06ea3527 aa48de96ac
Author: Daniel Hartwig <email address hidden>
Date: Sat Mar 17 01:01:52 2012 +0800
Respect DPkg::Options when calling dpkg to recover failed installs
Usually we use APT to call dpkg, which handles all sorts of nice
option parsing. However, if an install run fails then we to call
'dpkg --configure -a' ourselves to see if this fixes the problem.
APT passes various options to dpkg, so we should also.
* src/generic/ apt/download_ install_ manager. cc:
- pass DPkg::Options when invoking dpkg. LP: #257279