summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-09-24 07:04:55 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-09-24 07:04:55 +0000
commit58b874d34e37d802799afa33a218eedb0e4778ec (patch)
tree067ea9ff6c56f97fb6f7fae85f17c2ee84af8315 /src
parentc15bf9db7589cf4b7a49ed28925763ed0ef6cd66 (diff)
downloadbcfg2-58b874d34e37d802799afa33a218eedb0e4778ec.tar.gz
bcfg2-58b874d34e37d802799afa33a218eedb0e4778ec.tar.bz2
bcfg2-58b874d34e37d802799afa33a218eedb0e4778ec.zip
Packages: immediately add dependencies for packages added as single-choice virtual deps (Resolves Ticket #745)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5459 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Plugins/Packages.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/Packages.py b/src/lib/Server/Plugins/Packages.py
index 800be5bab..80ed089b6 100644
--- a/src/lib/Server/Plugins/Packages.py
+++ b/src/lib/Server/Plugins/Packages.py
@@ -133,6 +133,8 @@ class Source(object):
while work:
item = work.pop()
seen.add(item)
+ if debug:
+ logger.debug("Handling pkg %s" % item)
item_is_pkg = self.is_package(metadata, item)
try:
pset = self.get_provides(metadata, item)
@@ -158,10 +160,17 @@ class Source(object):
% (list(pset), item))
if len(pset) == 1:
+ provider = list(pset)[0]
if debug:
logger.debug("Using package %s for requirement %s" \
- % (list(pset)[0], item))
+ % (provider, item))
work.update(pset.difference(newpkg))
+ # add deps for provider
+ try:
+ newdeps = set(self.get_deps(metadata, provider))
+ work.update(newdeps.difference(newpkg))
+ except NoData:
+ pass
else:
if True in [p in newpkg for p in pset]:
# dep satisfied