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/DistUpgradeCache.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'DistUpgrade/DistUpgradeCache.py') diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py index 1f53b6be..680e7d9e 100644 --- a/DistUpgrade/DistUpgradeCache.py +++ b/DistUpgrade/DistUpgradeCache.py @@ -12,20 +12,16 @@ from DistUpgradeView import FuzzyTimeToStr class MyCache(apt.Cache): # init - def __init__(self, progress=None): + def __init__(self, config, progress=None): apt.Cache.__init__(self, progress) self.to_install = [] self.to_remove = [] - self.config = DistUpgradeConfig() + self.config = config self.metapkgs = self.config.getlist("Distro","MetaPkgs") # a list of regexp that are not allowed to be removed - self.removal_blacklist = [] - for line in open("removal_blacklist.txt").readlines(): - line = line.strip() - if not line == "" or line.startswith("#"): - self.removal_blacklist.append(line) + self.removal_blacklist = config.getListFromFile("Distro","RemovalBlacklistFile") # properties @property -- cgit v1.2.3