Apt deletes ubuntu-desktop during dist-upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Fix Released
|
Critical
|
Julian Andres Klode | ||
Jammy |
Fix Released
|
Critical
|
Unassigned | ||
Kinetic |
Won't Fix
|
Undecided
|
Unassigned | ||
Lunar |
Fix Released
|
Critical
|
Unassigned | ||
Mantic |
Fix Released
|
Critical
|
Julian Andres Klode |
Bug Description
[Impact]
gnome-shell gets removed on upgrades of gnome-shell and mutter if due to phasing we can only upgrade src:gnome-shell.
[Test plan]
This adds a minimal test case to the test suite that reproduced the issue and verifies the fix, test plan consists of the autopkgtests.
[Where problems could occur]
We could see a resurgence of bugs like LP#1990586 where the solver failed to run at all because things got too complex, however this is a bit more unlikely as we now use the by-keep resolver to handle rolling back phased updates.
We also saw an issue with a phased update's dependencies being installed despite the phased update being hold back. We saw that both before in `apt upgrade` and with the fix for this bug, we also introduced it to `dist-upgrade`, but this is also fixed and tested in these uploads, basically we skip marking for install (which in turn caused me to discover we need to check a different version).
[Other Info]
gnome-shell Depends: gnome-shell-common (= ${binary-Version), mutter (>= matching)
So when mutter cannot be updated due to phasing, gnome-shell becomes non-installable, but gnome-shell-common can be updated, so APT decided to remove gnome-shell and the meta packages in its infinite wisdom.
The fix addresses this by resolving the dist-upgrade as if there were no phasing, and then retroactively marks phases for keep and then anything broken by that for keep.
This required some restructuring because normally we'd also keep broken Recommends back, but here dist-upgrade may have decided that was ok, so we need to build an allowlist of where Recommends can be broken to avoid undoing unrelated changes.
[Original bug report]
This morning I got surprised by my laptop booting to a tty instead of a desktop environment. It turned out that the entire desktop environment was no longer present on my machine. Doing an apt install ubuntu-
The machine had been running for a while. Looking at the apt logs, it looks like apt deleted ubuntu-desktop on its own during a dist-upgrade a couple of weeks back.
Start-Date: 2023-06-08 14:20:46
Commandline: apt dist-upgrade
Requested-By: alex (1000)
Upgrade: gnome-shell-
Remove: gnome-shell:amd64 (44.0-2ubuntu3), ubuntu-
End-Date: 2023-06-08 14:20:48
I'm using the following version of Ubuntu:
Distributor ID: Ubuntu
Description: Ubuntu 23.04
Release: 23.04
Codename: lunar
Changed in apt (Ubuntu): | |
status: | Incomplete → Triaged |
importance: | Undecided → Critical |
description: | updated |
tags: | added: foundations-todo |
description: | updated |
description: | updated |
Changed in apt (Ubuntu Kinetic): | |
status: | New → Won't Fix |
Changed in apt (Ubuntu Lunar): | |
status: | New → Triaged |
Changed in apt (Ubuntu Jammy): | |
status: | New → Triaged |
Changed in apt (Ubuntu Jammy): | |
status: | Triaged → In Progress |
Changed in apt (Ubuntu Lunar): | |
status: | Triaged → In Progress |
Changed in apt (Ubuntu Jammy): | |
importance: | Undecided → Critical |
Changed in apt (Ubuntu Lunar): | |
importance: | Undecided → Critical |
tags: | removed: foundations-todo |
Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https:/ /wiki.ubuntu. com/Bugs/ FindRightPackag e. You might also ask for help in the #ubuntu-bugs irc channel on Libera.chat.
To change the source package that this bug is filed about visit https:/ /bugs.launchpad .net/ubuntu/ +bug/2025462/ +editstatus and add the package name in the text box next to the word Package.
[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]