upgrades fail when package in ForcedObsoletes does not exist
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-release-upgrader (Ubuntu) |
Fix Released
|
High
|
Nick Rosbrook | ||
Noble |
Fix Released
|
High
|
Nick Rosbrook |
Bug Description
[Impact]
With ubuntu-
2024-08-19 14:48:13,087 ERROR not handled exception:
Traceback (most recent call last):
File "/usr/lib/
# It might be excluded due to not having a version or something
KeyError: 'gnome-app-install'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/
sys.
File "/home/
if app.run():
File "/home/
return self.fullUpgrade()
File "/home/
self.
File "/home/
if not self.cache[
File "/usr/lib/
raise KeyError("The cache has no package named %r" % key)
KeyError: "The cache has no package named 'gnome-
This is because the new forced obsoletes code does not handle key errors with the cache.
[Test Plan]
The simplest way to test this is doing an upgrade of Ubuntu Desktop, because the DistUpgrade.cfg has a ForceObsoletes= section for `ubuntu-desktop` that contains at least one package that no longer exists in the archive.
$ do-release-upgrade -d
The upgrade should succeed past the "removing obsoletes" section.
[Where problems could occur]
The patch here is to check for the package name as a key in the cache before attempting to access it. Any more problems would be contained in the "searching/removing obsoletes" logic.
Related branches
- 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/[email protected] (+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 |
Changed in ubuntu-release-upgrader (Ubuntu Noble): | |
importance: | Undecided → High |
Changed in ubuntu-release-upgrader (Ubuntu): | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in ubuntu-release-upgrader (Ubuntu Noble): | |
status: | New → Triaged |
assignee: | nobody → Nick Rosbrook (enr0n) |
Changed in ubuntu-release-upgrader (Ubuntu): | |
assignee: | nobody → Nick Rosbrook (enr0n) |
tags: | added: foundations-todo |
Changed in ubuntu-release-upgrader (Ubuntu Noble): | |
status: | Triaged → In Progress |
Hello Nick, or anyone else affected,
Accepted ubuntu- release- upgrader into noble-proposed. The package will build now and be available at https:/ /launchpad. net/ubuntu/ +source/ ubuntu- release- upgrader/ 1:24.04. 22 in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification- needed- noble to verification- done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed- noble. In either case, without details of your testing we will not be able to proceed.
Further information regarding the verification process can be found at https:/ /wiki.ubuntu. com/QATeam/ PerformingSRUVe rification . Thank you in advance for helping!
N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.