fix execution order - seems to be fine now
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
parent
8a7c64f86a
commit
85d24ce259
3 changed files with 34 additions and 28 deletions
|
|
@ -224,35 +224,18 @@ class CdistObject(object):
|
|||
except EnvironmentError as error:
|
||||
raise cdist.Error('Error creating directories for cdist object: %s: %s' % (self, error))
|
||||
|
||||
def requirements_satisfied(self, requirements):
|
||||
def requirements_unfinished(self, requirements):
|
||||
"""Return state whether normal depedencies are satisfied"""
|
||||
|
||||
satisfied = True
|
||||
object_list = []
|
||||
|
||||
for requirement in requirements:
|
||||
cdist_object = self.object_from_name(requirement)
|
||||
|
||||
if not cdist_object.state == self.STATE_DONE:
|
||||
satisfied = False
|
||||
break
|
||||
|
||||
log.debug("%s is satisfied: %s" % (self.name, satisfied))
|
||||
|
||||
return satisfied
|
||||
|
||||
@property
|
||||
def all_requirements(self):
|
||||
"""
|
||||
Return resolved autorequirements and requirements so that
|
||||
a complete list of requirements is returned
|
||||
"""
|
||||
|
||||
all_reqs= []
|
||||
all_reqs.extend(self.find_requirements_by_name(self.requirements))
|
||||
all_reqs.extend(self.find_requirements_by_name(self.autorequire))
|
||||
|
||||
return set(all_reqs)
|
||||
object_list.append(cdist_object)
|
||||
|
||||
return object_list
|
||||
|
||||
class RequirementNotFoundError(cdist.Error):
|
||||
def __init__(self, requirement):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue