Package: libapt-pkg-perl Version: 0.1.27 Severity: normal Dear Maintainer,
AptPkg::Cache exhibits some strange behavior with its hash iteration on multi-arch systems. First, package names returned by the keys method are duplicated for every architecture, but without any ':architecture' suffix. (In other words, if you have 3 architectures configured, every package name appears 3 times in the array returned by keys.) This is odd because one would expect every entry in the keys array to be unique. It seems like the package names for foreign architectures should be suffixed with ':architecture'. Second, I would expect the following code to print out all installed packages, along with architecture: use AptPkg::Cache; my $cache = AptPkg::Cache->new; while (my ($name, $pkg) = each %$cache) { if ($pkg->{CurrentVer}) { print "$name:$pkg->{CurrentVer}{Arch}\n"; } } Unfortunately, $pkg->{CurrentVer} always refers to the version for the native architecture, so this code only prints packages installed under the native architecture, duplicated for each foreign architecture. Packages installed only under foreign architectures aren't printed at all. AptPkg::Cache seems to otherwise support multi-arch, because code such as $cache->{'libc6:armhf'} returns a package for the correct architecture. Thanks, Andrew -- System Information: Debian Release: 7.0 APT prefers stable APT policy: (500, 'stable'), (5, 'unstable') Architecture: i386 (i686) Foreign Architectures: armhf Kernel: Linux 3.2.0-4-686-pae (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages libapt-pkg-perl depends on: ii libapt-pkg4.12 0.9.7.8 ii libc6 2.13-38 ii libgcc1 1:4.7.2-5 ii libstdc++6 4.7.2-5 ii perl-base [perlapi-5.14.2] 5.14.2-21 libapt-pkg-perl recommends no packages. libapt-pkg-perl suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org