control: tags -1 + patch
thanks

On Sun, 6 Aug 2023 at 17:15, Richard Lewis
<richard.lewis.deb...@googlemail.com> wrote:
> On Sun, 19 Sep 2021 22:41:24 +0100 Richard Lewis
> <richard.lewis.deb...@googlemail.com> wrote:
>
> > giving two arguments including one that is not a package shows there is a 
> > syntax error somewhere around line 378:
> >
> > $ apt-show-versions apt whatever
> > apt:amd64/bullseye 2.2.4 uptodate
> > Use of uninitialized value $arch in concatenation (.) or string at 
> > /usr/bin/apt-show-versions line 378.
> > Use of uninitialized value $arch in hash element at 
> > /usr/bin/apt-show-versions line 381.
> > Use of uninitialized value $arch in hash element at 
> > /usr/bin/apt-show-versions line 393.
> > whatever: not installed

I believe the following patch fixes this bug, and the main issue in
883766 (but not the bit about the version number)

--- /usr/bin/apt-show-versions  2022-10-15 10:52:39.000000000 +0100
+++ ./apt-show-versions 2023-08-08 19:29:45.842051600 +0100
@@ -355,8 +355,8 @@
     if ($archname and ! defined $apackages->{$pkgname}{$archname}) {
         printf("%s not available for architecture %s\n", $pkgname, $archname);
     } elsif (! defined $pkgs->{$pkgname}) {
-        if ($mode != $MODE_SINGLE || $archname) {
-           print_package_internal($pkgname, $archname)
+        if ($archname) {
+
print_package_internal($pkgname, $archname)
         } elsif (keys(%{$apackages->{$pkgname}})) {
             my $archlist = "";
             foreach my $a (sort keys(%{$apackages->{$pkgname}})) {

Reply via email to