From 10ec8cd5b5614606b3db9fdc3d6e248984048f0e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 19 Dec 2011 12:06:06 +0100 Subject: * apt/debfile.py: - fix crash in dep multiarch handling --- apt/debfile.py | 3 ++- debian/changelog | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apt/debfile.py b/apt/debfile.py index 160a4a72..cd027c71 100644 --- a/apt/debfile.py +++ b/apt/debfile.py @@ -94,7 +94,8 @@ class DebPackage(object): return pkgname elif self._cache.is_virtual_package(pkgname): return pkgname - elif self._cache[pkgname].candidate.architecture == "all": + elif (pkgname in self._cache and + self._cache[pkgname].candidate.architecture == "all"): return pkgname # now do the real multiarch checking multiarch_pkgname = "%s:%s" % (pkgname, self._multiarch) diff --git a/debian/changelog b/debian/changelog index fcf8ff98..df486b60 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ python-apt (0.8.3) unstable; urgency=low - add multiarch support to the debfile.py code * tests/test_apt_cache.py: - add additional check if provides test can actually be run + * apt/debfile.py: + - fix crash in dep multiarch handling -- Michael Vogt Thu, 08 Dec 2011 20:31:52 +0100 -- cgit v1.2.3