pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Only adjust the directory depth...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e884323a9871
branches:  trunk
changeset: 514134:e884323a9871
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Jun 08 07:15:27 2006 +0000

description:
Only adjust the directory depth if there are exactly two leading ".."
path components. The old behavior has led to error messages while
checking the files in mk/flavor/pkg.

diffstat:

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

diffs (21 lines):

diff -r a27561acc8b7 -r e884323a9871 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Thu Jun 08 07:11:26 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Thu Jun 08 07:15:27 2006 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.610 2006/06/08 07:11:26 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.611 2006/06/08 07:15:27 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -2346,8 +2346,8 @@
        $relpath =~ s,\$\{PHPPKGSRCDIR\},../../lang/php5,;
        $relpath =~ s,\$\{SUSE_DIR_PREFIX\},suse91,;
        $relpath =~ s,\$\{PYPKGSRCDIR\},../../lang/python23,;
-       if ($adjust_depth) {
-               $relpath =~ s,\.\./\.\.,$pkgsrcdir,;
+       if ($adjust_depth && $relpath =~ qr"^\.\./\.\./([^.].*)$") {
+               $relpath = "../../$1";
        }
        if (defined($pkgdir)) {
                $relpath =~ s,\$\{PKGDIR\},$pkgdir,g;



Home | Main Index | Thread Index | Old Index