[Bug 1827741] Re: APT::Default-Release breaks distribution upgrade

Matthijs Kooijman matthijs at stdin.nl
Thu Jan 30 12:48:31 UTC 2020


This is still an issue: Just started the disco -> eoan upgrade through
the GUI prompt I got, which broke on, I think, the second step (setting
up software sources IIRC). A systray icon showed up saying there was a
problem with the package manager (saying 'disco', which I have now
configured as the default-release, is not a valid distribution).

What seems to have happened is the sources.list was updated, replacing
disco with eoan sources, breaking because the default-release is no
longer available. I tried updating the default-release afterwards, so my
system now shows a lot of pending package updates, but I cannot retry
the release upgrade since there are pending updates.

Instead, I reverted the changes to sources.list (replacing eoan with
disco again), removed my default-release, which allowed starting the
release upgrade process again and now actually started the upgrade.

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