pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files In the diagnostics, "../../" pa...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/edd8b0f6df91
branches:  trunk
changeset: 498752:edd8b0f6df91
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri Sep 02 10:42:18 2005 +0000

description:
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:

 pkgtools/pkglint/files/pkglint.pl |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r a0a6c4509915 -r edd8b0f6df91 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Fri Sep 02 10:22:38 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Fri Sep 02 10:42:18 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.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 @@
                $file =~ s,^(?:\./)+,,;
                $file =~ s,/(?:\./)+,/,g;
                $file =~ s,/+,/,g;
+
+               # strip intermediate "../.." path components
+               while ($file =~ s,/[^.][^/]*/[^.][^/]*/\.\./\.\./,/,) {
+               }
        }
 
        $text = "";



Home | Main Index | Thread Index | Old Index