[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.44-583-ge144d01
Andreas Beckmann
debian at abeckmann.de
Fri May 25 12:40:38 UTC 2012
The following commit has been merged in the develop branch:
commit e417c62b8330cb6ea21480ecdfa11759b0079706
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Thu Jan 12 21:07:12 2012 +0100
remove redundant variable prefer_alt_idx
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index 9f1b066..61a5a99 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -342,7 +342,6 @@ class PackagesDB:
alt_unknowns = 0
alt_state = None
prefer_alt_score = 0
- prefer_alt_idx = 0
prefer_alt = None
for alternative in alt_deps[d]:
altdep_state = self.get_package_state(alternative)
@@ -350,16 +349,13 @@ class PackagesDB:
alt_found += 1
if prefer_alt_score < 3 and altdep_state == "essential-required":
prefer_alt = alternative
- prefer_alt_idx = d
prefer_alt_score = 3
elif prefer_alt_score < 2 and altdep_state == "successfully-tested":
prefer_alt = alternative
- prefer_alt_idx = d
prefer_alt_score = 2
elif prefer_alt_score < 1 and \
altdep_state in ["waiting-to-be-tested", "waiting-for-dependency-to-be-tested"]:
prefer_alt = alternative
- prefer_alt_idx = d
prefer_alt_score = 1
elif altdep_state == "unknown":
alt_unknowns += 1
@@ -369,9 +365,9 @@ class PackagesDB:
alt_state = altdep_state
if prefer_alt_score >= 2:
- package.prefer_alt_depends(header,prefer_alt_idx,prefer_alt)
+ package.prefer_alt_depends(header, d, prefer_alt)
elif prefer_alt_score == 1 and ((alt_unknowns + alt_fails) == 0):
- package.prefer_alt_depends(header,prefer_alt_idx,prefer_alt)
+ package.prefer_alt_depends(header, d, prefer_alt)
elif alt_found == 0:
return "no-dependency-from-alternatives-exists"
else:
--
piuparts git repository
More information about the Piuparts-commits
mailing list