Package: apt-show-versions
Version: 0.22.3
Followup-For: Bug #725107
Hello,
The attached patch fixes #725107 by fixing the broken multiarch support.
I'm not 100% sure it is right in all cases, but at least it fixes
multiarch searching and -a.
Please apply.
Thanks,
Ross
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500,
'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.14-0.bpo.1-amd64 (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 apt-show-versions depends on:
ii apt 1.0.5
ii libapt-pkg-perl 0.1.29+b1
ii perl [libstorable-perl] 5.18.2-4
apt-show-versions recommends no packages.
apt-show-versions suggests no packages.
-- no debconf information
Index: apt-show-versions
===================================================================
--- apt-show-versions (revision 69)
+++ apt-show-versions (working copy)
@@ -342,18 +342,18 @@
printf("%s not available for architecture %s\n", $pkgname, $archname);
} elsif (! defined $pkgs->{$pkgname}) {
if ($mode != $MODE_SINGLE || $archname) {
- printf("%s not installed\n", $package);
+ print_package_internal($pkgname, $archname)
} elsif (keys(%{$apackages->{$pkgname}})) {
my $archlist = "";
foreach my $a (sort keys(%{$apackages->{$pkgname}})) {
+ print_package_internal($pkgname, $a);
$archlist .= ($archlist ? ", $a" : "$a");
}
- printf("%s not installed (available for: %s)\n", $pkgname, $archlist);
} else {
printf("%s not installed (not available)\n", $pkgname);
}
} else {
- foreach my $arch ($archname or sort keys $pkgs->{$pkgname}) {
+ foreach my $arch ($archname or sort keys(%{$apackages->{$pkgname}})) {
print_package_internal($pkgname, $arch);
}
}
@@ -387,9 +387,7 @@
push @print_info, "$ipkg->{$VERS} ";
}
push @print_info, "$ipkg->{$STATUS}\n";
- } else {
- push @print_info, "Not installed\n";
- }
+ }
# Index to @official_suites: Next official suite to mention if missing.
my $official_idx = 0;