]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
pakfire: Fix small bug: wrong pak count on list
authorRobin Roevens <robin.roevens@disroot.org>
Thu, 24 Jun 2021 22:07:00 +0000 (00:07 +0200)
committerPeter Müller <peter.mueller@ipfire.org>
Mon, 31 Jan 2022 17:36:04 +0000 (17:36 +0000)
Fixes pakfire list installed/notinstalled command displaying the
count of all available paks instead of the count of actual installed
respectively not installed paks.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/lib/functions.pl

index 2f34763d5d324a06446d7a64c3d213e580a2ba70..cb448a766a01cd4f7692b119005ee14e65a5e478 100644 (file)
@@ -524,13 +524,13 @@ sub dblist {
                foreach $line (sort @db) {
                        next unless ($line =~ /.*;.*;.*;/ );
                        $use_color = "";
-                       $count++;
                        @templine = split(/\;/,$line);
                        if ("$filter" eq "notinstalled") {
                                next if ( -e "$Conf::dbdir/installed/meta-$templine[0]" );
                        } elsif ("$filter" eq "installed") {
                                next unless ( -e "$Conf::dbdir/installed/meta-$templine[0]" );
                        }
+                       $count++;
                        if ("$forweb" eq "forweb")
                         {
                                if ("$filter" eq "notinstalled") {