do-release-upgrade crashed with KeyError in __getitem__(): "The cache has no package named 'python-is-python2'"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-release-upgrader (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Brian Murray |
Bug Description
[Impact]
Users with universe not enabled and python2 packages installed are unable to upgrade from Ubuntu 18.04 to Ubuntu 20.04.
[Test Plan]
-----------
On an Ubuntu 18.04 system with universe and multiverse disabled
1) apt-get install duplicity (it depends on python2.7)
2) run do-release-upgrade
Observe the upgrader hang at Calculating the changes (in text mode) kill it and observe a Traceback in /var/log/
...
File "/usr/lib/
raise KeyError('The cache has no package named %r' % key)
KeyError: "The cache has no package named 'python-
With the version of the release-upgrader from -proposed (do-release-upgrade -p) you'll instead receive a message regarding universe not being enabled and the need to either remove python2 packages or enable universe.
[Where problems could occur]
The switch to using the finally clause in DistUpgradeCache.py is a significant (albeit safe) change but it is necessary for the error message to actually be displayed. So it'd make sense to run through a whole release upgrade to ensure that the gui behaves normally.
[Original Description]
This is because python-minimal was installed and universe was not enabled on the system being upgraded.
Error Tracker buckets:
https:/
https:/
ProblemType: CrashDistroRelease: Ubuntu 20.04
Package: ubuntu-
ProcVersionSign
Uname: Linux 5.4.0-71-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.23
Architecture: amd64
CrashDB: ubuntu
Date: Thu Apr 15 10:59:53 2021
ExecutablePath: /usr/bin/
ExecutableTimes
InstallationDate: Installed on 2021-04-13 (1 days ago)
InstallationMedia: Ubuntu 18.04.5 LTS "Bionic Beaver" - Release amd64 (20200806.1)
InterpreterPath: /usr/bin/python3.6
PackageArchitec
ProcCmdline: /usr/bin/python3 -s ./focal --frontend DistUpgradeViewText
ProcCwd: /tmp/ubuntu-
ProcEnviron:
TERM=screen
SHELL=/bin/bash
LANG=en_US.UTF-8
LC_CTYPE=
PATH=(custom, no user)
Python3Details: /usr/bin/python3.6, Python 3.6.9, python3-minimal, 3.6.7-1~18.04
PythonArgs: ['/usr/
PythonDetails: /usr/bin/python2.7, Python 2.7.17, python-minimal, 2.7.15~
Title: do-release-upgrade crashed with KeyError in __getitem__(): "The cache has no package named 'python-
UpgradeStatus: Upgraded to bionic on 2021-04-15 (0 days ago)
description: | updated |
tags: | added: rls-ff-incoming |
tags: | added: fr-1330 |
tags: | removed: rls-ff-incoming |
Changed in ubuntu-release-upgrader (Ubuntu Focal): | |
assignee: | nobody → Brian Murray (brian-murray) |
status: | New → In Progress |
description: | updated |
description: | updated |
The error messaging in this scenario should be more informative.