[neon/forks/ubuntu-release-upgrader/Neon/release_noble] DistUpgrade: add back the two KDE neon additions to include our overrides file in quirks

Jonathan Riddell null at kde.org
Tue Sep 24 11:58:09 BST 2024


Git commit a18e3e46be692ed50e236e6e575fe0518cd551ba by Jonathan Riddell.
Committed on 24/09/2024 at 10:58.
Pushed by jriddell into branch 'Neon/release_noble'.

add back the two KDE neon additions to include our overrides file in quirks

M  +20   -0    DistUpgrade/DistUpgradeQuirks.py

https://invent.kde.org/neon/forks/ubuntu-release-upgrader/-/commit/a18e3e46be692ed50e236e6e575fe0518cd551ba

diff --git a/DistUpgrade/DistUpgradeQuirks.py b/DistUpgrade/DistUpgradeQuirks.py
index bb34ecf23..85195b8c7 100644
--- a/DistUpgrade/DistUpgradeQuirks.py
+++ b/DistUpgrade/DistUpgradeQuirks.py
@@ -165,6 +165,15 @@ class DistUpgradeQuirks(object):
         if 'linux-firmware-raspi2' in cache:
             if cache['linux-firmware-raspi2'].is_installed:
                 self._remove_uboot_on_rpi()
+        # KDE neon:
+        # Make sure legacy pins are cleaned up before doing anything to prevent
+        # dependency resolution problems caused by old pins.
+        # This includes the neon-settings pin. The future package shouldn't include
+        # the legacy pin in its neon-settings!
+        for old_pin in ['99-jammy-overrides', '98-jammy-overrides', '98-noble-overrides']:
+            path = '/etc/apt/preferences.d/' + old_pin
+            if os.path.exists(path):
+                os.remove(path)
 
     # individual quirks handler when the dpkg run is finished ---------
     def PostCleanup(self):
@@ -193,6 +202,17 @@ class DistUpgradeQuirks(object):
         self._maybe_remove_gpg_wks_server()
         self._install_t64_replacement_packages()
         self._handle_ufw_breaks()
+        # KDE neon:
+        # neon packages with versions < in focal
+        copyfile('98-noble-overrides', '/etc/apt/preferences.d/98-noble-overrides')
+        # Make sure legacy pins are cleaned up before doing anything to prevent
+        # dependency resolution problems caused by old pins.
+        # This includes the neon-settings pin. The future package shouldn't include
+        # the legacy pin in its neon-settings!
+        for old_pin in ['98-xenial-overrides', '99-xenial-overrides', '98-focal-overrides', '99-focal-overrides', '98-jammy-overrides', '99-jammy-overrides']:
+            path = '/etc/apt/preferences.d/' + old_pin
+            if os.path.exists(path):
+                os.remove(path)
 
     # individual quirks handler that run *after* the dist-upgrade was
     # calculated in the cache


More information about the Neon-commits mailing list