Received: by mail.netbsd.org (Postfix, from userid 605) id B064D84F42; Mon, 15 Aug 2022 21:09:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id E99EF84F3A for ; Mon, 15 Aug 2022 21:09:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id FRIfhgEGWf8I for ; Mon, 15 Aug 2022 21:09:13 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 43F2E84CFD for ; Mon, 15 Aug 2022 21:09:13 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 3D2CAFB1A; Mon, 15 Aug 2022 21:09:13 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_166059775329430" MIME-Version: 1.0 Date: Mon, 15 Aug 2022 21:09:13 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc/pkgtools/lintpkgsrc/files To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20220815210913.3D2CAFB1A@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_166059775329430 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Mon Aug 15 21:09:13 UTC 2022 Modified Files: pkgsrc/pkgtools/lintpkgsrc/files: lintpkgsrc.pl Log Message: lintpkgsrc: clean up code for listing required packages To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_166059775329430 Content-Disposition: inline Content-Length: 1114 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl diff -u pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.95 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.96 --- pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.95 Sun Aug 14 12:54:01 2022 +++ pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl Mon Aug 15 21:09:13 2022 @@ -1,5 +1,5 @@ #!@PERL5@ -# $NetBSD: lintpkgsrc.pl,v 1.95 2022/08/14 12:54:01 rillig Exp $ +# $NetBSD: lintpkgsrc.pl,v 1.96 2022/08/15 21:09:13 rillig Exp $ # Written by David Brownlee . # @@ -1574,20 +1574,11 @@ sub check_outdated_installed_packages($p foreach my $pkgver (@update) { my $pkgbase = $pkgver->pkgbase; print "$pkgbase:"; - if (open(PKGINFO, "$conf_pkg_info -R $pkgbase |")) { - my ($list); - - while () { - if (/Required by:/) { - $list = 1; - } elsif ($list) { - chomp; - s/-\d.*//; - print " $_"; - } - } - close(PKGINFO); + open(PKGINFO, "$conf_pkg_info -q -R $pkgbase |") or die; + while () { + print " $1" if /^(.*?)-\d/; } + close(PKGINFO); print "\n"; } --_----------=_166059775329430--