pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/lintpkgsrc/files



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.

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 <abs%netbsd.org@localhost>.
 #
@@ -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 (<PKGINFO>) {
-                               if (/Required by:/) {
-                                       $list = 1;
-                               } elsif ($list) {
-                                       chomp;
-                                       s/-\d.*//;
-                                       print " $_";
-                               }
-                       }
-                       close(PKGINFO);
+               open(PKGINFO, "$conf_pkg_info -q -R $pkgbase |") or die;
+               while (<PKGINFO>) {
+                       print " $1" if /^(.*?)-\d/;
                }
+               close(PKGINFO);
                print "\n";
        }
 



Home | Main Index | Thread Index | Old Index