summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint
diff options
context:
space:
mode:
authorwiz <wiz>2012-08-26 13:47:16 +0000
committerwiz <wiz>2012-08-26 13:47:16 +0000
commit96b99bcb2a5d413d7ec0475ce641864b8e9f5482 (patch)
tree050d4fe6f032702545ed9112dd9455beba277260 /pkgtools/pkglint
parent78b40a1b4c1bb37b8134343a0790c590866d778f (diff)
downloadpkgsrc-96b99bcb2a5d413d7ec0475ce641864b8e9f5482.tar.gz
Improve expand_permission some more. Should fix the
Use of uninitialized value in concatenation (.) or string at /usr/pkg/bin/pkglint line 4777. warnings. Bump version.
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r--pkgtools/pkglint/Makefile4
-rw-r--r--pkgtools/pkglint/files/pkglint.pl14
2 files changed, 9 insertions, 9 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index bb6ca3f0528..3d6c1149869 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.415 2012/08/05 09:55:54 wiz Exp $
+# $NetBSD: Makefile,v 1.416 2012/08/26 13:47:16 wiz Exp $
#
# Note: if you update the version number, please have a look at the
# changes between the CVS tag "pkglint_current" and HEAD.
# After updating, please re-set the CVS tag to HEAD.
-DISTNAME= pkglint-4.122
+DISTNAME= pkglint-4.123
CATEGORIES= pkgtools
MASTER_SITES= # none
DISTFILES= # none
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 2065595c8b1..770e536d398 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.845 2012/08/03 09:07:21 asau Exp $
+# $NetBSD: pkglint.pl,v 1.846 2012/08/26 13:47:16 wiz Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -4745,12 +4745,12 @@ sub checkline_mk_shellcmd($$) {
sub expand_permission($) {
my ($perm) = @_;
- my %fullperm = ( "a" => "append", "d" => "default", "p" => "preprocess", "s" => "set", "t" => "runtime", "?" => "unknown" );
- return $fullperm{$perm};
-# for my $element (split(/,/, $perm)) {
-# my ($location, $permission) = split(/:/, $element);
-# return "-- $location == $permission -- ";
-# }
+ # wiz 20120826: IIUC, "u" is the permission for the variable to be used at all here; no need to expand it
+ my %fullperm = ( "a" => "append", "d" => "default", "p" => "preprocess", "s" => "set", "t" => "runtime", "?" => "unknown", "u" => "" );
+ my $result = join(", ", map { $fullperm{$_} } split //, $perm);
+ $result =~ s/, $//g;
+
+ return $result;
}
sub checkline_mk_vardef($$$) {