dont re-run already fulfilled requirements

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-10-19 16:07:13 +02:00
parent 24bf7369d9
commit c45c9cd702

View file

@ -140,6 +140,9 @@ class ConfigInstall(object):
for requirement in cdist_object.requirements: for requirement in cdist_object.requirements:
self.log.debug("Object %s requires %s", cdist_object, requirement) self.log.debug("Object %s requires %s", cdist_object, requirement)
required_object = cdist_object.object_from_name(requirement) required_object = cdist_object.object_from_name(requirement)
if required_object.state == core.Object.STATE_DONE:
self.log.debug("Skipping fulfilled dependency %s for %s", required_object, cdist_object)
else:
self.log.info("Resolving dependency %s for %s" % (required_object.name, cdist_object.name)) self.log.info("Resolving dependency %s for %s" % (required_object.name, cdist_object.name))
self.object_run(required_object) self.object_run(required_object)