summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-02-06 09:46:42 +0000
committerrillig <rillig@pkgsrc.org>2006-02-06 09:46:42 +0000
commitf017b5590ffce68ea2a4c08a24c5f4ceb9987556 (patch)
treef04a7843e3e480b7f9763b2c798e9d225af22dac /pkgtools
parent180d61286fabe52d4952c2d1e21272d61ae4a107 (diff)
downloadpkgsrc-f017b5590ffce68ea2a4c08a24c5f4ceb9987556.tar.gz
- Don't emit an extra warning if a tool should be added to USE_TOOLS. Just
append it to the previous line.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 273950042f6..7ad6275c569 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.499 2006/02/04 03:37:08 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.500 2006/02/06 09:46:42 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -2484,12 +2484,14 @@ sub checkline_mk_shelltext($$) {
#
if ($state == SCST_START && exists($vartools->{$shellword})) {
- $line->log_warning("Possible direct use of tool \"${shellword}\". Please use \$\{$vartools->{$shellword}\} instead.");
+ my $addition = "";
+
if (!exists(get_predefined_vartool_names->{$shellword})) {
my $toolvarname = get_vartool_names->{$shellword};
my $toolname = get_varname_to_toolname->{$toolvarname};
- $line->log_warning("Additionally, you should add USE_TOOLS+=${toolname} before this line.");
+ $addition = " and add USE_TOOLS+=${toolname} before this line";
}
+ $line->log_warning("Possible direct use of tool \"${shellword}\". Please use \$\{$vartools->{$shellword}\} instead${addition}.");
}
if (($state != SCST_PAX_S && $state != SCST_SED_E && $state != SCST_CASE_LABEL) && $shellword =~ qr"^/" && $shellword ne "/dev/null") {