summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2008-01-25 17:59:24 +0000
committerrillig <rillig>2008-01-25 17:59:24 +0000
commit54927c9344808a42fa65ee940e644dd3d589be62 (patch)
tree7faa20fd4bf57f5b8adf33e891a3def7ab22dbe2 /pkgtools
parent2bfc2279aedee3aa9307176085198532c448ffaa (diff)
downloadpkgsrc-54927c9344808a42fa65ee940e644dd3d589be62.tar.gz
Some commands like "mktexlsr" and "texconfig" must not be called from
package Makefiles.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 438e6c5e2fc..4dd2ded0b9a 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.756 2008/01/10 03:33:46 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.757 2008/01/25 17:59:24 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -4564,8 +4564,9 @@ sub checkline_mk_shelltext($$) {
use constant forbidden_commands => array_to_hash(qw(
ktrace
+ mktexlsr
strace
- truss
+ texconfig truss
));
if ($text =~ qr"\$\{SED\}" && $text =~ qr"\$\{MV\}") {
@@ -4655,8 +4656,12 @@ sub checkline_mk_shelltext($$) {
if ($shellword eq "\${RUN}") {
# Just skip this one.
- } elsif (exists(forbidden_commands->{$shellword})) {
- $line->log_error("${shellword} is forbidden and must not be used.");
+ } elsif (exists(forbidden_commands->{basename($shellword)})) {
+ $line->log_error("${shellword} must not be used in Makefiles.");
+ $line->explain_error(
+"This command must appear in INSTALL scripts, not in the package",
+"Makefile, so that the package also works if it is installed as a binary",
+"package via pkg_add.");
} elsif (exists(get_tool_names()->{$shellword})) {
if (!exists($mkctx_tools->{$shellword})) {