summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-04-12 08:49:57 +0000
committerrillig <rillig@pkgsrc.org>2006-04-12 08:49:57 +0000
commit63f86ff4c5f2c51aab4b8eb43145f6712599e3c3 (patch)
tree0a2ebde6e87a4dd8a0cc3c72501a256bf5402408
parenteed0008e56c3c252d820d59e16cb7609f9090e29 (diff)
downloadpkgsrc-63f86ff4c5f2c51aab4b8eb43145f6712599e3c3.tar.gz
The diagnostics for package updates now include the reason that is given
in doc/TODO, which is often a reference to a PR.
-rw-r--r--pkgtools/pkglint/files/makevars.map5
-rw-r--r--pkgtools/pkglint/files/pkglint.pl24
2 files changed, 15 insertions, 14 deletions
diff --git a/pkgtools/pkglint/files/makevars.map b/pkgtools/pkglint/files/makevars.map
index a5629d52c11..a41e272c292 100644
--- a/pkgtools/pkglint/files/makevars.map
+++ b/pkgtools/pkglint/files/makevars.map
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.79 2006/03/14 14:20:13 rillig Exp $
+# $NetBSD: makevars.map,v 1.80 2006/04/12 08:49:57 rillig Exp $
#
# This file contains the guessed type of some variables, according to
@@ -50,6 +50,8 @@ BDB_TYPE Readonly
BROKEN Message
BROKEN_GETTEXT_DETECTION YesNo
BROKEN_IN List of BrokenIn
+BUILDLINK_ABI_DEPENDS List of Dependency
+BUILDLINK_API_DEPENDS List of Dependency
BUILDLINK_CONTENTS_FILTER List of ShellWord
# ^^ ShellCommand
BUILDLINK_CFLAGS List+ of CFlag
@@ -405,6 +407,7 @@ UNWRAP_FILES List+ of Pathmask
USE_BUILTIN YesNoFromCommand
USE_CROSSBASE Yes
USE_DIRS List of PkgName
+USE_GNU_CONFIGURE_HOST YesNo
USE_GNU_ICONV Yes
USE_GNU_READLINE Yes
USE_IMAKE Yes
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index fe231fb2c64..fe69d8cfe4e 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.551 2006/04/12 08:23:49 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.552 2006/04/12 08:49:57 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -1825,7 +1825,7 @@ sub get_doc_TODO_updates() {
log_fatal($fname, NO_LINE_NUMBER, "Cannot be read.");
}
- $updates = {};
+ $updates = [];
$state = 0;
foreach my $line (@{$lines}) {
my $text = $line->text;
@@ -1841,10 +1841,10 @@ sub get_doc_TODO_updates() {
}
if ($state == 3) {
- if ($text =~ qr"^\to\s(\S+)") {
- my ($spuname) = ($1);
+ if ($text =~ qr"^\to\s(\S+)(?:\s*(.+))?$") {
+ my ($spuname, $comment) = ($1, $2);
if ($spuname =~ regex_pkgname) {
- $updates->{$spuname} = $line;
+ push(@{$updates}, [$line, $1, $2, $comment]);
} else {
$line->log_warning("Invalid package name $spuname");
}
@@ -4237,23 +4237,21 @@ sub checkfile_package_Makefile($$$) {
if (defined($pkgname) && $pkgname =~ regex_pkgname) {
my ($pkgbase, $pkgver) = ($1, $2);
- my $updates = get_doc_TODO_updates();
- foreach my $suggested_update (keys(%{$updates})) {
- next unless ($suggested_update =~ regex_pkgname);
- my ($suggbase, $suggver) = ($1, $2);
+ foreach my $suggested_update (@{get_doc_TODO_updates()}) {
+ my ($line, $suggbase, $suggver, $suggcomm) = @{$suggested_update};
+ my $comment = (defined($suggcomm) ? " (${suggcomm})" : "");
next unless $pkgbase eq $suggbase;
- my $line = $updates->{$suggested_update};
if (dewey_cmp($pkgver, "<", $suggver)) {
- $pkgname_line->log_warning("This package should be updated to ${suggver}.");
+ $pkgname_line->log_warning("This package should be updated to ${suggver}${comment}.");
}
if (dewey_cmp($pkgver, "==", $suggver)) {
- $pkgname_line->log_note("The update request to ${suggver} from doc/TODO has been done.");
+ $pkgname_line->log_note("The update request to ${suggver} from doc/TODO${comment} has been done.");
}
if (dewey_cmp($pkgver, ">", $suggver)) {
- $pkgname_line->log_note("This package is newer than the update request to ${suggver}.");
+ $pkgname_line->log_note("This package is newer than the update request to ${suggver}${comment}.");
}
}
}