pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files The diagnostics for package upd...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b1481a82b8f3
branches: trunk
changeset: 511230:b1481a82b8f3
user: rillig <rillig%pkgsrc.org@localhost>
date: Wed Apr 12 08:49:57 2006 +0000
description:
The diagnostics for package updates now include the reason that is given
in doc/TODO, which is often a reference to a PR.
diffstat:
pkgtools/pkglint/files/makevars.map | 5 ++++-
pkgtools/pkglint/files/pkglint.pl | 26 ++++++++++++--------------
2 files changed, 16 insertions(+), 15 deletions(-)
diffs (90 lines):
diff -r 435a0f4aabce -r b1481a82b8f3 pkgtools/pkglint/files/makevars.map
--- a/pkgtools/pkglint/files/makevars.map Wed Apr 12 08:48:29 2006 +0000
+++ b/pkgtools/pkglint/files/makevars.map Wed Apr 12 08:49:57 2006 +0000
@@ -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 @@
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 @@
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 -r 435a0f4aabce -r b1481a82b8f3 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Wed Apr 12 08:48:29 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Wed Apr 12 08:49:57 2006 +0000
@@ -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 @@
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 @@
}
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 @@
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}.");
}
}
}
Home |
Main Index |
Thread Index |
Old Index