Public bug reported:

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)?

** Affects: ubuntu-release-upgrader (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1827741

Title:
  APT::Default-Release breaks distribution upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1827741/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to