diff options
author | wiz <wiz@pkgsrc.org> | 2012-08-26 13:47:16 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2012-08-26 13:47:16 +0000 |
commit | 12975e3eb3bea35877d8cda14a03ac7d0d9883c8 (patch) | |
tree | 050d4fe6f032702545ed9112dd9455beba277260 /pkgtools/pkglint | |
parent | 8f89b4d49727a2e45936fb5ea23063fdd2c4c68f (diff) | |
download | pkgsrc-12975e3eb3bea35877d8cda14a03ac7d0d9883c8.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/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 14 |
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($$$) { |