summaryrefslogtreecommitdiff
path: root/DistUpgrade/DistUpgradeCache.py
diff options
context:
space:
mode:
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