summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2005-09-02 10:42:18 +0000
committerrillig <rillig>2005-09-02 10:42:18 +0000
commit4d2a74099883838512e980af36dbcd98cde4fefd (patch)
tree3f5951530d2ea8e918ced09738e1a1fed67e58f8 /pkgtools
parent4293751022f30417a4a100138c85540debcbe047 (diff)
downloadpkgsrc-4d2a74099883838512e980af36dbcd98cde4fefd.tar.gz
In the diagnostics, "../../" path components that are not at the
beginning are stripped to make the output less verbose. The beginning is needed to have a reference from which package the file is included, so it is not stripped.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index e0c8d425496..9b9276a09f1 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.266 2005/09/02 10:11:24 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.267 2005/09/02 10:42:18 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -117,6 +117,10 @@ sub log_message($$$$$) {
$file =~ s,^(?:\./)+,,;
$file =~ s,/(?:\./)+,/,g;
$file =~ s,/+,/,g;
+
+ # strip intermediate "../.." path components
+ while ($file =~ s,/[^.][^/]*/[^.][^/]*/\.\./\.\./,/,) {
+ }
}
$text = "";