From d08caea3196550e700db9a1d83fcaa3a8ad35b2d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 15 Aug 2006 22:20:33 +0200 Subject: * DistUpgrade/DistUpgradeControler.py: - always enable "main" on upgrades, this ensures that we do not end up with a system without the main archive (various bugs for breezy->dapper) * data/channels/Debian.info, data/channels/Ubuntu.info: - added pre-generated files (required for the upgrader) * UpdateManager/Common/aptsources.py: - add a "matcherPath" parameter to SourcesList (for the upgrader) --- UpdateManager/Common/aptsources.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'UpdateManager/Common') diff --git a/UpdateManager/Common/aptsources.py b/UpdateManager/Common/aptsources.py index fd77fe63..80781cb0 100644 --- a/UpdateManager/Common/aptsources.py +++ b/UpdateManager/Common/aptsources.py @@ -209,10 +209,11 @@ class NullMatcher(object): return True class SourcesList: - def __init__(self, withMatcher=True): + def __init__(self, withMatcher=True, + matcherPath="/usr/share/update-manager/channels/"): self.list = [] # of Type SourceEntries if withMatcher: - self.matcher = SourceEntryMatcher() + self.matcher = SourceEntryMatcher(matcherPath) else: self.matcher = NullMatcher() self.refresh() @@ -378,6 +379,7 @@ class SourceCompTemplate: self.on_by_default = on_by_default class SourceEntryTemplates: + def __init__(self,datadir): _ = gettext.gettext self.templates = [] @@ -411,10 +413,10 @@ class SourceEntryMatcher: self.comps = l_comps self.comps_descriptions = l_comps_descr - def __init__(self): + def __init__(self, matcherPath): self.templates = [] # Get the human readable channel and comp names from the channel .infos - spec_files = glob.glob("/usr/share/update-manager/channels/*.info") + spec_files = glob.glob("%s/*.info" % matcherPath) for f in spec_files: f = os.path.basename(f) i = f.find(".info") @@ -440,9 +442,7 @@ class SourceEntryMatcher: class Distribution: def __init__(self): - """" - Container for distribution specific informations - """ + """ Container for distribution specific informations """ # LSB information self.id = "" self.codename = "" -- cgit v1.2.3