Bug#796070: apt: Downgrading apt to 1.0.10.1 doesn't remove libapt-pkg5.0
On Wed, Aug 19, 2015 at 09:41:40AM +0200, Elimar Riesebieter wrote:
> Package: apt
> Version: 1.1~exp9
> Severity: normal
>
> root@galadriel>tty1 /etc/apt # apt-get install apt=1.0.10.1 (git)-[master]
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Suggested packages:
> aptitude | synaptic | wajig apt-doc
> The following packages will be REMOVED:
> libapt-pkg5.0
> The following packages will be DOWNGRADED:
> apt
> 0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 2 not upgraded.
> Need to get 0 B/1.090 kB of archives.
> After this operation, 2.586 kB disk space will be freed.
> Do you want to continue? [Y/n]
> [master 79eda93] saving uncommitted changes in /etc prior to apt run
> Author: Elimar Riesebieter <riesebie@lxtec.de>
> 1 file changed, 5 insertions(+), 5 deletions(-)
> dpkg: warning: downgrading apt from 1.1~exp9 to 1.0.10.1
> (Reading database ... 148466 files and directories currently installed.)
> Preparing to unpack .../apt_1.0.10.1_amd64.deb ...
> Unpacking apt (1.0.10.1) over (1.1~exp9) ...
> Processing triggers for man-db (2.7.2-1) ...
> dpkg: dependency problems prevent configuration of apt:
> libapt-pkg5.0:amd64 (1.1~exp9) breaks apt (<< 1.1~exp4) and is installed.
> Version of apt to be configured is 1.0.10.1.
>
I have reproduced the issue in a minimal test case. David will probably
look at this further. I pushed the failing test to the branch
debian/experimental-bug-796070 in git, and attached it to this message.
AFAICT from the test, It turns out to be a problem because APT treats
itself as pseudo-essential, and removing libapt-pkg4.16 would make
an apt (here: an essential package) unusable, thus leading APT to
order the removal after the apt downgrade.
--
Julian Andres Klode - Debian Developer, Ubuntu Member
See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
Be friendly, do not top-post, and follow RFC 1855 "Netiquette".
- If you don't I might ignore you.
>From 4da8168d2117fead82c9ba5a8ca0e6ada32e84a2 Mon Sep 17 00:00:00 2001
From: Julian Andres Klode <jak@debian.org>
Date: Wed, 19 Aug 2015 12:56:12 +0200
Subject: [PATCH] RED: test-bug-796070-downgrade: Check for Bug#796070
---
test/integration/test-bug-796070-downgrade | 67 ++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
create mode 100755 test/integration/test-bug-796070-downgrade
diff --git a/test/integration/test-bug-796070-downgrade b/test/integration/test-bug-796070-downgrade
new file mode 100755
index 0000000..a435cfb
--- /dev/null
+++ b/test/integration/test-bug-796070-downgrade
@@ -0,0 +1,67 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture 'i386'
+
+insertpackage 'unstable' 'apt' 'all' '1.0.10.1' 'Depends: libapt-pkg4.16 (>= 1.0.10.1)'
+insertinstalledpackage 'libapt-pkg4.16' 'all' '1.0.10.1' 'Breaks: apt (<< 0.9.4~), libapt-inst1.5 (<< 0.9.9~)'
+insertinstalledpackage 'libapt-pkg5.0' 'all' '1.1~exp9' 'Breaks: apt (<< 1.1~exp4), libapt-inst1.5 (<< 0.9.9~)'
+insertinstalledpackage 'apt' 'all' '1.1~exp9' 'Depends: libapt-pkg5.0'
+
+insertpackage 'unstable' 'napt' 'all' '1.0.10.1' 'Depends: nlibapt-pkg4.16 (>= 1.0.10.1)'
+insertinstalledpackage 'nlibapt-pkg4.16' 'all' '1.0.10.1' 'Breaks: napt (<< 0.9.4~), nlibapt-inst1.5 (<< 0.9.9~)'
+insertinstalledpackage 'nlibapt-pkg5.0' 'all' '1.1~exp9' 'Breaks: napt (<< 1.1~exp4), nlibapt-inst1.5 (<< 0.9.9~)'
+insertinstalledpackage 'napt' 'all' '1.1~exp9' 'Depends: nlibapt-pkg5.0'
+
+insertpackage 'unstable' 'eapt' 'all' '1.0.10.1' 'Depends: elibapt-pkg4.16 (>= 1.0.10.1)
+Essential: yes'
+insertinstalledpackage 'elibapt-pkg4.16' 'all' '1.0.10.1' 'Breaks: eapt (<< 0.9.4~), elibapt-inst1.5 (<< 0.9.9~)'
+insertinstalledpackage 'elibapt-pkg5.0' 'all' '1.1~exp9' 'Breaks: eapt (<< 1.1~exp4), elibapt-inst1.5 (<< 0.9.9~)'
+insertinstalledpackage 'eapt' 'all' '1.1~exp9' 'Depends: elibapt-pkg5.0
+Essential: yes'
+
+
+setupaptarchive
+
+
+# Check with a normal package
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ nlibapt-pkg5.0
+The following packages will be DOWNGRADED:
+ napt
+0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 0 not upgraded.
+Remv nlibapt-pkg5.0 [1.1~exp9] [napt:i386 ]
+Inst napt [1.1~exp9] (1.0.10.1 unstable [all])
+Conf napt (1.0.10.1 unstable [all])' apt install -s napt=1.0.10.1
+
+
+# Check with Essential
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ elibapt-pkg5.0
+The following packages will be DOWNGRADED:
+ eapt
+0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 0 not upgraded.
+Remv elibapt-pkg5.0 [1.1~exp9]
+Inst eapt [1.1~exp9] (1.0.10.1 unstable [all])
+Conf eapt (1.0.10.1 unstable [all])' apt install -s eapt=1.0.10.1
+
+
+# Check with the APT name, aka essential
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ libapt-pkg5.0
+The following packages will be DOWNGRADED:
+ apt
+0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 0 not upgraded.
+Remv libapt-pkg5.0 [1.1~exp9]
+Inst apt [1.1~exp9] (1.0.10.1 unstable [all])
+Conf apt (1.0.10.1 unstable [all])' apt install -s apt=1.0.10.1
--
2.5.0
Reply to: