summaryrefslogtreecommitdiff
path: root/DistUpgrade/DistUpgradeCache.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-09-05 13:18:47 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-09-05 13:18:47 +0200
commit0704ed7155433750011e128550a8fb55d94121c0 (patch)
tree1b84dd739467e8329988140486ccb8d5528525a7 /DistUpgrade/DistUpgradeCache.py
parent6d41b5e07b5b58a0d14e4ef12f4c39c658e6da5c (diff)
downloadpython-apt-0704ed7155433750011e128550a8fb55d94121c0.tar.gz
* 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
Diffstat (limited to 'DistUpgrade/DistUpgradeCache.py')
-rw-r--r--DistUpgrade/DistUpgradeCache.py10
1 files changed, 3 insertions, 7 deletions
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