summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-02-11 17:01:29 +0000
committerrillig <rillig@pkgsrc.org>2005-02-11 17:01:29 +0000
commit3f3a61f888c1feee92d345ebfeda73660d990546 (patch)
tree9bb0589e176c53a012c5a0c0ae7e000218b0ad68 /pkgtools
parent239f7cd34f8d349f45db04b3b2820b5c40311fe2 (diff)
downloadpkgsrc-3f3a61f888c1feee92d345ebfeda73660d990546.tar.gz
Fixed bug in checkline_trailing_whitespace. No warnings were emitted
before. Stripped non-leading "." path components in the log messages. Welcome to 4.01.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/Makefile4
-rw-r--r--pkgtools/pkglint/files/pkglint.pl6
2 files changed, 6 insertions, 4 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index 24986eba070..816dcf2f08e 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.214 2005/02/05 15:39:44 wiz Exp $
+# $NetBSD: Makefile,v 1.215 2005/02/11 17:01:29 rillig Exp $
#
-DISTNAME= pkglint-4.00
+DISTNAME= pkglint-4.01
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 29be68bc32f..026723b1efd 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -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.126 2004/12/27 18:19:48 wiz Exp $
+# $NetBSD: pkglint.pl,v 1.127 2005/02/11 17:01:29 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by Hubert Feyrer <hubertf@netbsd.org>,
@@ -82,7 +82,9 @@ sub log_message($$$$)
{
my ($file, $lineno, $type, $message) = @_;
if ($file ne NO_FILE) {
+ # strip "." path components
$file =~ s,^(?:\./)+,,;
+ $file =~ s,/(?:\./)+,/,g;
}
if ($file eq NO_FILE) {
printf("%s: %s\n", $type, $message);
@@ -662,7 +664,7 @@ sub checkline_valid_characters($$) {
sub checkline_trailing_whitespace($) {
my ($line) = @_;
- if ($line =~ /\s+$/) {
+ if ($line->text =~ /\s+$/) {
log_warning($line->file, $line->lineno, "Trailing white space.");
}
return true;