[Aptitude-devel] Bug#1001169: aptitude: doesn't obey Pin-Priority during conflict resolution

Adam Borowski kilobyte at angband.pl
Sun Dec 5 17:20:08 GMT 2021

Package: aptitude
Version: 0.8.13-3
Severity: normal

On a stable system, with the following apt priorities:
I requested aptitude to upgrade a package, let's call it "foo", to the
version in testing.  It depends on libc6 (and libc6 has -dev, locales
and so on, but these come together).

Aptitude proposed the following solutions, in order:
1. remove foo
2. keep foo at current version (stable)
3. install glibc/experimental
4. install glibc/unstable
5. install glibc/testing

The obviously correct one is 5.  Solutions 1 and 2 shouldn't even be
considered as they are not solutions to what aptitude was invoked to do
-- but that's a separate issue.  What I'm reporting here is the order
of 3, 4, and 5.

Aptitude seems to sort available versions to prefer newest first, ignoring
configured releases -- as opposed to obeying the priority as it does during
the initial resolution.

Proposed fix: prefix the versions with priority?

-- Package-specific info:
Terminal: xterm-256color
$DISPLAY not set.
which aptitude: /usr/bin/aptitude

aptitude version information:
aptitude 0.8.13
Compiler: g++ 10.2.1 20210110
Compiled against:
  apt version 6.0.0
  NCurses version 6.2
  libsigc++ version: 2.10.4
  Gtk+ support disabled.
  Qt support disabled.

Current library versions:
  NCurses version: ncurses 6.2.20201114
  cwidget version: 0.5.18
  Apt version: 6.0.0

aptitude linkage:
	linux-vdso.so.1 (0x00007ffca27b0000)
	libapt-pkg.so.6.0 => /usr/lib/x86_64-linux-gnu/libapt-pkg.so.6.0 (0x00007fb9324ae000)
	libncursesw.so.6 => /lib/x86_64-linux-gnu/libncursesw.so.6 (0x00007fb932473000)
	libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007fb932444000)
	libsigc-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 (0x00007fb93243b000)
	libcwidget.so.4 => /usr/lib/x86_64-linux-gnu/libcwidget.so.4 (0x00007fb932335000)
	libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007fb9321f2000)
	libboost_iostreams.so.1.74.0 => /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.74.0 (0x00007fb9321d7000)
	libxapian.so.30 => /usr/lib/x86_64-linux-gnu/libxapian.so.30 (0x00007fb931fb5000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb931f93000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb931dc6000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb931c82000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb931c68000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb931aa1000)
	libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fb931a87000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb931a6a000)
	libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007fb931a57000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fb931a2f000)
	liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fb931a0c000)
	libzstd.so.1 => /usr/lib/x86_64-linux-gnu/libzstd.so.1 (0x00007fb93192f000)
	libudev.so.1 => /usr/lib/x86_64-linux-gnu/libudev.so.1 (0x00007fb931907000)
	libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fb93185f000)
	libgcrypt.so.20 => /usr/lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fb93173f000)
	libxxhash.so.0 => /usr/lib/x86_64-linux-gnu/libxxhash.so.0 (0x00007fb931726000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fb932ace000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb931720000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb931713000)
	libuuid.so.1 => /usr/lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fb93170a000)
	libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007fb9316ff000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fb9316d9000)

-- System Information:
Debian Release: 11.1
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable'), (333, 'testing'), (250, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.15.5-00015-g7798900894d9 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_CPU_OUT_OF_SPEC
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages aptitude depends on:
ii  aptitude-common           0.8.13-3
ii  libapt-pkg6.0             2.2.4
ii  libboost-iostreams1.74.0  1.74.0-9
ii  libc6                     2.31-13+deb11u2
ii  libcwidget4               0.5.18-5
ii  libgcc-s1                 10.2.1-6
ii  libncursesw6              6.2+20201114-2
ii  libsigc++-2.0-0v5         2.10.4-2
ii  libsqlite3-0              3.34.1-3
ii  libstdc++6                10.2.1-6
ii  libtinfo6                 6.2+20201114-2
ii  libxapian30               1.4.18-3

Versions of packages aptitude recommends:
ii  libdpkg-perl    1.20.9
ii  sensible-utils  0.0.14

Versions of packages aptitude suggests:
pn  apt-xapian-index                <none>
pn  aptitude-doc-en | aptitude-doc  <none>
pn  debtags                         <none>
ii  tasksel                         3.68

-- no debconf information

More information about the Aptitude-devel mailing list