From 0704ed7155433750011e128550a8fb55d94121c0 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 5 Sep 2006 13:18:47 +0200 Subject: * DistUpgrade/forced_obsoletes.txt: - no longer needed, part of DistUpgrade.cfg now * DistUpgrade/mirrors.txt, DistUpgrade/removal_blacklist.txt: - renamed for consitency * DistUpgrade/DistUpgrade.cfg, DistUpgrade/DistUpgradeCache.py: - added "RemovalBlacklistFile" instead of hardcoding it * DistUpgrade/DistUpgradeConfigParser.py: - added "datadir" to constructor * DistUpgrade/DistUpgradeControler.py: - added datadir * DistUpgrade/DistUpgradeView.py: - added "hideStep()" method - added STEP_PREPARE, STEP_MODIFY_SOURCES, STEP_FETCH_INSTALL, STEP_CLEANUP, STEP_REBOOT * DistUpgrade/DistUpgradeViewGtk.py: - implemendted hideStep() - added datadir arguemnt for constructor * dist-upgrade.py - run it with the "." as arguemnt for the config * UpdateManager/UpdateManager.py: - if it can't be updated, ask about a dist-upgrade instead * update-manager. - added --dist-upgrade * po/*.po - make update-po --- DistUpgrade/DistUpgradeConfigParser.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'DistUpgrade/DistUpgradeConfigParser.py') diff --git a/DistUpgrade/DistUpgradeConfigParser.py b/DistUpgrade/DistUpgradeConfigParser.py index a4c55080..6879dfda 100644 --- a/DistUpgrade/DistUpgradeConfigParser.py +++ b/DistUpgrade/DistUpgradeConfigParser.py @@ -2,9 +2,10 @@ from ConfigParser import ConfigParser, NoOptionError class DistUpgradeConfig(ConfigParser): - def __init__(self): + def __init__(self, datadir): ConfigParser.__init__(self) - self.read(['DistUpgrade.cfg']) + self.datadir=datadir + self.read([datadir+'/DistUpgrade.cfg']) def getlist(self, section, option): try: tmp = self.get(section, option) @@ -17,7 +18,7 @@ class DistUpgradeConfig(ConfigParser): filename = self.get(section, option) except NoOptionError: return [] - items = [x.strip() for x in open(filename)] + items = [x.strip() for x in open(self.datadir+"/"+filename)] return filter(lambda s: not s.startswith("#") and not s == "", items) -- cgit v1.2.3