diff options
author | rillig <rillig@pkgsrc.org> | 2006-06-08 07:15:27 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-06-08 07:15:27 +0000 |
commit | c75f288cbdf58acef3c26f0bf660c7f1c2737fb5 (patch) | |
tree | bd4466a3d0875092fd0cc89c70bbaff3c1fe39bc /pkgtools | |
parent | 61eb32c2348e2dcb72ef3f9b470fd741266e4075 (diff) | |
download | pkgsrc-c75f288cbdf58acef3c26f0bf660c7f1c2737fb5.tar.gz |
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 (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 02da5da72ac..26232a00041 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -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 @@ sub resolve_relative_path($$) { $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; |