[Aptitude-devel] Bug#1064969: apt: can't upgrade with aptitude

Vincent Lefevre vincent at vinc17.net
Wed Feb 28 17:32:20 GMT 2024


On 2024-02-28 17:28:51 +0100, Sven Joachim wrote:
> On 2024-02-28 15:49 +0100, Vincent Lefevre wrote:
> > So, I suppose that this is also the case for aptitude: if aptitude
> > cannot upgrade just because of a rename, then this is a problem in
> > the involved packages.
> 
> No, in this case it is a problem with aptitude's resolver which
> manifests itself due to the following configuration setting:
> 
> > Aptitude::ProblemResolver::SolutionCost "safety, removals";
> 
> This does cause aptitude to hold apt back by default, rather than
> remove libapt-pkg6.0.

The goal of this configuration setting (which was given in the
debian-user list in the past) was to prevent aptitude from removing
packages with no replacement (e.g. firefox, libreoffice, and so on).
Here, the libapt-pkg6.0 package has been renamed. I hope that you
can understand that this is a completely different situation.

> You can press 'n' at the prompt, the next solution aptitude then
> suggests is to upgrade apt.

OK, but it appears that now, there are *many* other packages in
a similar situation, and sometimes, aptitude wants to remove a
potentially important package (see below). The resolution should
be automatic in case of package rename.

# aptitude install libglib2.0-dev
The following packages will be REMOVED:
  libglib2.0-dev-bin{u}
The following packages will be upgraded:
  libglib2.0-data libglib2.0-dev{b}
2 packages upgraded, 0 newly installed, 1 to remove and 61 not upgraded.
Need to get 2865 kB of archives. After unpacking 716 kB will be freed.
The following packages have unmet dependencies:
 libglib2.0-dev : Depends: libglib2.0-0t64 (= 2.78.4-2) but it is not going to be installed
                  Depends: libglib2.0-bin (= 2.78.4-2) but 2.78.4-1 is installed and it is kept back
                  Depends: libglib2.0-dev-bin (= 2.78.4-2) but it is not going to be installed
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     libglib2.0-dev [2.78.4-1 (now, testing)]
2)     libglib2.0-dev-bin [2.78.4-1 (now, testing)]

Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

     Remove the following packages:
1)     libglib2.0-0 [2.78.4-1 (now, testing, unstable)]
2)     libglib2.0-0:i386 [2.78.4-1 (now, testing, unstable)]
3)     libglib2.0-bin [2.78.4-1 (now, testing)]

     Install the following packages:
4)     libglib2.0-0t64 [2.78.4-2 (unstable)]
5)     libglib2.0-0t64:i386 [2.78.4-2 (unstable)]
6)     libglib2.0-bin:i386 [2.78.4-2 (unstable)]

     Upgrade the following packages:
7)     libglib2.0-dev-bin [2.78.4-1 (now, testing) -> 2.78.4-2 (unstable)]

AFAIK, replacing libglib2.0-bin by libglib2.0-bin:i386 is not
equivalent.

With an explicit package list, aptitude immediately gives an
acceptable solution:

$ aptitude install -s libglib2.0-dev libglib2.0-bin libglib2.0-dev-bin libglib2.0-0t64 libglib2.0-0t64:i386
The following NEW packages will be installed:
  libglib2.0-0t64 libglib2.0-0t64:i386 
The following packages will be REMOVED:
  libglib2.0-0{a} libglib2.0-0:i386{a} 
The following packages will be upgraded:
  libglib2.0-bin libglib2.0-data libglib2.0-dev libglib2.0-dev-bin 

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



More information about the Aptitude-devel mailing list