diff options
author | rillig <rillig@pkgsrc.org> | 2018-01-10 00:39:52 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2018-01-10 00:39:52 +0000 |
commit | d0c98098c9447da7f53a01f9a2342294382ea88f (patch) | |
tree | 39a9627a3673e0bd75ff0b47967bd5f7bab023f0 /pkgtools/pkglint/files/shell.go | |
parent | 8475adda0dc468654094742f76f9909006c0d76c (diff) | |
download | pkgsrc-d0c98098c9447da7f53a01f9a2342294382ea88f.tar.gz |
pkglint: Update to 5.5
Changes since 5.4.26:
SUBST blocks are now checked correctly even if they contain conditionals
like .if ... .elif ... .endif.
AUTO_MKDIRS is only suggested for those directories that actually appear
in the PLIST since other directories are not affected by this variable.
Diffstat (limited to 'pkgtools/pkglint/files/shell.go')
-rw-r--r-- | pkgtools/pkglint/files/shell.go | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/pkgtools/pkglint/files/shell.go b/pkgtools/pkglint/files/shell.go index ac6b1450930..90fb2a74d3d 100644 --- a/pkgtools/pkglint/files/shell.go +++ b/pkgtools/pkglint/files/shell.go @@ -628,18 +628,28 @@ func (scc *SimpleCommandChecker) checkAutoMkdirs() { for _, arg := range scc.strcmd.Args { if !contains(arg, "$$") && !matches(arg, `\$\{[_.]*[a-z]`) { if m, dirname := match1(arg, `^(?:\$\{DESTDIR\})?\$\{PREFIX(?:|:Q)\}/(.*)`); m { - scc.shline.mkline.Notef("You can use AUTO_MKDIRS=yes or \"INSTALLATION_DIRS+= %s\" instead of %q.", dirname, cmdname) - Explain( - "Many packages include a list of all needed directories in their", - "PLIST file. In such a case, you can just set AUTO_MKDIRS=yes and", - "be done. The pkgsrc infrastructure will then create all directories", - "in advance.", - "", - "To create directories that are not mentioned in the PLIST file, it", - "is easier to just list them in INSTALLATION_DIRS than to execute the", - "commands explicitly. That way, you don't have to think about which", - "of the many INSTALL_*_DIR variables is appropriate, since", - "INSTALLATION_DIRS takes care of that.") + if G.Pkg != nil && G.Pkg.PlistDirs[dirname] { + scc.shline.mkline.Notef("You can use AUTO_MKDIRS=yes or \"INSTALLATION_DIRS+= %s\" instead of %q.", dirname, cmdname) + Explain( + "Many packages include a list of all needed directories in their", + "PLIST file. In such a case, you can just set AUTO_MKDIRS=yes and", + "be done. The pkgsrc infrastructure will then create all directories", + "in advance.", + "", + "To create directories that are not mentioned in the PLIST file, it", + "is easier to just list them in INSTALLATION_DIRS than to execute the", + "commands explicitly. That way, you don't have to think about which", + "of the many INSTALL_*_DIR variables is appropriate, since", + "INSTALLATION_DIRS takes care of that.") + } else { + scc.shline.mkline.Notef("You can use \"INSTALLATION_DIRS+= %s\" instead of %q.", dirname, cmdname) + Explain( + "To create directories during installation, it is easier to just", + "list them in INSTALLATION_DIRS than to execute the commands", + "explicitly. That way, you don't have to think about which", + "of the many INSTALL_*_DIR variables is appropriate, since", + "INSTALLATION_DIRS takes care of that.") + } } } } |