ubuntu-release-upgrader crashed with KeyError: "The cache has no package named 'ubuntu-desktop'"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
High
|
Canonical Foundations Team | ||
ubuntu-release-upgrader (Ubuntu) |
Fix Released
|
High
|
Brian Murray | ||
Bionic |
Fix Released
|
High
|
Brian Murray |
Bug Description
Description
-----------
For s390x there is no ubuntu-desktop package and the quirk to install snaps will crash as it expects there to be an ubuntu-desktop package in the cache.
Test Case
---------
On an s390x system the test case is just to try the upgrade from Ubuntu 16.04 to Ubuntu 18.04. However, to test the new version of the upgrader you'll need to use 'do-release-upgrade -p'. On an amd64 system its way more convoluted but easier for me to test.
1) Run 'do-release-
2) Choose not to upgrade
3) cd to /tmp/ubuntu-
4) modify DistUpgradeQuir
import ipdb; ipdb.set_trace()
cache.open()
5) run the upgrader again 'sudo ./bionic --frontend DistUpgradeView
6) when the upgrade pauses you'll need to hack the amd64_Packages and i386_Packages files in /var/lib/apt/lists/ so that the ubuntu-desktop package isn't there. You should also remove ubuntu-desktop from /var/lib/
7) Press c to continue the upgrade
8) You should see a crash now
With the version of the release upgrader from -proposed you will not get a crash and will see "package required for Quirk not in cache" in /var/log/
Regression Potential
-------
None really, ensuring that the package was in the cache should have been done earlier.
Original Description
-------
The Ubuntu Error Tracker has been receiving reports about a problem regarding ubuntu-
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://
Related branches
tags: | added: architecture-s39064 bugnameltc-170884 severity-high targetmilestone-inin1804 |
Changed in ubuntu-z-systems: | |
importance: | Undecided → High |
Changed in ubuntu-release-upgrader (Ubuntu): | |
status: | Confirmed → In Progress |
importance: | Undecided → High |
assignee: | nobody → Brian Murray (brian-murray) |
Changed in ubuntu-z-systems: | |
status: | Confirmed → In Progress |
tags: | added: id-5b846d495b0b2662342c5dc7 |
Changed in ubuntu-release-upgrader (Ubuntu Bionic): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Brian Murray (brian-murray) |
description: | updated |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
Here's the Traceback:
Traceback (most recent call last): python3/ dist-packages/ apt/cache. py", line 194, in __getitem__ python3. 5/weakref. py", line 131, in __getitem__
File "/usr/lib/
return self._weakref[key]
File "/usr/lib/
o = self.data[key]()
KeyError: 'ubuntu-desktop'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): python3/ dist-packages/ apt/cache. py", line 198, in __getitem__
File "/usr/lib/
rawpkg = self._cache[key]
KeyError: 'ubuntu-desktop'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): release- upgrader- wtsb6vse/ bionic" , line 8, in <module> exit(main( )) release- upgrader- wtsb6vse/ DistUpgrade/ DistUpgradeMain .py", line 238, in main release- upgrader- wtsb6vse/ DistUpgrade/ DistUpgradeCont roller. py", line 2017, in run release- upgrader- wtsb6vse/ DistUpgrade/ DistUpgradeCont roller. py", line 1863, in fullUpgrade ialUpdate( ): release- upgrader- wtsb6vse/ DistUpgrade/ DistUpgradeCont roller. py", line 894, in doPostInitialUpdate quirks. run("PostInitia lUpdate" ) release- upgrader- wtsb6vse/ DistUpgrade/ DistUpgradeQuir ks.py", line 113, in run release- upgrader- wtsb6vse/ DistUpgrade/ DistUpgradeQuir ks.py", line 132, in bionicPostIniti alUpdate .cache[ 'ubuntu- desktop' ].is_installed and \ python3/ dist-packages/ apt/cache. py", line 200, in __getitem__
File "/tmp/ubuntu-
sys.
File "/tmp/ubuntu-
if app.run():
File "/tmp/ubuntu-
return self.fullUpgrade()
File "/tmp/ubuntu-
if not self.doPostInit
File "/tmp/ubuntu-
self.
File "/tmp/ubuntu-
func()
File "/tmp/ubuntu-
if self.controller
File "/usr/lib/
raise KeyError('The cache has no package named %r' % key)
KeyError: "The cache has no package named 'ubuntu-desktop'"
It's seems strange that 'ubuntu-desktop' wouldn't exist in the cache but there you go.