Package: python-apt Version: 0.9.3.11 Severity: normal -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Dear Maintainer, apt_pkg.Dependency objects returned by apt_pkg.Version.depends_list select a apt_pkg.Dependency.target_pkg that has the same architecture as the apt_pkg.Version that generated it (Architecture: all packages aside). Usually this is the right thing do to. The one time is isn't is when target_pkg is "multi-arch: Foreign". In that case you always want the native package, if it is available. Eg consider a system that wants both libgcc1:amd64 and libgcc1:i386 installed. libgcc1 PreDepends on multiarch-support. multiarch-support:amd64 conflicts with multiarch-support:i386, so you can't have both installed. But currently if you just use the suggested target_pkg, you will attempt to install both. apt-get and aptitude resolve this by only installing the native version, and it would be nice if apk_pkg did the same. Example: import apt_pkg apt_pkg.init() cache = apt_pkg.Cache() dep_cache = apt_pkg.DepCache(cache) libgcc1_i386 = cache["libgcc1:i386"] version = dep_cache.get_candidate_ver(libgcc1_i386) depends = version.depends_list["PreDepends"][0][0] target_pkg = depends.target_pkg print target_pkg.name, target_pkg.architecture print depends.all_targets()[0].multi_arch == apt_pkg.Version.MULTI_ARCH_FOREIGN print cache["multiarch-support"].architecture, cache["dpkg"].architecture Prints: multiarch-support i386 True amd64 amd64 A better result would be: multiarch-support amd64 True amd64 amd64 - -- System Information: Debian Release: 8.0 APT prefers testing-updates APT policy: (500, 'testing-updates'), (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages python-apt depends on: ii libapt-inst1.5 1.0.9.3 ii libapt-pkg4.12 1.0.9.3 ii libc6 2.19-13 ii libgcc1 1:4.9.1-19 ii libstdc++6 4.9.1-19 ii python 2.7.8-2 ii python-apt-common 0.9.3.11 Versions of packages python-apt recommends: ii iso-codes 3.57-1 ii lsb-release 4.1+Debian13+nmu1 ii xz-utils 5.1.1alpha+20120614-2+b2 Versions of packages python-apt suggests: pn python-apt-dbg <none> ii python-apt-doc 0.9.3.11 ii python-gtk2 2.24.0-4 pn python-vte <none> - -- no debconf information -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIVAwUBVIadxqzUn4heVFJuAQpMRA/+P30MjoHRHz6BvVQW74LSUk+GZdO+mW62 yE5+Zp8jahDIaM6bg0CXnItfRI53jFRteQIxTVUBi3WUdQi5lMRxyRvkH523na3U apln9Juxdr5O8gu2WsPA2Aasv3sR1sD8+19BAQwYWtuqxisglV3ZG8v/pcV7wdVk lGX2vYgw3nhao1Ad9jmV8oIxLvkhK7OhxBe9F8oaf8PhsUfWuJulxWwM3COxe6SE igo3mzjfDHY8dvtdXndac0ZVXE6CKd2TPQtRslqPOEjiGvp/9E7O3Q8Rul+92NQi H4G6XJ2wgyKSB6yLnClvHKS+LOSNoPTvGsy6cAQ/TQk2qCDcKE8/HgUa555TdTyz sxmYywPt+2MiB+OzpqqSmIaPch4vclpce0lwD83jS0lWqe2PH+tHFnv8jVc/aWkg iiT+w6qLHWtArqH+hX/hn/R+ObkSvy+dsvAvpCfGdJwukIo12LIRuPQ//HUw2drH 4ya+JTLd+LqlzrVVUMlzpCaXnXXew+54P8TuhUU7ZMjGpaI25XVYxVry9hY52OR5 tkazM0bF8jOsnPaS/a9rKY5IS4NsaD8ahpTqNVqNmvHh0BCOdEzMGUOGTEu2MjjN hKAaxdaGKWVhbZY23aMZWQ9AtycNMk96t78Lk1czRmrEb2z48+66Ge5d82Z2z5ah SxPbjHLmGk4= =hwNm -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org