tags 565213 + confirmed
reassign 565213 apt 0.7.25.1
affects 565213 apt-listbugs
retitle 565213 apt: fails to ignore .disabled files in /etc/apt/apt.conf.d/
thanks


On Wed, 13 Jan 2010 21:42:06 +0100 Jörgen Tegnér wrote:

> Package: apt-listbugs
> Version: 0.1.2
> Severity: critical
> Justification: breaks unrelated software

Hello!
Thanks for your report.

> 
> A few days ago after an dist-upgrade, apt-get stopped working.
> I put critical on this as it breaks apt. Please reclassify if I misunderstood 
> this.

Let's see...

> 
> Example outputs:
> apt-get install apt-listbugs
> .
> .
> .
> Do you want to continue [Y/n]? 
> /bin/sh: /usr/sbin/apt-listbugs: No such file or directory
> E: Sub-process /usr/sbin/apt-listbugs apt || exit 10 returned an error code 
> (10)
> E: Failure running script /usr/sbin/apt-listbugs apt || exit 10
> 
> dpkg --search /usr/sbin/apt-listbugs
> dpkg: /usr/sbin/apt-listbugs not found.
> 
> 
> ls -l /etc/apt/apt.conf.d/10apt-listbugs.disabled
> -rw-r--r-- 1 root root 296 Mar 31  2008 
> /etc/apt/apt.conf.d/10apt-listbugs.disabled
> dpkg --search etc/apt/apt.conf.d/10apt-listbugs.disabled 
> dpkg: /etc/apt/apt.conf.d/10apt-listbugs.disabled not found.
> 
> cat /etc/apt/apt.conf.d/10apt-listbugs.disabled 
> // Check all packages whether they has critical bugs before they are 
> installed.
> // If you don't like it, comment it out.
> DPkg::Pre-Install-Pkgs {"/usr/sbin/apt-listbugs apt || exit 10"};
> DPkg::Tools::Options::/usr/sbin/apt-listbugs "";
> DPkg::Tools::Options::/usr/sbin/apt-listbugs::Version "2";

By looking at what you reported, it seems that you previously had
apt-listbugs installed, then removed it (without purging its
configuration files), and now you want to re-install it.

> 
> Note: I don't know if the .disabled extension was added by me or from some 
> configuration script.

The .disabled extension is added by apt-listbugs postrm script on
removal, for the exact purpose of making APT ignore such configuration
fragment.
However, I've just reproduced the bug on a sid chroot:


# aptitude install apt-listbugs
[...]
# aptitude remove apt-listbugs
[...]
# cat /etc/apt/apt.conf.d/10apt-listbugs.disabled 
// Check all packages whether they has critical bugs before they are installed.
// If you don't like it, comment it out.
DPkg::Pre-Install-Pkgs {"/usr/sbin/apt-listbugs apt || exit 10";};
DPkg::Tools::Options::/usr/sbin/apt-listbugs "";
DPkg::Tools::Options::/usr/sbin/apt-listbugs::Version "2";
// AptListbugs::IgnoreRegexp "FTBFS";
# aptitude install apt-listbugs
[...]
Do you want to continue? [Y/n/?] 
Writing extended state information... Done
/bin/sh: /usr/sbin/apt-listbugs: not found
E: Sub-process /usr/sbin/apt-listbugs apt || exit 10 returned an error code (10)
E: Failure running script /usr/sbin/apt-listbugs apt || exit 10
A package failed to install.  Trying to recover:
Reading package lists... Done             
Building dependency tree       
Reading state information... Done
Reading extended state information... Done
Initializing package states... Done       
Writing extended state information... Done
# apt-get install apt-listbugs
[...]
Do you want to continue [Y/n]? 
/bin/sh: /usr/sbin/apt-listbugs: not found
E: Sub-process /usr/sbin/apt-listbugs apt || exit 10 returned an error code (10)
E: Failure running script /usr/sbin/apt-listbugs apt || exit 10


It seems that APT changed behavior (in version 0.7.25.1) and stopped
ignoring .disabled configuration fragments in /etc/apt/apt.conf.d/

Downgrading to apt/0.7.25 (currently in testing) restores the previous
behavior.

I seem to be unable to find any documentation about this behavior
change in APT: the apt.conf(5) man page simply mentions the existence
of the /etc/apt/apt.conf.d/ without documenting which files are skipped
there (see also bug #558348).
Even apt changelog does not seem to say anything about this change.

I am hence reassigning the bug to package apt, version 0.7.25.1 .

Dear apt maintainers, is this behavior change intended?
If so, how can a package disable an apt configuration fragment
in /etc/apt/apt.conf.d/ without deleting the file (on package removal)?

Please clarify.
Thanks for your time.

N.B.: I left the severity of this bug unchanged, since I think
apt/0.7.25.1 should not migrate to testing, until this issue is
solved or clarified.  Maybe it's not really critical, but please do not
downgrade the severity below the RC threshold, without providing some
help!   ;-)

[...]
> Linking /bin/true to /usr/sbin/apt-listbugs fixed the problem. A better fix 
> would be for the command
> in 10apt-listbugs to first check if the /usr/sbin/apt-listbugs exists before 
> trying to run it.

I think that the correct fix is ensuring that
the /etc/apt/apt.conf.d/10apt-listbugs is disabled on package removal
(but deleted only on package purge).
I am asking apt maintainers to clarify how this should be done with
current apt.



-- 
 http://www.inventati.org/frx/progs/scripts/pdebuild-hooks.html
 Need some pdebuild hook scripts?
..................................................... Francesco Poli .
 GnuPG key fpr == C979 F34B 27CE 5CD8 DC12  31B5 78F4 279B DD6D FCF4

Attachment: pgpXBTjFATZCp.pgp
Description: PGP signature

Reply via email to