[Bug 1827741] Re: APT::Default-Release breaks distribution upgrade
Matthijs Kooijman
1827741 at bugs.launchpad.net
Sun Aug 16 12:53:14 UTC 2020
This is still a problem: I wanted to upgrade from eoan to focal and
forgot about this bug, so the upgrade failed again (I think it actually
crashed this time, the GUI window disappeared, but I accidentally
dismissed the "send report" prompt, so I'm not sure how exactly).
It seems the pattern is still the same: The source.list is rewritten
from eoan to focal, Default-Release is unchanged, so subsequent apt
operations fail. If I then remove the Default-Release and retry to retry
the upgrade with `update-manager -c`, that seems to block indefinitely
at some step, even before it offers to upgrade to focal.
Reverting the sources.list changes from focal to eoan *and* removing
Default-Release does allow the upgrade to be started again (like the
last time).
I just noticed that when you have insufficient disk space, the upgrade
procedure correctly reverts the changes made to sources.list. If this
would also happen with a Default-Release-based failure, then at least
recovery would be a lot easier (so this is actually a second, separate
problem).
--
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/1827741
Title:
APT::Default-Release breaks distribution upgrade
Status in ubuntu-release-upgrader package in Ubuntu:
New
Bug description:
I just tried to upgrade my Ubuntu system from cosmic to disco, but it
seems the presence of the Default-Release configuration value breaks
the upgrade.
I have some Debian sources in my sources.list so I can occasionally
cherry-pick packages from there. To make sure these are not by
default, I created a /etc/apt/apt.conf.d/10default-release file
containing:
APT::Default-Release "cosmic";
When doing the actual upgrade (through `update-manager -c`, but that
probably started something else in the background), I get the
following output in the terminal:
```
Checking for a new Ubuntu release [25/498]
/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcher.py:23: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('
Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk, Gdk
/usr/lib/python3/dist-packages/DistUpgrade/ReleaseNotesViewerWebkit.py:33: PyGIWarning: WebKit2 was imported without specifying a version first. Use gi.require
_version('WebKit2', '4.0') before import to ensure that the right version gets loaded.
from gi.repository import WebKit2 as WebKit
authenticate 'disco.tar.gz' against 'disco.tar.gz.gpg'
extracting 'disco.tar.gz'
The AppStream system cache was updated, but some errors were detected, which might lead to missing metadata. Refer to the verbose log for more information.
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-3aipsq2r/disco", line 8, in <module>
sys.exit(main())
File "/tmp/ubuntu-release-upgrader-3aipsq2r/DistUpgrade/DistUpgradeMain.py", line 238, in main
if app.run():
File "/tmp/ubuntu-release-upgrader-3aipsq2r/DistUpgrade/DistUpgradeController.py", line 2086, in run
return self.fullUpgrade()
File "/tmp/ubuntu-release-upgrader-3aipsq2r/DistUpgrade/DistUpgradeController.py", line 1947, in fullUpgrade
self.openCache(restore_sources_list_on_fail=True)
File "/tmp/ubuntu-release-upgrader-3aipsq2r/DistUpgrade/DistUpgradeController.py", line 215, in openCache
return self._openCache(lock)
File "/tmp/ubuntu-release-upgrader-3aipsq2r/DistUpgrade/DistUpgradeController.py", line 243, in _openCache
lock)
File "/tmp/ubuntu-release-upgrader-3aipsq2r/DistUpgrade/DistUpgradeCache.py", line 140, in __init__
apt.Cache.__init__(self, progress)
File "/usr/lib/python3/dist-packages/apt/cache.py", line 138, in __init__
self.open(progress)
File "/usr/lib/python3/dist-packages/apt/cache.py", line 198, in open
self._cache = apt_pkg.Cache(progress)
apt_pkg.Error: E:The value 'cosmic' is invalid for APT::Default-Release as such a release is not available in the sources
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/problem_report.py", line 497, in add_to_existing
self.write(f)
File "/usr/lib/python3/dist-packages/problem_report.py", line 450, in write
block = f.read(1048576)
File "/usr/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
Original exception was:
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-3aipsq2r/disco", line 8, in <module>
sys.exit(main())
File "/tmp/ubuntu-release-upgrader-3aipsq2r/DistUpgrade/DistUpgradeMain.py", line 238, in main
if app.run():
File "/tmp/ubuntu-release-upgrader-3aipsq2r/DistUpgrade/DistUpgradeController.py", line 2086, in run
return self.fullUpgrade()
File "/tmp/ubuntu-release-upgrader-3aipsq2r/DistUpgrade/DistUpgradeController.py", line 1947, in fullUpgrade
self.openCache(restore_sources_list_on_fail=True)
File "/tmp/ubuntu-release-upgrader-3aipsq2r/DistUpgrade/DistUpgradeController.py", line 215, in openCache
return self._openCache(lock)
File "/tmp/ubuntu-release-upgrader-3aipsq2r/DistUpgrade/DistUpgradeController.py", line 243, in _openCache
lock)
File "/tmp/ubuntu-release-upgrader-3aipsq2r/DistUpgrade/DistUpgradeCache.py", line 140, in __init__
apt.Cache.__init__(self, progress)
File "/usr/lib/python3/dist-packages/apt/cache.py", line 138, in __init__
self.open(progress)
File "/usr/lib/python3/dist-packages/apt/cache.py", line 198, in open
self._cache = apt_pkg.Cache(progress)
apt_pkg.Error: E:The value 'cosmic' is invalid for APT::Default-Release as such a release is not available in the sources
```
In the GUI, I got a a fairly non-descript "there was a problem" popup,
which offered to report a bug / send info to developers, which I did
(but this just happened in the background, no clue where the info
went).
Ideally, this Apt config value would be updated during the update (at
the same time when the sources.list is updated). Alternatively, they
could perhaps be disabled (just like it already disables unsupported
sources such as my debian sources.list entries)?
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1827741/+subscriptions
More information about the foundations-bugs
mailing list