From 2e81379c18a431aba1148e0e0e667e55ded6b03c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 13 Dec 2012 06:41:33 +0100 Subject: [PATCH] add very simple solver for dependencies Signed-off-by: Nico Schottelius --- cdist/config_install.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cdist/config_install.py b/cdist/config_install.py index 2c1edc44..8c99f8d9 100644 --- a/cdist/config_install.py +++ b/cdist/config_install.py @@ -139,6 +139,18 @@ class ConfigInstall(object): self.local.object_path, self.local.type_path) + all_resolved = False + while not all_resolved: + all_resolved = True + for cdist_object in objects: + if not cdist_object.state == cdist_object.STATE_DONE: + all_resolved = False + if cdist_object.satisfied_requirements: + self.object_run(cdist_object) + + + return + dependency_resolver = resolver.DependencyResolver(objects) self.log.debug(pprint.pformat(dependency_resolver.dependencies))