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 warn about pkgbase and pk...
details: https://anonhg.NetBSD.org/pkgsrc/rev/ca78f9c17356
branches: trunk
changeset: 546349:ca78f9c17356
user: rillig <rillig%pkgsrc.org@localhost>
date: Thu Aug 28 20:38:39 2008 +0000
description:
Don't warn about pkgbase and pkg-build-options.mk in the buildlink3.mk
files, since that pattern has become quite common.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diffs (39 lines):
diff -r 7b0a5b2a21c6 -r ca78f9c17356 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Thu Aug 28 20:13:18 2008 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Thu Aug 28 20:38:39 2008 +0000
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.770 2008/07/25 14:15:44 dillo Exp $
+# $NetBSD: pkglint.pl,v 1.771 2008/08/28 20:38:39 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -5857,7 +5857,11 @@
# If the variable is not used and is untyped, it may be a
# spelling mistake.
- if (!var_is_used($varname)) {
+ if ($op eq ":=" && $varname eq lc($varname)) {
+ $opt_warn_unchecked and $line->log_warning("${varname} might be unused unless it is an argument to a procedure file.");
+ # TODO: check $varname against the list of "procedure files".
+
+ } elsif (!var_is_used($varname)) {
my $vartypes = get_vartypes_map();
my $deprecated = get_deprecated_map();
@@ -6747,6 +6751,15 @@
}
expect_empty_line($lines, \$lineno);
+ # Before the fifth paragraph, it may be necessary to resolve the build
+ # options of other packages.
+ if (expect($lines, \$lineno, qr"^pkgbase\s*:=\s*(\S+)$")) {
+ do {
+ expect_text($lines, \$lineno, ".include \"../../mk/pkg-build-options.mk\"");
+ } while (expect($lines, \$lineno, qr"^pkgbase\s*:=\s*(\S+)$"));
+ expect_empty_line($lines, \$lineno);
+ }
+
# Fifth paragraph (optional): Dependencies.
my $have_dependencies = false;
my $need_empty_line = false;
Home |
Main Index |
Thread Index |
Old Index