pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files - Don't emit an extra warning i...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/409a5434abd9
branches:  trunk
changeset: 507658:409a5434abd9
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Mon Feb 06 09:46:42 2006 +0000

description:
- Don't emit an extra warning if a tool should be added to USE_TOOLS. Just
  append it to the previous line.

diffstat:

 pkgtools/pkglint/files/pkglint.pl |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r baf84364ef28 -r 409a5434abd9 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Mon Feb 06 09:20:45 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Mon Feb 06 09:46:42 2006 +0000
@@ -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 @@
                #
 
                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") {



Home | Main Index | Thread Index | Old Index