#1061734 aptitude: in TUI, incorrect "will be automatically removed because of dependency errors" message

Package:
aptitude
Source:
aptitude
Description:
terminal-based package manager
Submitter:
Vincent Lefevre
Date:
2024-12-17 10:27:02 UTC
Severity:
normal
#1061734#5
Date:
2024-01-29 10:20:45 UTC
From:
To:
When I choose to upgrade swig from the TUI, I get the incorrect message
------------------------------------------------------------
swig4.0 (remove, 4.1.0-0.3) will be automatically removed because of dependency
errors:
------------------------------------------------------------

with nothing else.

With more details:

I currently have

i   swig                       4.1.0-0.3                4.2.0-1

Over this line, I type '+', so that I get:

aptitude 0.8.13 @ cventin                Disk: -184 kB               DL: 1429 kB
[...]
iu  swig             +5509 kB  4.1.0-0.3                4.2.0-1

Now, I type 'g', and I get:
------------------------------------------------------------ swig (upgrade, 4.1.0-0.3 -> 4.2.0-1) will be upgraded from version 4.1.0-0.3 to version 4.2.0-1. ------------------------------------------------------------ Over the swig4.0 line, I get:
------------------------------------------------------------ swig4.0 (remove, 4.1.0-0.3) will be automatically removed because of dependency errors: ------------------------------------------------------------ with nothing else. Without any error message, this doesn't make sense. Then, when I type ':' over the swig4.0 line, this message changes to:
------------------------------------------------------------ swig4.0 (remove, 4.1.0-0.3) was installed automatically; it is being removed because all of the packages which depend upon it are being removed: * swig (upgrade, 4.1.0-0.3 -> 4.2.0-1) depends on swig4.0 (>= 4.1.0-0.3) (provided by swig4.0:i386 4.1.0-0.3) ------------------------------------------------------------ Now this is almost correct. I don't understand the ":i386". This is a configured foreign architecture on this machine, but this package is not installed: cventin:~> dpkg -l | grep swig ii swig 4.1.0-0.3 all Generate scripting interfaces to C/C++ code ii swig4.0 4.1.0-0.3 amd64 Generate scripting interfaces to C/C++ code Note that with the currently installed swig package: Package: swig Version: 4.1.0-0.3 [...] Architecture: all Replaces: swig2.0 Depends: swig4.0 (>= 4.1.0-0.3) Suggests: swig-doc, swig-examples Conflicts: swig2.0 and with the new version: Package: swig Version: 4.2.0-1 [...] Architecture: amd64 Replaces: swig4.0 Depends: libc6 (>= 2.34), libgcc-s1 (>= 3.0), libpcre2-8-0 (>= 10.22), libstdc++6 (>= 13.1) Suggests: swig-doc, swig-examples Conflicts: swig4.0
#1061734#10
Date:
2024-01-29 11:18:48 UTC
From:
To:
Note that there was a similar bug in the past (2005, fixed in 2016):

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=342835

with title:

  aptitude: "X will be automatically removed because of dependency errors:"
  then no errors shown

I cannot reproduce this issue on another machine, which doesn't have
a foreign architecture. I get just after 'g' and putting the cursor
over the swig4.0 line:
------------------------------------------------------------ swig4.0 (remove, 4.1.0-0.3) will be automatically removed because of dependency errors: * swig (upgrade, 4.1.0-0.3 -> 4.2.0-1) conflicts with swig4.0 ------------------------------------------------------------ However, AFAIK, it will be automatically removed not because of the conflict, but because the new swig package no longer depends on it (on both machines, swig4.0 is marked as automatically installed). This is a different message from