summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-06-10 17:34:04 +0200
committerJulian Andres Klode <jak@debian.org>2015-06-10 17:38:33 +0200
commit7fff13ba3ee863bd84ed910523939069b966dbd7 (patch)
tree431f1c32138980663358d9c2c5b974350a331179 /apt
parent2ebe65984aff59eb27de849351c4bbb9ca25351b (diff)
downloadpython-apt-7fff13ba3ee863bd84ed910523939069b966dbd7.tar.gz
apt/debfile.py: Arch-qualify in compare_to_version_in_cache()
This uses the native architecture if the packages architecture is all, and the other architecture in case. We might need to consider versioned provides here, I have not looked at that yet. Closes: #750189
Diffstat (limited to 'apt')
-rw-r--r--apt/debfile.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/apt/debfile.py b/apt/debfile.py
index d542adae..22f96bfc 100644
--- a/apt/debfile.py
+++ b/apt/debfile.py
@@ -456,6 +456,15 @@ class DebPackage(object):
"""
self._dbg(3, "compare_to_version_in_cache")
pkgname = self._sections["Package"]
+ architecture = self._sections["Architecture"]
+
+ # Architecture all gets mapped to the native architecture internally
+ if architecture == 'all':
+ architecture = apt_pkg.config.find("APT::Architecture")
+
+ # Arch qualify the package name
+ pkgname = ":".join([pkgname, architecture])
+
debver = self._sections["Version"]
self._dbg(1, "debver: %s" % debver)
if pkgname in self._cache: