summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2013-08-15 20:30:43 +0000
committerrillig <rillig@pkgsrc.org>2013-08-15 20:30:43 +0000
commit52307a19407ae0a03b8b746d27f41deb1063f52a (patch)
tree07a669be3d6593be70d9f88ec15c80e41d89c820 /pkgtools
parent45e5147a68c4bef49021ed340184146d9220ab9a (diff)
downloadpkgsrc-52307a19407ae0a03b8b746d27f41deb1063f52a.tar.gz
- added type definitions for two variables
- improved wording of some warnings - added explanations to some common warnings
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/makevars.map4
-rw-r--r--pkgtools/pkglint/files/pkglint.pl23
2 files changed, 23 insertions, 4 deletions
diff --git a/pkgtools/pkglint/files/makevars.map b/pkgtools/pkglint/files/makevars.map
index 97b10605ec3..c911acfd734 100644
--- a/pkgtools/pkglint/files/makevars.map
+++ b/pkgtools/pkglint/files/makevars.map
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.235 2013/08/15 17:57:44 wiz Exp $
+# $NetBSD: makevars.map,v 1.236 2013/08/15 20:30:43 rillig Exp $
#
# This file contains the guessed type of some variables, according to
@@ -210,6 +210,7 @@ CC ShellCommand [$system]
CFLAGS* List of CFlag [$package_list]
# ^^ may also be changed by the user
CHECK_BUILTIN YesNo [builtin.mk:d,m:s]
+CHECK_BUILTIN.* YesNo [*:p]
CHECK_FILES_SKIP List of Pathmask [m:a,c:a]
CHECK_FILES_SUPPORTED YesNo [$package]
CHECK_HEADERS YesNo [$user]
@@ -367,6 +368,7 @@ GNU_CONFIGURE_PREFIX Pathname [m:s]
HAS_CONFIGURE Yes [m:s,c:s]
HEADER_TEMPLATES List of Pathname [$package_list]
HOMEPAGE URL [$package]
+IGNORE_PKG.* Yes [*:sp]
INCOMPAT_CURSES InternalList of PlatformTriple [m:as]
INCOMPAT_ICONV InternalList of PlatformTriple
INFO_DIR Pathname
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 92dbc553442..6ca9ff650bb 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.856 2013/05/26 18:09:24 wiz Exp $
+# $NetBSD: pkglint.pl,v 1.857 2013/08/15 20:30:43 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -4253,7 +4253,7 @@ sub checkline_mk_vartype_basic($$$$$$$$) {
$line->log_warning("${varname} must be a positive integer number.");
}
if ($line->fname !~ m"(?:^|/)Makefile$") {
- $line->log_error("${varname} must not be set outside the package Makefile.");
+ $line->log_error("${varname} only makes sense directly in the package Makefile.");
$line->explain_error(
"Usually, different packages using the same Makefile.common have",
"different dependencies and will be bumped at different times (e.g. for",
@@ -6142,7 +6142,7 @@ sub checkfile_package_Makefile($$) {
}
if (!exists($pkgctx_vardef->{"LICENSE"})) {
- log_error($fname, NO_LINE_NUMBER, "All packages must define their LICENSE.");
+ log_error($fname, NO_LINE_NUMBER, "Each package must define its LICENSE.");
}
if (exists($pkgctx_vardef->{"GNU_CONFIGURE"}) && exists($pkgctx_vardef->{"USE_LANGUAGES"})) {
@@ -6230,6 +6230,9 @@ sub checkfile_package_Makefile($$) {
if (dewey_cmp($effective_pkgversion, "<", $suggver)) {
$effective_pkgname_line->log_warning("This package should be updated to ${suggver}${comment}.");
+ $effective_pkgname_line->explain_warning(
+"The wishlist for package updates in doc/TODO mentions that a newer",
+"version of this package is available.");
}
if (dewey_cmp($effective_pkgversion, "==", $suggver)) {
$effective_pkgname_line->log_note("The update request to ${suggver} from doc/TODO${comment} has been done.");
@@ -6282,6 +6285,16 @@ sub checkfile_patch($) {
UFA UH UL
);
+ my @comment_explanation = (
+"Each patch must document why it is necessary. If it has been applied",
+"because of a security issue, a reference to the CVE should be mentioned",
+"as well.",
+"",
+"Since it is our goal to have as few patches as possible, all patches",
+"should be sent to the upstream maintainers of the package. After you",
+"have done so, you should add a reference to the bug report containing",
+"the patch.");
+
my ($line, $m);
my $check_text = sub($) {
@@ -6433,11 +6446,13 @@ sub checkfile_patch($) {
}], [PST_TEXT, re_patch_cfd, PST_CFA, sub() {
if (!$seen_comment) {
$line->log_error("Comment expected.");
+ $line->explain_error(@comment_explanation);
}
$line->log_warning("Please use unified diffs (diff -u) for patches.");
}], [PST_TEXT, re_patch_ufd, PST_UFA, sub() {
if (!$seen_comment) {
$line->log_error("Comment expected.");
+ $line->explain_error(@comment_explanation);
}
}], [PST_TEXT, re_patch_text, PST_TEXT, sub() {
$seen_comment = true;
@@ -6450,6 +6465,7 @@ sub checkfile_patch($) {
$opt_warn_space and $line->log_note("Empty line expected.");
} else {
$line->log_error("Comment expected.");
+ $line->explain_error(@comment_explanation);
}
$line->log_warning("Please use unified diffs (diff -u) for patches.");
}], [PST_CENTER, re_patch_ufd, PST_UFA, sub() {
@@ -6457,6 +6473,7 @@ sub checkfile_patch($) {
$opt_warn_space and $line->log_note("Empty line expected.");
} else {
$line->log_error("Comment expected.");
+ $line->explain_error(@comment_explanation);
}
}], [PST_CENTER, undef, PST_TEXT, sub() {
$opt_warn_space and $line->log_note("Empty line expected.");