[Bug 2077358] [NEW] upgrades fail when package in ForcedObsoletes does not exist
    Nick Rosbrook 
    2077358 at bugs.launchpad.net
       
    Mon Aug 19 19:50:14 UTC 2024
    
    
  
Public bug reported:
With ubuntu-release-upgrader in noble-proposed, I get the following
error when upgrading Ubuntu Desktop:
2024-08-19 14:48:13,087 ERROR not handled exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 281, in __getitem__
    # It might be excluded due to not having a version or something
KeyError: 'gnome-app-install'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/nr/24.04.22/./noble", line 8, in <module>
    sys.exit(main())
  File "/home/nr/24.04.22/DistUpgrade/DistUpgradeMain.py", line 241, in main
    if app.run():
  File "/home/nr/24.04.22/DistUpgrade/DistUpgradeController.py", line 2639, in run
    return self.fullUpgrade()
  File "/home/nr/24.04.22/DistUpgrade/DistUpgradeController.py", line 2615, in fullUpgrade
    self.doPostUpgrade()
  File "/home/nr/24.04.22/DistUpgrade/DistUpgradeController.py", line 2033, in doPostUpgrade
    if not self.cache[pkgname].marked_delete:
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 283, in __getitem__
    raise KeyError("The cache has no package named %r" % key)
KeyError: "The cache has no package named 'gnome-app-install'"
This is because the new forced obsoletes code does not handle key errors
with the cache.
** Affects: ubuntu-release-upgrader (Ubuntu)
     Importance: Undecided
         Status: New
** Affects: ubuntu-release-upgrader (Ubuntu Noble)
     Importance: Undecided
         Status: New
** Description changed:
  With ubuntu-release-upgrader in noble-proposed, I get the following
  error when upgrading Ubuntu Desktop:
  
  2024-08-19 14:48:13,087 ERROR not handled exception:
  Traceback (most recent call last):
  
-   File "/usr/lib/python3/dist-packages/apt/cache.py", line 281, in __getitem__
-     # It might be excluded due to not having a version or something
+   File "/usr/lib/python3/dist-packages/apt/cache.py", line 281, in __getitem__
+     # It might be excluded due to not having a version or something
  
  KeyError: 'gnome-app-install'
  
- 
  During handling of the above exception, another exception occurred:
- 
  
  Traceback (most recent call last):
  
-   File "/home/nr/24.04.22/./noble", line 8, in <module>
-     sys.exit(main())
+   File "/home/nr/24.04.22/./noble", line 8, in <module>
+     sys.exit(main())
  
-   File "/home/nr/24.04.22/DistUpgrade/DistUpgradeMain.py", line 241, in main
-     if app.run():
+   File "/home/nr/24.04.22/DistUpgrade/DistUpgradeMain.py", line 241, in main
+     if app.run():
  
-   File "/home/nr/24.04.22/DistUpgrade/DistUpgradeController.py", line 2639, in run
-     return self.fullUpgrade()
+   File "/home/nr/24.04.22/DistUpgrade/DistUpgradeController.py", line 2639, in run
+     return self.fullUpgrade()
  
-   File "/home/nr/24.04.22/DistUpgrade/DistUpgradeController.py", line 2615, in fullUpgrade
-     self.doPostUpgrade()
+   File "/home/nr/24.04.22/DistUpgrade/DistUpgradeController.py", line 2615, in fullUpgrade
+     self.doPostUpgrade()
  
-   File "/home/nr/24.04.22/DistUpgrade/DistUpgradeController.py", line 2033, in doPostUpgrade
-     if not self.cache[pkgname].marked_delete:
+   File "/home/nr/24.04.22/DistUpgrade/DistUpgradeController.py", line 2033, in doPostUpgrade
+     if not self.cache[pkgname].marked_delete:
  
-   File "/usr/lib/python3/dist-packages/apt/cache.py", line 283, in __getitem__
-     raise KeyError("The cache has no package named %r" % key)
+   File "/usr/lib/python3/dist-packages/apt/cache.py", line 283, in __getitem__
+     raise KeyError("The cache has no package named %r" % key)
  
  KeyError: "The cache has no package named 'gnome-app-install'"
+ 
+ This is because the new forced obsoletes code does not handle key errors
+ with the cache.
** Also affects: ubuntu-release-upgrader (Ubuntu Noble)
   Importance: Undecided
       Status: New
-- 
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/2077358
Title:
  upgrades fail when package in ForcedObsoletes does not exist
Status in ubuntu-release-upgrader package in Ubuntu:
  New
Status in ubuntu-release-upgrader source package in Noble:
  New
Bug description:
  With ubuntu-release-upgrader in noble-proposed, I get the following
  error when upgrading Ubuntu Desktop:
  2024-08-19 14:48:13,087 ERROR not handled exception:
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/apt/cache.py", line 281, in __getitem__
      # It might be excluded due to not having a version or something
  KeyError: 'gnome-app-install'
  During handling of the above exception, another exception occurred:
  Traceback (most recent call last):
    File "/home/nr/24.04.22/./noble", line 8, in <module>
      sys.exit(main())
    File "/home/nr/24.04.22/DistUpgrade/DistUpgradeMain.py", line 241, in main
      if app.run():
    File "/home/nr/24.04.22/DistUpgrade/DistUpgradeController.py", line 2639, in run
      return self.fullUpgrade()
    File "/home/nr/24.04.22/DistUpgrade/DistUpgradeController.py", line 2615, in fullUpgrade
      self.doPostUpgrade()
    File "/home/nr/24.04.22/DistUpgrade/DistUpgradeController.py", line 2033, in doPostUpgrade
      if not self.cache[pkgname].marked_delete:
    File "/usr/lib/python3/dist-packages/apt/cache.py", line 283, in __getitem__
      raise KeyError("The cache has no package named %r" % key)
  KeyError: "The cache has no package named 'gnome-app-install'"
  This is because the new forced obsoletes code does not handle key
  errors with the cache.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2077358/+subscriptions
    
    
More information about the foundations-bugs
mailing list