[Bug 2076913] Re: 'DistUpgradeController' object has no attribute 'force_obsoletes'
Launchpad Bug Tracker
2076913 at bugs.launchpad.net
Tue Aug 27 10:40:13 UTC 2024
This bug was fixed in the package ubuntu-release-upgrader - 1:24.04.22
---------------
ubuntu-release-upgrader (1:24.04.22) noble; urgency=medium
[ Tobias Heider ]
* Fix typo in force_obsoletes. (LP: #2076913)
[ Nick Rosbrook ]
* DistUpgrade: handle cache key error when removing obsolete packages
(LP: #2077358)
* deb2snap: switch snap-store and firmware-updater tracks
(LP: #2077344)
* Run pre-build.sh: updating mirrors, demotions, and translations.
ubuntu-release-upgrader (1:24.04.21) noble; urgency=medium
* DistUpgradeQuirks: disable stub resolver on upgrades from jammy
(LP: #2043820)
* DistUpgrade: show a message about denied package removals
(LP: #2073278)
* data: add cryptsetup-initramfs to removal_denylist.cfg
(LP: #2067622)
* DistUpgradeQuirks: abort if system is not /usr-merged
(LP: #2058648)
* DistUpgradeQuirks: disable cloud-init on upgrade
(LP: #2075968)
* DistUpgradeQuirks: abort if rabbitmq-server installed
(LP: #2074309)
* Run pre-build.sh: updating mirrors, demotions, and translations.
ubuntu-release-upgrader (1:24.04.20) noble; urgency=medium
[ Mate Kukri ]
* DistUpgradeQuirks: make sure GRUB "cloud_style_installation" is set in cloud images (LP: #2054103)
[ Julian Andres Klode ]
* Move the actiongroup out of the obsoletes loop
* Reimplement obsolete removal with resolve_by_keep (LP: #1874272)
[ Nick Rosbrook ]
* Run pre-build.sh: updating mirrors, demotions, and translations.
-- Nick Rosbrook <enr0n at ubuntu.com> Wed, 21 Aug 2024 12:55:15 -0400
** Changed in: ubuntu-release-upgrader (Ubuntu Noble)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/2076913
Title:
'DistUpgradeController' object has no attribute 'force_obsoletes'
Status in ubuntu-release-upgrader package in Ubuntu:
Fix Released
Status in ubuntu-release-upgrader source package in Noble:
Fix Released
Bug description:
[Impact]
It looks like the latest SRU has introduced a bug in
https://git.launchpad.net/ubuntu-release-
upgrader/commit/?id=8c592abdf5047a6bd4da20dab1e444c6dcf8c842
There is a typo in s/force_obosoletes/forced_obsoletes/ which causes upgrades from noble to oracular to
fail:
File "/tmp/ubuntu-release-upgrader-l77uthwp/DistUpgrade/DistUpgradeController.py", line 1578, in doPostUpgrade
if pkgname in self.foreign_pkgs and pkgname in self.force_obsoletes:
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DistUpgradeController' object has no attribute 'force_obsoletes'. Did you mean: 'forced_obsoletes'?
[Test Plan]
This code path is only hit when some "foreign" packages are installed,
e.g. from a PPA. The best way to reproduce this is to install a
package from a PPA and then perform an upgrade. I created
https://launchpad.net/~enr0n/+archive/ubuntu/lp2076913 for convenience
in testing.
$ apt-add-repository -y ppa:enr0n/lp2076913
$ apt install -y hello
$ do-release-upgrade -d
On an affected system, the AttributeError would be shown during the
searching for obsoletes stage. One should confirm that some "foreign"
packages were logged, otherwise the code path would not be taken:
$ grep "Foreign" /var/log/dist-upgrade/main.log
[Where problems could occur]
The patch changes the typo self.force_obsoletes to the correct
self.forced_obsoletes. Another typo would lead to the same problem!
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2076913/+subscriptions
More information about the foundations-bugs
mailing list