[Aptitude-devel] Bug#890469: aptitude: sometimes fails to resolve dependencies in a good way with '+' in the UI

Vincent Lefevre vincent at vinc17.net
Wed Feb 14 23:58:29 UTC 2018


Package: aptitude
Version: 0.8.10-6
Severity: normal

Contrary to apt, aptitude sometimes fails to resolve dependencies
in a good way with '+' in the UI. Here's an example.

With the UI, I currently have:

  --\ utils          Various system utilities (5)
    --\ main           The main Debian archive (5)
i A stardict-common                    3.0.1-9.3                3.0.1-9.4               
i   stardict-gtk                       3.0.1-9.3                3.0.1-9.4
i A stardict-plugin                    3.0.1-9.3                3.0.1-9.4
i A stardict-plugin-espeak             3.0.1-9.3                3.0.1-9.4
i A stardict-plugin-festival           3.0.1-9.3                3.0.1-9.4

I wish to upgrade all these packages at once.

The immediate solution should be to type '+' over "utils/main".
But this yields:

  --\ utils          Various system utilities (5)
    --\ main           The main Debian archive (5)                                      
iuA stardict-common                    3.0.1-9.3                3.0.1-9.4               
iB  stardict-gtk             -4096 B   3.0.1-9.3                3.0.1-9.4               
iuA stardict-plugin          -8192 B   3.0.1-9.3                3.0.1-9.4               
iuA stardict-plugin-espeak             3.0.1-9.3                3.0.1-9.4               
iuA stardict-plugin-festival           3.0.1-9.3                3.0.1-9.4               

and for the broken stardict-gtk:

Some dependencies of stardict-gtk (broken, 3.0.1-9.3) are not satisfied:       ▒
                                                                               ▒
  * stardict-gtk (upgrade, 3.0.1-9.3 -> 3.0.1-9.4) conflicts with              ▒
    stardict-gnome                                                             ▒
                                                                               ▒
The following packages conflict with stardict-gtk (broken, 3.0.1-9.3):         ▒
                                                                               ▒
  * stardict-gnome (install, 3.0.1-9.4) conflicts with stardict-gtk            ▒

Note that stardict-gnome is not currently installed. The problem is
that aptitude chooses to install it, hence the conflict. The same
problem occurs when I hit '+' over "stardict-common". I suspect
that aptitude tries to upgrade one package after the other, with a
suboptimal resolution of OR'ed dependencies: stardict-com 3.0.1-9.4
has:

  --\ Recommends (1)
    --- stardict-gnome (>= 3.0.1-9.4) | stardict-gtk (>= 3.0.1-9.4)

So, when aptitude chooses to upgrade stardict-com, it wants
to install stardict-gnome (not currently installed) instead
of upgrading stardict-gtk. This choice is surprising.

There is no such problem with apt when I choose to upgrade the
exactly same packages:

$ apt install -s stardict-common stardict-gtk stardict-plugin \
    stardict-plugin-espeak stardict-plugin-festival
[...]
The following additional packages will be installed:
  libestools2.5
Suggested packages:
  ttf-freefont ttf-arphic-uming
The following NEW packages will be installed:
  libestools2.5
The following packages will be upgraded:
  stardict-common stardict-gtk stardict-plugin stardict-plugin-espeak
  stardict-plugin-festival
5 upgraded, 1 newly installed, 0 to remove and 34 not upgraded.
[...]

There is no such problem with aptitude either when I use 'U' instead
of '+' (except that here, 'U' will upgrade unrelated packages). So it
seems that the strategy for '+' is not as good as the one for 'U'.

-- Package-specific info:
Terminal: xterm-debian
$DISPLAY is set.
which aptitude: /usr/bin/aptitude

aptitude version information:
aptitude 0.8.10
Compiler: g++ 7.2.0
Compiled against:
  apt version 5.0.2
  NCurses version 6.0
  libsigc++ version: 2.10.0
  Gtk+ support disabled.
  Qt support disabled.

Current library versions:
  NCurses version: ncurses 6.1.20180127
  cwidget version: 0.5.17
  Apt version: 5.0.2

aptitude linkage:
	linux-vdso.so.1 (0x00007fff5499a000)
	libgtk3-nocsd.so.0 => /usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 (0x00007f037854a000)
	libapt-pkg.so.5.0 => /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0 (0x00007f037818b000)
	libncursesw.so.5 => /lib/x86_64-linux-gnu/libncursesw.so.5 (0x00007f0377f5b000)
	libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f0377d31000)
	libsigc-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 (0x00007f0377b2a000)
	libcwidget.so.3 => /usr/lib/x86_64-linux-gnu/libcwidget.so.3 (0x00007f0377832000)
	libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f0377527000)
	libboost_iostreams.so.1.62.0 => /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.62.0 (0x00007f037730f000)
	libboost_filesystem.so.1.62.0 => /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.62.0 (0x00007f03770f6000)
	libboost_system.so.1.62.0 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.62.0 (0x00007f0376ef2000)
	libxapian.so.30 => /usr/lib/x86_64-linux-gnu/libxapian.so.30 (0x00007f0376ae7000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f03768c9000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0376544000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f03761f9000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0375fe1000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0375c2b000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0375a27000)
	libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f0375810000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f03755f6000)
	libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f03753e6000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f03751c0000)
	liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f0374fae000)
	libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f0374d90000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f0378d5f000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0374b88000)
	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f0374981000)

-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.14.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=POSIX (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages aptitude depends on:
ii  aptitude-common            0.8.10-6
ii  libapt-pkg5.0              1.6~alpha7
ii  libboost-filesystem1.62.0  1.62.0+dfsg-5
ii  libboost-iostreams1.62.0   1.62.0+dfsg-5
ii  libboost-system1.62.0      1.62.0+dfsg-5
ii  libc6                      2.26-6
ii  libcwidget3v5              0.5.17-7
ii  libgcc1                    1:8-20180207-2
ii  libncursesw5               6.1-1
ii  libsigc++-2.0-0v5          2.10.0-1
ii  libsqlite3-0               3.22.0-1
ii  libstdc++6                 8-20180207-2
ii  libtinfo5                  6.1-1
ii  libxapian30                1.4.5-1

Versions of packages aptitude recommends:
ii  libparse-debianchangelog-perl  1.2.0-12
ii  sensible-utils                 0.0.11

Versions of packages aptitude suggests:
ii  apt-xapian-index                0.49
ii  aptitude-doc-en [aptitude-doc]  0.8.10-6
pn  debtags                         <none>
ii  tasksel                         3.43

-- no debconf information



More information about the Aptitude-devel mailing list