[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-598-gace668e
Andreas Beckmann
debian at abeckmann.de
Sun May 27 13:47:33 UTC 2012
The following commit has been merged in the piatti branch:
commit af49751022f3d7e4062503d09dd9115399ff8640
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Sun Apr 22 10:39:30 2012 +0200
factor out the list of 'good' states
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index 3839335..016a5e7 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -220,6 +220,11 @@ class PackagesDB:
#"does-not-exist", # can only happen as query result for a dependency
]
+ _good_states = [
+ "successfully-tested",
+ "essential-required",
+ ]
+
_propagate_error_state = {
"failed-testing": "dependency-failed-testing",
"cannot-be-tested": "dependency-cannot-be-tested",
@@ -377,8 +382,7 @@ class PackagesDB:
testable = True
for dep in deps:
dep_state = self.get_package_state(dep)
- if dep_state not in \
- ["successfully-tested", "essential-required"]:
+ if dep_state not in self._good_states:
testable = False
break
if testable:
@@ -393,7 +397,7 @@ class PackagesDB:
# allow any non-error dep_state on the cycle for testing
# (error states are handled by the error propagation above)
pass
- elif dep_state not in ["successfully-tested", "essential-required"]:
+ elif dep_state not in self._good_states:
# non-circular deps must have passed before testing circular deps
testable = False
break
--
piuparts git repository
More information about the Piuparts-commits
mailing list