summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Packages/__init__.py
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2012-04-17 14:47:41 -0500
committerSol Jerome <sol.jerome@gmail.com>2012-04-17 14:47:41 -0500
commit918382284bb0195ab01ff470c4e4a016bc8aad87 (patch)
treed84c6d1faf6279666b3e99208c1d1485e84fe562 /src/lib/Bcfg2/Server/Plugins/Packages/__init__.py
parent67555319c4501ad0ce312244c2c983a7b592a582 (diff)
parent9d3a445882c99a7d5a7aa929dc00abe1b9b20d88 (diff)
downloadbcfg2-918382284bb0195ab01ff470c4e4a016bc8aad87.tar.gz
bcfg2-918382284bb0195ab01ff470c4e4a016bc8aad87.tar.bz2
bcfg2-918382284bb0195ab01ff470c4e4a016bc8aad87.zip
Merge branch 'add-essential-pkgs'
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Packages/__init__.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Packages/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/__init__.py b/src/lib/Bcfg2/Server/Plugins/Packages/__init__.py
index 0d5e7d50f..e4793a28d 100644
--- a/src/lib/Bcfg2/Server/Plugins/Packages/__init__.py
+++ b/src/lib/Bcfg2/Server/Plugins/Packages/__init__.py
@@ -146,6 +146,8 @@ class Packages(Bcfg2.Server.Plugin.Plugin,
initial = set()
# base is the set of initial packages with groups expanded
base = set()
+ # essential pkgs are those marked as such by the distribution
+ essential = collection.get_essential()
to_remove = []
for struct in structures:
for pkg in struct.xpath('//Package | //BoundPackage'):
@@ -167,7 +169,7 @@ class Packages(Bcfg2.Server.Plugin.Plugin,
else:
self.logger.error("Packages: Malformed Package: %s" %
lxml.etree.tostring(pkg))
- base.update(initial)
+ base.update(initial | essential)
for el in to_remove:
el.getparent().remove(el)