[Piuparts-commits] [piuparts] 08/08: lib/db: add "foreign:${arch}" dependency state
Holger Levsen
holger at moszumanska.debian.org
Mon Jul 20 08:48:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit 065e6b478dec31b6ce2efba8961510328fa3b293
Author: Andreas Beckmann <anbe at debian.org>
Date: Sun Jul 19 23:06:27 2015 +0200
lib/db: add "foreign:${arch}" dependency state
cannot happen on real packages, only on dependencies
TODO: dependency parser currently skips :arch qualification
Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
debian/changelog | 1 +
piuparts-report.py | 1 +
piupartslib/packagesdb.py | 6 +++---
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index c85b862..e69379e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ piuparts (0.65) UNRELEASED; urgency=medium
* piupartslib/packagesdb.py:
- Put package in 'dependency-does-not-exist' state if a pass/ log exists
but a dependency has been removed from the archive since then.
+ - Prepare improvements for handling foreign arch dependencies.
* piupartslib/open_packages_url(): support uncompressed Packages files.
* piuparts-master-backend.py:
- Catch URLError, log it and abort without backtrace.
diff --git a/piuparts-report.py b/piuparts-report.py
index b48c307..b1483a1 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -555,6 +555,7 @@ def is_bad_state(state):
"unknown",
"unknown-preferred-alternative", # obsolete
"no-dependency-from-alternatives-exists", # obsolete
+ #"foreign:*",
"does-not-exist",
]
diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index 3bd9950..1b41bbf 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -276,13 +276,14 @@ class PackagesDB:
"unknown",
"unknown-preferred-alternative", # obsolete
"no-dependency-from-alternatives-exists", # obsolete
+ # "foreign:*", # can only happen as query result for a dependency
# "does-not-exist", # can only happen as query result for a dependency
]
_good_states = [
"successfully-tested",
"essential-required",
- ]
+ ] + ["foreign:%s" % arch for arch in set(_foreign_packages.values())]
_obsolete_states = [
"essential-required",
@@ -714,8 +715,7 @@ class PackagesDB:
if state != "does-not-exist":
return state
if package_name in self._foreign_packages:
- # HACK! these are arch=i386 packages needed on amd64
- return "essential-required"
+ return "foreign:%s" % self._foreign_packages[package_name]
return "does-not-exist"
def get_best_package_state(self, package_name, resolve_virtual=True, recurse=True):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list