#979741 aptitude: silently breaks unsatisfiable versioned "Recommends:" when upgrading a package

Package:
aptitude
Source:
aptitude
Description:
terminal-based package manager
Submitter:
Vincent Lefevre
Date:
2021-01-10 23:57:03 UTC
Severity:
important
#979741#5
Date:
2021-01-10 23:44:22 UTC
From:
To:
On some machine, when upgrading packages from the TUI, two packages were
automatically selected for removal (libcompress-raw-lzma-perl:amd64,
libio-compress-lzma-perl:amd64). I thought that this was because they
were no longer used, as usual (since I hadn't got any warning), and I
proceeded.

But then I wondered why some Perl module was no longer available.
So I looked at libio-compress-perl, which got upgraded, and I saw:

Depends: perl:any, libcompress-raw-bzip2-perl (>= 2.100), libcompress-raw-zlib-perl (>= 2.100)
Recommends: libio-compress-lzma-perl (>= 2.100)

So it still recommends libio-compress-lzma-perl, and this recommendation
has silently been broken!
--------

Now, on this machine, where I haven't upgraded yet, I can reproduce
the bug:

cventin:~> aptitude install -s libio-compress-perl
The following packages will be REMOVED:
  libcompress-raw-lzma-perl{u} libio-compress-lzma-perl{u}
The following packages will be upgraded:
  libcompress-raw-bzip2-perl libcompress-raw-zlib-perl libio-compress-perl
3 packages upgraded, 0 newly installed, 2 to remove and 241 not upgraded.
Need to get 321 kB of archives. After unpacking 373 kB will be freed.

and ditto from the TUI when I type '+' over libio-compress-perl,
then 'g' (no warnings).

cventin:~> apt-show-versions -a libio-compress-perl
libio-compress-perl:all 2.096-1 install ok installed
libio-compress-perl:all 2.084-1 stable   ftp.fr.debian.org
No stable-updates version
libio-compress-perl:all 2.096-1 testing  ftp.fr.debian.org
libio-compress-perl:all 2.100-1 unstable ftp.fr.debian.org
No experimental version
libio-compress-perl:all/testing 2.096-1 upgradeable to 2.100-1

cventin:~> apt-show-versions -a libio-compress-lzma-perl
libio-compress-lzma-perl:all 2.096-1 install ok installed
libio-compress-lzma-perl:all 2.084-1 stable   ftp.fr.debian.org
No stable-updates version
libio-compress-lzma-perl:all 2.096-1 testing  ftp.fr.debian.org
libio-compress-lzma-perl:all 2.096-1 unstable ftp.fr.debian.org
No experimental version
libio-compress-lzma-perl:all/testing 2.096-1 uptodate

and the dependencies:

Package: libio-compress-perl
Version: 2.096-1
Installed-Size: 873
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Architecture: all
Depends: perl:any, libcompress-raw-bzip2-perl (>= 2.096), libcompress-raw-zlib-perl (>= 2.096)
Recommends: libio-compress-lzma-perl (>= 2.096)

Package: libio-compress-perl
Version: 2.100-1
Installed-Size: 874
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Architecture: all
Depends: perl:any, libcompress-raw-bzip2-perl (>= 2.100), libcompress-raw-zlib-perl (>= 2.100)
Recommends: libio-compress-lzma-perl (>= 2.100)

cventin:~> aptitude why libio-compress-lzma-perl
i   libnet-async-http-perl Recommends libcompress-bzip2-perl
i A libcompress-bzip2-perl Recommends libio-compress-perl (>= 2.094)
i A libio-compress-perl    Recommends libio-compress-lzma-perl (>= 2.096)

Note that libio-compress-lzma-perl 2.100 is not available yet,
which may be the cause of the bug.

I have the following settings:

Aptitude::UI::Package-Display-Format "%c%a%M %p %Z %24v %24V";

Aptitude::UI::Styles {
  // Add bold to avoid a readability issue.
  SolutionActionApproved { fg white; bg green; set bold; };
};

Aptitude::ProblemResolver::SolutionCost "safety, removals";