pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Some commands like "mktexlsr" a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1f94599c4c75
branches:  trunk
changeset: 538038:1f94599c4c75
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri Jan 25 17:59:24 2008 +0000

description:
Some commands like "mktexlsr" and "texconfig" must not be called from
package Makefiles.

diffstat:

 pkgtools/pkglint/files/pkglint.pl |  13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 9b35f3c89058 -r 1f94599c4c75 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Fri Jan 25 14:42:27 2008 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Fri Jan 25 17:59:24 2008 +0000
@@ -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 @@
 
        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 @@
                        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})) {



Home | Main Index | Thread Index | Old Index