[Bug 2125393] Re: release upgrade 24.10 -> 25.04 fails: AttributeError: 'ExplodedDeb822SourceEntry' object has no attribute 'section'

Pasu Boonvisut 2125393 at bugs.launchpad.net
Wed Sep 24 09:44:51 UTC 2025


** Description changed:

  Problem Description
  
- When attempting to upgrade a system from Ubuntu 24.10 to the development
+ When attempting to upgrade a system from Ubuntu 24.10 to the current
  release of Ubuntu 25.04 using sudo do-release-upgrade, the process
  fails. The upgrader crashes with a Python AttributeError after fetching
  the new upgrade tool.
  
  The traceback indicates the error occurs in the _addSecuritySources
  method within DistUpgradeController.py, when the script attempts to
  access a .section attribute on an ExplodedDeb822SourceEntry object,
  which does not exist. This prevents the upgrade from starting.
  
  Steps to Reproduce
  
-     On a fully updated Ubuntu 24.10 system, open a terminal.
+     On a fully updated Ubuntu 24.10 system, open a terminal.
  
-     Run the command: sudo do-release-upgrade
+     Run the command: sudo do-release-upgrade
  
-     Observe the tool as it begins to run and subsequently crashes.
+     Observe the tool as it begins to run and subsequently crashes.
  
  Expected Results
  
  The release upgrader should successfully prepare the system for the
  upgrade, rewrite the package source lists, and begin the process of
  downloading and installing the new packages for Ubuntu 25.04.
  
  Actual Results
  
  The upgrade process terminates prematurely and prints the following
  Python traceback to the console:
  
  Traceback (most recent call last):
-   File "/tmp/ubuntu-release-upgrader-essb9mo7/plucky", line 8, in <module>
-     sys.exit(main())
-              ^^^^^^
-   File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeMain.py", line 235, in main
-     if app.run():
-        ^^^^^^^^^
-   File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 1965, in run
-     return self.fullUpgrade()
-            ^^^^^^^^^^^^^^^^^^
-   File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 1793, in fullUpgrade
-     if not self.updateDeb822Sources():
-            ^^^^^^^^^^^^^^^^^^^^^^^^^^
-   File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 978, in updateDeb822Sources
-     if not self.rewriteDeb822Sources():
-            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 966, in rewriteDeb822Sources
-     self._addSecuritySources()
-   File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 761, in _addSecuritySources
-     e.section['Signed-By'] = '/usr/share/keyrings/ubuntu-archive-keyring.gpg'
-     ^^^^^^^^^
+   File "/tmp/ubuntu-release-upgrader-essb9mo7/plucky", line 8, in <module>
+     sys.exit(main())
+              ^^^^^^
+   File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeMain.py", line 235, in main
+     if app.run():
+        ^^^^^^^^^
+   File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 1965, in run
+     return self.fullUpgrade()
+            ^^^^^^^^^^^^^^^^^^
+   File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 1793, in fullUpgrade
+     if not self.updateDeb822Sources():
+            ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 978, in updateDeb822Sources
+     if not self.rewriteDeb822Sources():
+            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 966, in rewriteDeb822Sources
+     self._addSecuritySources()
+   File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 761, in _addSecuritySources
+     e.section['Signed-By'] = '/usr/share/keyrings/ubuntu-archive-keyring.gpg'
+     ^^^^^^^^^
  AttributeError: 'ExplodedDeb822SourceEntry' object has no attribute 'section'
  
  Additional Information
  
  Attempting to run the upgrade non-interactively produces the same
  AttributeError.
  
  Command:
  sudo do-release-upgrade -f DistUpgradeViewNonInteractive
  
  Output:
  
  Checking for a new Ubuntu release
  Your Ubuntu release is not supported anymore.
  For upgrade information, please visit:
  http://www.ubuntu.com/releaseendoflife
  
- Get:1 Upgrade tool signature [833 B]                                    
- Get:2 Upgrade tool [965 kB]                                              
- Fetched 966 kB in 0s (0 B/s)                                              
+ Get:1 Upgrade tool signature [833 B]
+ Get:2 Upgrade tool [965 kB]
+ Fetched 966 kB in 0s (0 B/s)
  /usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherCore.py:237: Warning: W:Download is performed unsandboxed as root as file 'plucky.tar.gz.gpg' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

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

Title:
  release upgrade 24.10 -> 25.04 fails: AttributeError:
  'ExplodedDeb822SourceEntry' object has no attribute 'section'

Status in ubuntu-release-upgrader package in Ubuntu:
  Confirmed

Bug description:
  Problem Description

  When attempting to upgrade a system from Ubuntu 24.10 to the current
  release of Ubuntu 25.04 using sudo do-release-upgrade, the process
  fails. The upgrader crashes with a Python AttributeError after
  fetching the new upgrade tool.

  The traceback indicates the error occurs in the _addSecuritySources
  method within DistUpgradeController.py, when the script attempts to
  access a .section attribute on an ExplodedDeb822SourceEntry object,
  which does not exist. This prevents the upgrade from starting.

  Steps to Reproduce

      On a fully updated Ubuntu 24.10 system, open a terminal.

      Run the command: sudo do-release-upgrade

      Observe the tool as it begins to run and subsequently crashes.

  Expected Results

  The release upgrader should successfully prepare the system for the
  upgrade, rewrite the package source lists, and begin the process of
  downloading and installing the new packages for Ubuntu 25.04.

  Actual Results

  The upgrade process terminates prematurely and prints the following
  Python traceback to the console:

  Traceback (most recent call last):
    File "/tmp/ubuntu-release-upgrader-essb9mo7/plucky", line 8, in <module>
      sys.exit(main())
               ^^^^^^
    File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeMain.py", line 235, in main
      if app.run():
         ^^^^^^^^^
    File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 1965, in run
      return self.fullUpgrade()
             ^^^^^^^^^^^^^^^^^^
    File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 1793, in fullUpgrade
      if not self.updateDeb822Sources():
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 978, in updateDeb822Sources
      if not self.rewriteDeb822Sources():
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 966, in rewriteDeb822Sources
      self._addSecuritySources()
    File "/tmp/ubuntu-release-upgrader-essb9mo7/DistUpgrade/DistUpgradeController.py", line 761, in _addSecuritySources
      e.section['Signed-By'] = '/usr/share/keyrings/ubuntu-archive-keyring.gpg'
      ^^^^^^^^^
  AttributeError: 'ExplodedDeb822SourceEntry' object has no attribute 'section'

  Additional Information

  Attempting to run the upgrade non-interactively produces the same
  AttributeError.

  Command:
  sudo do-release-upgrade -f DistUpgradeViewNonInteractive

  Output:

  Checking for a new Ubuntu release
  Your Ubuntu release is not supported anymore.
  For upgrade information, please visit:
  http://www.ubuntu.com/releaseendoflife

  Get:1 Upgrade tool signature [833 B]
  Get:2 Upgrade tool [965 kB]
  Fetched 966 kB in 0s (0 B/s)
  /usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherCore.py:237: Warning: W:Download is performed unsandboxed as root as file 'plucky.tar.gz.gpg' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

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




More information about the foundations-bugs mailing list