| @@ -1,15 +1,15 @@ | | | @@ -1,15 +1,15 @@ |
1 | #! @PERL@ | | 1 | #! @PERL@ |
2 | # $NetBSD: pkglint.pl,v 1.855 2013/05/06 02:53:25 obache Exp $ | | 2 | # $NetBSD: pkglint.pl,v 1.856 2013/05/26 18:09:24 wiz Exp $ |
3 | # | | 3 | # |
4 | | | 4 | |
5 | # pkglint - static analyzer and checker for pkgsrc packages | | 5 | # pkglint - static analyzer and checker for pkgsrc packages |
6 | # | | 6 | # |
7 | # Written by: | | 7 | # Written by: |
8 | # Roland Illig <rillig@NetBSD.org> | | 8 | # Roland Illig <rillig@NetBSD.org> |
9 | # | | 9 | # |
10 | # Based on work by: | | 10 | # Based on work by: |
11 | # Hubert Feyrer <hubertf@NetBSD.org> | | 11 | # Hubert Feyrer <hubertf@NetBSD.org> |
12 | # Thorsten Frueauf <frueauf@NetBSD.org> | | 12 | # Thorsten Frueauf <frueauf@NetBSD.org> |
13 | # Thomas Klausner <wiz@NetBSD.org> | | 13 | # Thomas Klausner <wiz@NetBSD.org> |
14 | # and others. | | 14 | # and others. |
15 | # | | 15 | # |
| @@ -3697,28 +3697,27 @@ sub checkline_mk_shelltext($$) { | | | @@ -3697,28 +3697,27 @@ sub checkline_mk_shelltext($$) { |
3697 | $line->log_error("Internal pkglint error: " . scst_statename->[$state] . ": rest=${rest}"); | | 3697 | $line->log_error("Internal pkglint error: " . scst_statename->[$state] . ": rest=${rest}"); |
3698 | } | | 3698 | } |
3699 | } | | 3699 | } |
3700 | | | 3700 | |
3701 | sub checkline_mk_shellcmd($$) { | | 3701 | sub checkline_mk_shellcmd($$) { |
3702 | my ($line, $shellcmd) = @_; | | 3702 | my ($line, $shellcmd) = @_; |
3703 | | | 3703 | |
3704 | checkline_mk_text($line, $shellcmd); | | 3704 | checkline_mk_text($line, $shellcmd); |
3705 | checkline_mk_shelltext($line, $shellcmd); | | 3705 | checkline_mk_shelltext($line, $shellcmd); |
3706 | } | | 3706 | } |
3707 | | | 3707 | |
3708 | sub expand_permission($) { | | 3708 | sub expand_permission($) { |
3709 | my ($perm) = @_; | | 3709 | my ($perm) = @_; |
3710 | # wiz 20120826: IIUC, "u" is the permission for the variable to be used at all here; no need to expand it | | 3710 | my %fullperm = ( "a" => "append", "d" => "default", "p" => "preprocess", "s" => "set", "u" => "runtime", "?" => "unknown" ); |
3711 | my %fullperm = ( "a" => "append", "d" => "default", "p" => "preprocess", "s" => "set", "t" => "runtime", "?" => "unknown", "u" => "" ); | | | |
3712 | my $result = join(", ", map { $fullperm{$_} } split //, $perm); | | 3711 | my $result = join(", ", map { $fullperm{$_} } split //, $perm); |
3713 | $result =~ s/, $//g; | | 3712 | $result =~ s/, $//g; |
3714 | | | 3713 | |
3715 | return $result; | | 3714 | return $result; |
3716 | } | | 3715 | } |
3717 | | | 3716 | |
3718 | sub checkline_mk_vardef($$$) { | | 3717 | sub checkline_mk_vardef($$$) { |
3719 | my ($line, $varname, $op) = @_; | | 3718 | my ($line, $varname, $op) = @_; |
3720 | | | 3719 | |
3721 | $opt_debug_trace and $line->log_debug("checkline_mk_vardef(${varname}, ${op})"); | | 3720 | $opt_debug_trace and $line->log_debug("checkline_mk_vardef(${varname}, ${op})"); |
3722 | | | 3721 | |
3723 | # If we are checking a whole package, add it to the package-wide | | 3722 | # If we are checking a whole package, add it to the package-wide |
3724 | # list of defined variables. | | 3723 | # list of defined variables. |