From patchwork Thu Jun 24 22:07:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Roevens X-Patchwork-Id: 4464 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4G9vPx5ZBvz3wcC for ; Thu, 24 Jun 2021 22:07:33 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4G9vPw3xDnz2BY; Thu, 24 Jun 2021 22:07:32 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4G9vPw1fngz2yK5; Thu, 24 Jun 2021 22:07:32 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4G9vPv0HPnz2xbB for ; Thu, 24 Jun 2021 22:07:31 +0000 (UTC) Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4G9vPs5gpwz9c for ; Thu, 24 Jun 2021 22:07:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id DBA425C8BD for ; Fri, 25 Jun 2021 00:07:28 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Kj6lRC58jo4K for ; Fri, 25 Jun 2021 00:07:27 +0200 (CEST) Received: from amaterasu.sicho.home ([192.168.0.1] helo=chojin.sicho.home) by filekeeper.sicho.home with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1lwXVD-0002O8-DQ; Fri, 25 Jun 2021 00:07:15 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1624572447; bh=6/MRwgBqm8A74cjSdD8Ne9XhG/ROxVXWsLyRDCeBMf8=; h=From:To:Cc:Subject:Date; b=ikPybBDnQzHld78FQZADT0Hd7UPeDriuJs8Y5dIUx7jkVmZloP5R87ttM2nISRJD1 4Ke/xhRh0vimOE8XdN9odblxjbCajfQiH4QqSGCKLKAdRzP/lndxbDusdnLf0IlYoa ee5NklrDumg3xEobJzuIinOTxPbi0EpBLy/qoBHkOJKTsVFSZ6+oobDR7S+Jbpjk4h NH23Ukw9k50kjB2D/Abu3xCCLHYOvoQjVuHOOphSqYsQeIxc2pJ5iNlS7dYkByQ3BE iFwwzm5mVi3aL0tBQAF7iKJLKoBmjozQIpu9LheLc4Mk5vHuIvzrs++fsfyh/IWji8 X3gXU7oFHpaig== From: Robin Roevens To: development@lists.ipfire.org Subject: [PATCH] pakfire: Fix small bug: wrong pak count on list Date: Fri, 25 Jun 2021 00:07:00 +0200 Message-Id: <20210624220700.14161-1-robin.roevens@disroot.org> Mime-Version: 1.0 X-filekeeper-MailScanner-ID: 1lwXVD-0002O8-DQ X-filekeeper-MailScanner: Found to be clean X-filekeeper-MailScanner-From: robin.roevens@disroot.org X-filekeeper-MailScanner-Watermark: 1625177238.72473@3SkYC1kEuy/x/mXNLs/tRg ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=ikPybBDn; spf=pass (mail01.ipfire.org: domain of robin.roevens@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=robin.roevens@disroot.org ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1624572450; a=rsa-sha256; cv=none; b=uUQeAcsC3z2FVpdSnDBMroRvuQ3iJIB1HrvUAIOlftZDVJnMAWjdz49MX2F+CRPFlU1BaD xbuaQqRz0xgEOOs+pC5PEzX5CavoT92uiSYLGDahamTQY2dfnpFSrwVHL7qjFJoCxDiZE1 0SfehSch38dUQJuEOXesM4gkZpclPKbmBGnADqYB8IoE1jxZDk3Oj3IM5Gk5tEUAmBb03R VXWANDsmUziZhDz+N4pisu5EmkYGZV0TVb9X/ZdfpMKlY7Pifi0L0QtOrYcfZjVqywnAcW CbSAvltSOREA0HOojnA+mxU73oxZftOT3qdAesC3RRozBTDsda2WH8jHo74qLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1624572450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=+2XE1UoBHmSh6oj0vePb5om84eBbvJ94DmYUVw+Bu9I=; b=P1NQDR8nTgJn10a11zAkXAW7LVJS8AkOTGoBGrG4WeqVAt4PbreVl7tCaM79BNgqrbw/2t JHLXNAa9qP6LR591Ys5us1AdCZ/Kin4q91NXyoorHXncMCBD4o8/l66W+jecGWXvgDE8gX d/+u9e0FFn07hePhHD+m9wjyz0H+RNIumneul0GkDIbZnGCBOEc92MfmGHECQPYlbRXe+g 4xrcrqStQVybl4XumnII3+HvdTKdW3mkuGE2h4rtf/w3rAbG2tybG49cH1qtq7Nffn86UW RX8YPdQAEsjPQNSvlHdsbf0BZJ6FOk56SOfOTUFsv1IBCy/J4PZFfmG4xJrwWw== X-Rspamd-Queue-Id: 4G9vPs5gpwz9c Authentication-Results: mail01.ipfire.org; dkim=pass header.d=disroot.org header.s=mail header.b=ikPybBDn; dmarc=pass (policy=quarantine) header.from=disroot.org; spf=pass (mail01.ipfire.org: domain of robin.roevens@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=robin.roevens@disroot.org X-Rspamd-Server: mail01.haj.ipfire.org X-Spamd-Result: default: False [1.48 / 11.00]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[disroot.org:s=mail]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; BROKEN_CONTENT_TYPE(1.50)[]; IP_REPUTATION_HAM(-0.01)[asn: 50673(0.00), country: NL(-0.01), ip: 178.21.23.139(0.00)]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; DKIM_TRACE(0.00)[disroot.org:+]; RCPT_COUNT_TWO(0.00)[2]; MID_CONTAINS_FROM(1.00)[]; MX_GOOD(-0.01)[]; DMARC_POLICY_ALLOW(-0.50)[disroot.org,quarantine]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:50673, ipnet:178.21.23.0/24, country:NL]; BAYES_HAM(-3.00)[99.99%] X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" 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 Reviewed-by: Bernhard Bitsch Tested-by: Bernhard Bitsch Reviewed-by: Michael Tremer --- src/pakfire/lib/functions.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index f9a19b60d..c15e54f94 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -512,13 +512,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") {