pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Updated pkglint to 4.28.
details: https://anonhg.NetBSD.org/pkgsrc/rev/b34b3cd4f4e3
branches: trunk
changeset: 500899:b34b3cd4f4e3
user: rillig <rillig%pkgsrc.org@localhost>
date: Fri Oct 14 00:05:23 2005 +0000
description:
Updated pkglint to 4.28.
Added support to typecheck "List of Something" in Makefile variables.
DEPENDS and BUILD_DEPENDS are of type List of Dependency, CFLAGS are
simply a List.
diffstat:
doc/CHANGES | 3 ++-
pkgtools/pkglint/Makefile | 4 ++--
pkgtools/pkglint/files/makevars.map | 9 ++++++++-
pkgtools/pkglint/files/pkglint.pl | 29 +++++++++++++++++++++++++++--
4 files changed, 39 insertions(+), 6 deletions(-)
diffs (100 lines):
diff -r cabfd871c2c8 -r b34b3cd4f4e3 doc/CHANGES
--- a/doc/CHANGES Thu Oct 13 21:35:44 2005 +0000
+++ b/doc/CHANGES Fri Oct 14 00:05:23 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.11469 2005/10/13 21:35:44 xtraeme Exp $
+$NetBSD: CHANGES,v 1.11470 2005/10/14 00:06:06 rillig Exp $
Changes to the packages collection and infrastructure in 2005:
@@ -4571,3 +4571,4 @@
Updated comms/synce-rra to 0.9.1nb2 [wiz 2005-10-13]
Added sysutils/xenkernel20 version 2.0.7 [agc 2005-10-13]
Updated archivers/libarchive to 1.02.036 [xtraeme 2005-10-13]
+ Updated pkgtools/pkglint to 4.28 [rillig 2005-10-14]
diff -r cabfd871c2c8 -r b34b3cd4f4e3 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Thu Oct 13 21:35:44 2005 +0000
+++ b/pkgtools/pkglint/Makefile Fri Oct 14 00:05:23 2005 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.263 2005/10/13 00:23:53 rillig Exp $
+# $NetBSD: Makefile,v 1.264 2005/10/14 00:05:23 rillig Exp $
#
-DISTNAME= pkglint-4.27
+DISTNAME= pkglint-4.28
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff -r cabfd871c2c8 -r b34b3cd4f4e3 pkgtools/pkglint/files/makevars.map
--- a/pkgtools/pkglint/files/makevars.map Thu Oct 13 21:35:44 2005 +0000
+++ b/pkgtools/pkglint/files/makevars.map Fri Oct 14 00:05:23 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.14 2005/09/28 14:12:38 rillig Exp $
+# $NetBSD: makevars.map,v 1.15 2005/10/14 00:05:23 rillig Exp $
#
# This file tries to guess the type of some variables, according to their
@@ -57,3 +57,10 @@
NO_PKGTOOLS_REQD_CHECK Yes_Or_Undefined
NO_PKG_REGISTER Yes_Or_Undefined
BUILD_USES_MSGFMT Yes_Or_Undefined
+
+DEPENDS List of Dependency
+BUILD_DEPENDS List of Dependency
+CFLAGS List
+CPPFLAGS List
+LDFLAGS List
+LIBS List
diff -r cabfd871c2c8 -r b34b3cd4f4e3 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Thu Oct 13 21:35:44 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Fri Oct 14 00:05:23 2005 +0000
@@ -11,7 +11,7 @@
# Freely redistributable. Absolutely no warranty.
#
# From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp
-# $NetBSD: pkglint.pl,v 1.297 2005/10/13 00:23:53 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.298 2005/10/14 00:05:23 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -578,7 +578,7 @@
if ($line->text =~ qr"^(?:#.*|\s*)$") {
# ignore empty and comment lines
- } elsif ($line->text =~ qr"^([\w\d_.]+)\s+([\w_]+)$") {
+ } elsif ($line->text =~ qr"^([\w\d_.]+)\s+([\w_ ]+)$") {
$vartypes->{$1} = $2;
} else {
@@ -1289,6 +1289,31 @@
$line->log_warning("\"$value\" is not a valid Integer.");
}
+ } elsif ($type =~ qr"^List(?: of (.*))?$") {
+ my ($element_type) = ($1);
+
+ if ($op ne "+=" && $value !~ qr"^#") {
+ $line->log_warning("${varname} should be modified using \"+=\".");
+ }
+
+ if (!defined($element_type)) {
+ # no further checks possible.
+
+ } elsif ($element_type eq "Dependency") {
+ if ($value =~ $regex_unresolved) {
+ # don't even try to check anything
+ } elsif ($value =~ qr":\.\./\.\./") {
+ # great.
+ } elsif ($value =~ qr":\.\./") {
+ $line->log_warning("Dependencies should have the form \"../../category/package\".");
+ } else {
+ $line->log_warning("Unknown dependency format.");
+ }
+
+ } else {
+ $line->log_error("[internal] Element-type ${element_type} unknown.");
+ }
+
} else {
$line->log_error("[internal] Type $type unknown.");
}
Home |
Main Index |
Thread Index |
Old Index