diff options
author | rillig <rillig@pkgsrc.org> | 2006-06-17 10:03:09 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-06-17 10:03:09 +0000 |
commit | 7332b1c2ccfd65669533c9a65af7014394882bf7 (patch) | |
tree | c203138749d5bb08a60222985cc8cad15a5129bd /pkgtools | |
parent | ed8b654c6f72602058baea8c93c755d141319d36 (diff) | |
download | pkgsrc-7332b1c2ccfd65669533c9a65af7014394882bf7.tar.gz |
${CP} should not be used to install files, since it cannot overwrite
read-only files.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 71e1c67ff6d..9a46e806ff4 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.623 2006/06/17 09:51:19 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.624 2006/06/17 10:03:09 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -3358,6 +3358,17 @@ sub checkline_mk_shellcmd_use($$) { "the prepared files to their final location. The file's contents should", "not be changed anymore."); + } elsif ($shellcmd eq "\${CP}") { + $line->log_warning("\${CP} should not be used to install files."); + $line->explain_warning( + "The \${CP} command is highly platform dependent and cannot overwrite", + "files that don't have write permission. Please use \${PAX} instead.", + "", + "For example, instead of", + "\t\${CP} -R \${WRKSRC}/* \${PREFIX}/foodir", + "you should use", + "\tcd \${WRKSRC} && \${PAX} -wr * \${PREFIX}/foodir"); + } else { $opt_debug_misc and $line->log_debug("May \"${shellcmd}\" be used in the install phase?"); } |