summaryrefslogtreecommitdiff
path: root/DistUpgrade/DistUpgradeCache.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-09-05 10:58:41 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-09-05 10:58:41 +0200
commite655589f378d67eb14d7547dd97d56d857cf938c (patch)
treea2c7cef91390c0a02f3fc014c2b814afb7934dbe /DistUpgrade/DistUpgradeCache.py
parentb6ac0674bd17821a971a4b0e2e2a916eda4d1eb2 (diff)
downloadpython-apt-e655589f378d67eb14d7547dd97d56d857cf938c.tar.gz
* DistUpgrade/DistUpgradeCache.py, DistUpgrade.cfg, README:
- added "RemoveEssentialOk" to control if certain essential package are removed
Diffstat (limited to 'DistUpgrade/DistUpgradeCache.py')
-rw-r--r--DistUpgrade/DistUpgradeCache.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/DistUpgrade/DistUpgradeCache.py b/DistUpgrade/DistUpgradeCache.py
index 37dd96db..1f53b6be 100644
--- a/DistUpgrade/DistUpgradeCache.py
+++ b/DistUpgrade/DistUpgradeCache.py
@@ -197,11 +197,13 @@ class MyCache(apt.Cache):
""" this function tests if the current changes don't violate
our constrains (blacklisted removals etc)
"""
+ removeEssentialOk = self.config.getlist("Distro","RemoveEssentialOk")
for pkg in self.getChanges():
if pkg.markedDelete and self._inRemovalBlacklist(pkg.name):
logging.debug("The package '%s' is marked for removal but it's in the removal blacklist", pkg.name)
return False
- if pkg.markedDelete and pkg._pkg.Essential == True:
+ if pkg.markedDelete and (pkg._pkg.Essential == True and
+ not pkg.name in removeEssentialOk):
logging.debug("The package '%s' is marked for removal but it's a ESSENTIAL package", pkg.name)
return False
return True