Failure: The 3.0 solver produced a worse result: libcanberra-gtk3-0t64 fails to upgrade

Bug #2099966 reported by Alan Chia
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
In Progress
Undecided
Julian Andres Klode

Bug Description

Desktop popup saying system problem.

ProblemType: AptSolver
DistroRelease: Ubuntu 25.04
Package: apt 2.9.30ubuntu1
ProcVersionSignature: Ubuntu 6.12.0-15.15-generic 6.12.11
Uname: Linux 6.12.0-15-generic x86_64
ApportVersion: 2.31.0+git20250220-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
Date: Tue Feb 25 14:20:51 2025
ErrorMessage:

InstallationDate: Installed on 2024-04-03 (328 days ago)
InstallationMedia: Ubuntu 22.04.4 LTS "Jammy Jellyfish" - Release amd64 (20240220)
SourcePackage: apt
Title: Failure: The 3.0 solver produced a worse result
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Alan Chia (alanchia-1) wrote :
affects: ubuntu → apt (Ubuntu)
summary: - Probably problem with GNOME
+ Failure: The 3.0 solver produced a worse result
summary: - Failure: The 3.0 solver produced a worse result
+ Failure: The 3.0 solver produced a worse result: libcanberra-gtk3-0t64
+ fails to upgrade
Revision history for this message
Julian Andres Klode (juliank) wrote :

This has been fixed already over the last month.

Changed in apt (Ubuntu):
status: New → Fix Released
Revision history for this message
Julian Andres Klode (juliank) wrote :

Actually it wasn't, this dump simply is too old and affected by other bugs in the dumper. It seems this was the result of an `apt upgrade` but the old version did not differentiate and rendr it the same as an `apt-get upgrade`, in turn forbidding packages from being installed.

In any case I can reproduce the bug and it is sort of correct.

Changed in apt (Ubuntu):
status: Fix Released → Triaged
Changed in apt (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Julian Andres Klode (juliank)
Revision history for this message
Julian Andres Klode (juliank) wrote :

# Problem statement

The problem here is that

* Installed gnome-settings-daemon Depends: libcannbera-gtk3-0
* Installed libcanberra-gtk3-0t64 (= 0.30-10ubuntu10) Provides: libcanberra-gtk3-0
* Upgrade libcanberra-gtk3-0t64 (= 0.30-17ubuntu2) Depends: libcanberra-gtk3-0

i.e. we renamed libcanberra-gtk3-0 to libcanberra-gtk3-0t64 in noble and then back in plucky.

The solver now resolves that by expanding
  gnome-settings-daemon Depends: libcannbera-gtk3-0
to
  gnome-settings-daemon Depends: libcanberra-gtk3-0t64 (= 0.30-10ubuntu1) | libcannbera-gtk3-0 (= new version)

i.e. it prefers libcanberra-gtk3-0t64 because that is already installed. But since the new version dropped the Provides, only the old version is a valid solution.

Now when visiting the dependencies, it sees that dependency, and solves it by picking the first choice, that is keeping the old version.

# Solutions

There are two solutions to this particular instance:

(1) The upgrade for libcanberra-gtk3-0t64 is Section: olddlibs. We should not prefer oldlibs packages over other packages, that is, the dependency should have expanded to libcannbera-gtk3-0 (= new version) | libcanberra-gtk3-0t64 (= 0.30-10ubuntu1).

(2) The more complex general case is disappeared provides: If the candidate lost the Provides that satisfied the dependency before, we should consider the old version to be an "obsolete Provider", that is,
libcanberra-gtk3-0t64 is obsolete wrt providing libcannbera-gtk3-0.

I have locally implemented solution (1), but it stands to reason that (2) should be implemented too. A test case can be constructed for (2) by taking the test case for (1) and changing the section from oldlibs to something "not obsolete".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.