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

  --\ 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:
Suggested packages:
  ttf-freefont ttf-arphic-uming
The following NEW packages will be installed:
The following packages will be upgraded:
  stardict-common stardict-gtk stardict-plugin stardict-plugin-espeak
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: (0x00007fff5499a000) => /usr/lib/x86_64-linux-gnu/ 
(0x00007f037854a000) => /usr/lib/x86_64-linux-gnu/ 
(0x00007f037818b000) => /lib/x86_64-linux-gnu/ 
(0x00007f0377f5b000) => /lib/x86_64-linux-gnu/ 
(0x00007f0377d31000) => /usr/lib/x86_64-linux-gnu/ 
(0x00007f0377b2a000) => /usr/lib/x86_64-linux-gnu/ 
(0x00007f0377832000) => /usr/lib/x86_64-linux-gnu/ 
(0x00007f0377527000) => 
/usr/lib/x86_64-linux-gnu/ (0x00007f037730f000) => 
/usr/lib/x86_64-linux-gnu/ (0x00007f03770f6000) => 
/usr/lib/x86_64-linux-gnu/ (0x00007f0376ef2000) => /usr/lib/x86_64-linux-gnu/ 
(0x00007f0376ae7000) => /lib/x86_64-linux-gnu/ 
(0x00007f03768c9000) => /usr/lib/x86_64-linux-gnu/ 
(0x00007f0376544000) => /lib/x86_64-linux-gnu/ (0x00007f03761f9000) => /lib/x86_64-linux-gnu/ 
(0x00007f0375fe1000) => /lib/x86_64-linux-gnu/ (0x00007f0375c2b000) => /lib/x86_64-linux-gnu/ (0x00007f0375a27000) => /lib/x86_64-linux-gnu/ 
(0x00007f0375810000) => /lib/x86_64-linux-gnu/ (0x00007f03755f6000) => /lib/x86_64-linux-gnu/ 
(0x00007f03753e6000) => /lib/x86_64-linux-gnu/ (0x00007f03751c0000) => /usr/lib/x86_64-linux-gnu/ 
(0x00007f0374fae000) => /lib/x86_64-linux-gnu/ (0x00007f0374d90000)
        /lib64/ (0x00007f0378d5f000) => /lib/x86_64-linux-gnu/ (0x00007f0374b88000) => /lib/x86_64-linux-gnu/ (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)
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

Aptitude-devel mailing list

Reply via email to