pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/lintpkgsrc/files lintpkgsrc: fix loading of p...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/60ee43f1b9e2
branches:  trunk
changeset: 383314:60ee43f1b9e2
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed Aug 17 17:40:09 2022 +0000

description:
lintpkgsrc: fix loading of package data; condense loading of categories

diffstat:

 pkgtools/lintpkgsrc/files/lintpkgsrc.pl |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (32 lines):

diff -r a5a7525a782c -r 60ee43f1b9e2 pkgtools/lintpkgsrc/files/lintpkgsrc.pl
--- a/pkgtools/lintpkgsrc/files/lintpkgsrc.pl   Wed Aug 17 17:40:04 2022 +0000
+++ b/pkgtools/lintpkgsrc/files/lintpkgsrc.pl   Wed Aug 17 17:40:09 2022 +0000
@@ -1,5 +1,5 @@
 #!@PERL5@
-# $NetBSD: lintpkgsrc.pl,v 1.108 2022/08/17 17:26:35 rillig Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.109 2022/08/17 17:40:09 rillig Exp $
 
 # Written by David Brownlee <abs%netbsd.org@localhost>.
 #
@@ -153,6 +153,7 @@
                }
        }
        close(STORE) or die;
+       $self;
 }
 
 sub store($self, $fname) {
@@ -797,11 +798,8 @@
        my (@categories);
 
        opendir(BASE, $pkgsrcdir) || die("Unable to opendir($pkgsrcdir): $!");
-       @categories =
-           grep(substr($_, 0, 1) ne '.'
-               && $_ ne 'CVS'
-               && -f "$pkgsrcdir/$_/Makefile",
-               readdir(BASE));
+       @categories = grep { !/^\./ && -f "$pkgsrcdir/$_/Makefile" }
+           readdir(BASE);
        closedir(BASE);
        @categories;
 }



Home | Main Index | Thread Index | Old Index