Upgrading from jammy to noble results in a linux-headers package being in a broken state
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
New
|
Undecided
|
Julian Andres Klode | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Noble |
New
|
Undecided
|
Julian Andres Klode | ||
linux-aws (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Jammy |
New
|
Undecided
|
Unassigned | ||
Noble |
New
|
Undecided
|
Unassigned | ||
linux-gcp (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Jammy |
New
|
Undecided
|
Unassigned | ||
Noble |
New
|
Undecided
|
Unassigned | ||
ubuntu-release-upgrader (Ubuntu) |
Fix Released
|
Undecided
|
Julian Andres Klode | ||
Noble |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
(For APT SRU versioning, see https:/
[Impact]
Obsolete packages can be removed despite still having reverse dependencies installed, for example:
Now that 24.04.1 has been released, 22.04 users are encouraged to upgrade to 24.04 via the `do-release-
Upgrading and later rebooting a jammy GCP instance results in `linux-
```
$ sudo apt install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
```
`linux-
```
$ apt-cache rdepends linux-headers-
linux-headers-
Reverse Depends:
linux-
$ apt-cache rdepends linux-image-
linux-image-
Reverse Depends:
```
Running `apt --fix-broken install` resolves the error.
```
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
linux-
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 27.9 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 83770 files and directories currently installed.)
Removing linux-headers-
$ sudo apt install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
```
This issue was also observed after upgrading a jammy AWS instance to noble.
```
$ sudo apt install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
```
[Test plan]
## Jammy APT verification
To prepare the VMs, follow the following scheme:
$ lxc launch ubuntu:jammy jammy-to-noble --vm
If using lxc shell or exec to connect to it, also perform the step below:
$ lxc exec jammy-to-noble apt-mark lxd-agent-launcher # otherwise it resets
On this jammy VM, edit /etc/update-
If this test run is meant to test the fix, then at this point you should install apt from jammy proposed. Otherwise, continue directly with the release upgrade.
Then to continue with the test, proceed to the release upgrade:
$ sudo do-release-upgrade
Check that currently booted linux-headers- are *not* removed as obsolete.
After the reboot at the end, in the rebooted system, issue:
$ sudo apt upgrade
With the bug present, you will get an error like this:
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
## Noble APT verification
To validate the APT change on noble, we must rely on the test suite as we won't have a noble->oracular upgrade bug causing it, most likely.
To validate an ubuntu-
ubuntu@
ubuntu@
[Where problems could occur: APT SRU]
For the APT change, the function in question is used in a small number of places:
In APT library:
- In the `upgrade` command and library function. Removals are already undone there before calling it so we never reach the new code path.
- In the phased update implementation, during dist-upgrade. I expect a failure is lurking there that is fixed by this, but I haven't been able to write a reproducer to trigger it just yet.
In aptitude:
- The function is wrapped, but the wrapper never called
In QApt:
- QApt seems to rely on it for upgrading and doesn't seem to have any error checking of the return value. I expect it will read the error
[Where problems could occur: u-r-u SRU]
Upgrades will now result in a consistent state, but may spend hours searching for obsolete software again.
Related branches
- Nick Rosbrook: Approve
-
Diff: 116 lines (+42/-16)2 files modifiedDistUpgrade/DistUpgradeCache.py (+13/-7)
DistUpgrade/DistUpgradeController.py (+29/-9)
- Ubuntu Core Development Team: Pending requested
-
Diff: 182867 lines (+99305/-0) (has conflicts)134 files modifiedDistUpgrade/DistUpgradeCache.py (+5/-0)
DistUpgrade/DistUpgradeController.py (+27/-0)
DistUpgrade/DistUpgradeQuirks.py (+359/-0)
DistUpgrade/DistUpgradeVersion.py (+4/-0)
DistUpgrade/deb2snap.json (+8/-0)
data/mirrors.cfg (+496/-0)
debian/changelog (+60/-0)
po/af.po (+820/-0)
po/am.po (+779/-0)
po/an.po (+756/-0)
po/ar.po (+791/-0)
po/ast.po (+808/-0)
po/az.po (+753/-0)
po/be.po (+798/-0)
po/bg.po (+790/-0)
po/bn.po (+789/-0)
po/bo.po (+774/-0)
po/br.po (+778/-0)
po/bs.po (+799/-0)
po/ca.po (+808/-0)
po/ca@valencia.po (+780/-0)
po/ce.po (+754/-0)
po/ceb.po (+751/-0)
po/ckb.po (+752/-0)
po/crh.po (+789/-0)
po/cs.po (+818/-0)
po/csb.po (+759/-0)
po/cv.po (+752/-0)
po/cy.po (+780/-0)
po/da.po (+821/-0)
po/de.po (+828/-0)
po/dv.po (+752/-0)
po/el.po (+812/-0)
po/en_AU.po (+798/-0)
po/en_CA.po (+799/-0)
po/en_GB.po (+816/-0)
po/eo.po (+797/-0)
po/es.po (+825/-0)
po/et.po (+773/-0)
po/eu.po (+798/-0)
po/fa.po (+753/-0)
po/fi.po (+821/-0)
po/fil.po (+757/-0)
po/fo.po (+753/-0)
po/fr.po (+828/-0)
po/fr_CA.po (+824/-0)
po/fur.po (+754/-0)
po/fy.po (+754/-0)
po/ga.po (+751/-0)
po/gd.po (+809/-0)
po/gl.po (+823/-0)
po/gu.po (+752/-0)
po/gv.po (+752/-0)
po/he.po (+807/-0)
po/hi.po (+774/-0)
po/hr.po (+821/-0)
po/hu.po (+807/-0)
po/hy.po (+752/-0)
po/ia.po (+814/-0)
po/id.po (+787/-0)
po/is.po (+770/-0)
po/it.po (+820/-0)
po/ja.po (+806/-0)
po/jv.po (+751/-0)
po/ka.po (+754/-0)
po/kk.po (+777/-0)
po/km.po (+794/-0)
po/kn.po (+752/-0)
po/ko.po (+796/-0)
po/ku.po (+804/-0)
po/ky.po (+751/-0)
po/lb.po (+752/-0)
po/ln.po (+751/-0)
po/lo.po (+751/-0)
po/lt.po (+791/-0)
po/lv.po (+800/-0)
po/mhr.po (+751/-0)
po/mjw.po (+751/-0)
po/mk.po (+754/-0)
po/ml.po (+754/-0)
po/mn.po (+753/-0)
po/mnw.po (+752/-0)
po/mr.po (+769/-0)
po/ms.po (+799/-0)
po/mus.po (+751/-0)
po/my.po (+752/-0)
po/nb.po (+803/-0)
po/nds.po (+753/-0)
po/ne.po (+752/-0)
po/nl.po (+807/-0)
po/nn.po (+771/-0)
po/oc.po (+805/-0)
po/om.po (+751/-0)
po/pa.po (+754/-0)
po/pam.po (+751/-0)
po/pl.po (+801/-0)
po/ps.po (+751/-0)
po/pt.po (+817/-0)
po/pt_BR.po (+806/-0)
po/qu.po (+751/-0)
po/ro.po (+809/-0)
po/ru.po (+815/-0)
po/rw.po (+751/-0)
po/sc.po (+752/-0)
po/sco.po (+754/-0)
po/sd.po (+751/-0)
po/se.po (+751/-0)
po/shn.po (+751/-0)
po/si.po (+753/-0)
po/sk.po (+800/-0)
po/sl.po (+800/-0)
po/sq.po (+803/-0)
po/sr.po (+806/-0)
po/sv.po (+811/-0)
po/szl.po (+803/-0)
po/ta.po (+752/-0)
po/ta_LK.po (+751/-0)
po/te.po (+755/-0)
po/tg.po (+765/-0)
po/th.po (+790/-0)
po/tl.po (+756/-0)
po/tr.po (+803/-0)
po/ubuntu-release-upgrader.pot (+751/-0)
po/ug.po (+803/-0)
po/uk.po (+817/-0)
po/ur.po (+752/-0)
po/uz.po (+753/-0)
po/vi.po (+794/-0)
po/xh.po (+751/-0)
po/zh_CN.po (+784/-0)
po/zh_HK.po (+783/-0)
po/zh_TW.po (+798/-0)
po/zu.po (+751/-0)
tests/test_quirks.py (+158/-0)
description: | updated |
description: | updated |
tags: | added: rls-nn-incoming |
Changed in ubuntu-release-upgrader (Ubuntu): | |
status: | Incomplete → Triaged |
assignee: | nobody → Julian Andres Klode (juliank) |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
This is missing the /var/log/ dist-upgrade information, commonly collected by ubuntu-bug ubuntu- release- upgrader