Skip to content

Commit

Permalink
Some commands like "mktexlsr" and "texconfig" must not be called from
Browse files Browse the repository at this point in the history
package Makefiles.
  • Loading branch information
rillig committed Jan 25, 2008
1 parent 94c6618 commit cf6cd3f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pkgtools/pkglint/files/pkglint.pl
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -4564,8 +4564,9 @@ ($$)

use constant forbidden_commands => array_to_hash(qw(
ktrace
mktexlsr
strace
truss
texconfig truss
));

if ($text =~ qr"\$\{SED\}" && $text =~ qr"\$\{MV\}") {
Expand Down Expand Up @@ -4655,8 +4656,12 @@ ($$)
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})) {
Expand Down

0 comments on commit cf6cd3f

Please sign in to comment.