[neon-notifications] [neon/forks/ubuntu-release-upgrader/Neon/unstable_focal] /: DistUpgrade/DistUpgradeController.py: do what the comment says and really back up /etc/apt/sources.list first. (LP: #1888916)

Brian Murray null at kde.org
Wed Sep 23 10:41:40 BST 2020


Git commit 172fb20b167326e3c7a4e4d08165a0726c75c0f1 by Brian Murray.
Committed on 26/08/2020 at 15:35.
Pushed by sitter into branch 'Neon/unstable_focal'.

DistUpgrade/DistUpgradeController.py: do what the comment says and really back up /etc/apt/sources.list first. (LP: #1888916)

M  +3    -3    DistUpgrade/DistUpgradeController.py
M  +2    -0    debian/changelog

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

diff --git a/DistUpgrade/DistUpgradeController.py b/DistUpgrade/DistUpgradeController.py
index 946e47d7..9f4e76b1 100644
--- a/DistUpgrade/DistUpgradeController.py
+++ b/DistUpgrade/DistUpgradeController.py
@@ -799,7 +799,9 @@ class DistUpgradeController(object):
     def updateSourcesList(self):
         logging.debug("updateSourcesList()")
         self.sources = SourcesList(matcherPath=self.datadir)
-        
+        # backup first!
+        self.sources.backup(self.sources_backup_ext)
+
         if not any(e.type == "deb" and e.dist == self.fromDist for e in self.sources):
             res = self._view.askYesNoQuestion(_("No valid sources.list entry found"),
                              _("While scanning your repository "
@@ -810,8 +812,6 @@ class DistUpgradeController(object):
             if not res:
                 self.abort()
 
-        # backup first!
-        self.sources.backup(self.sources_backup_ext)
         if not self.rewriteSourcesList(mirror_check=True):
             logging.error("No valid mirror found")
             res = self._view.askYesNoQuestion(_("No valid mirror found"),
diff --git a/debian/changelog b/debian/changelog
index cf346b26..25a8f90a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ ubuntu-release-upgrader (1:20.04.25) UNRELEASED; urgency=medium
   * DistUpgrade/DistUpgradeQuirks.py: Add a check for ROS packages being
     installed and warn that upgrades with them installed are not likely to
     work. Thanks to Kyle Fazzari for the patch. (LP: #1611737)
+  * DistUpgrade/DistUpgradeController.py: do what the comment says and really
+    back up /etc/apt/sources.list first. (LP: #1888916)
 
  -- Brian Murray <brian at ubuntu.com>  Wed, 26 Aug 2020 08:29:48 -0700
 



More information about the neon-notifications mailing list