From 6bf670bb229c1f2b50e5d51de073221a38e309c8 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 5 Dec 2005 15:11:16 +0100 Subject: * bugfixes in the sources.list rewrite code --- DistUpgrade/DistUpgrade.py | 2 +- SoftwareProperties/aptsources.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DistUpgrade/DistUpgrade.py b/DistUpgrade/DistUpgrade.py index 0c6e9202..3b252fd8 100644 --- a/DistUpgrade/DistUpgrade.py +++ b/DistUpgrade/DistUpgrade.py @@ -55,7 +55,7 @@ class DistUpgradeControler(object): sources.backup() for entry in sources: # check if it's a mirror (or offical site) - if sources.is_mirror(entry.uri, "archive.ubuntu.com"): + if sources.is_mirror("archive.ubuntu.com",entry.uri): if entry.dist == fromDist: entry.dist = to else: diff --git a/SoftwareProperties/aptsources.py b/SoftwareProperties/aptsources.py index 9a1a902d..504a490b 100644 --- a/SoftwareProperties/aptsources.py +++ b/SoftwareProperties/aptsources.py @@ -141,7 +141,10 @@ class SourceEntry: """ return the current line as string """ if self.invalid: return self.line - line = "%s %s %s" % (self.type, self.uri, self.dist) + line = "" + if self.disabled: + line = "# " + line += "%s %s %s" % (self.type, self.uri, self.dist) if len(self.comps) > 0: line += " " + " ".join(self.comps) if self.comment != "": -- cgit v1.2.3