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:           Wed Aug 17 17:40:09 UTC 2022

Modified Files:
        pkgsrc/pkgtools/lintpkgsrc/files: lintpkgsrc.pl

Log Message:
lintpkgsrc: fix loading of package data; condense loading of categories


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 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.108 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.109
--- pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.108        Wed Aug 17 17:26:35 2022
+++ pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl      Wed Aug 17 17:40:09 2022
@@ -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 @@ sub load($class, $fname) {
                }
        }
        close(STORE) or die;
+       $self;
 }
 
 sub store($self, $fname) {
@@ -797,11 +798,8 @@ sub list_pkgsrc_categories($pkgsrcdir) {
        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