summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-06-08 07:15:27 +0000
committerrillig <rillig@pkgsrc.org>2006-06-08 07:15:27 +0000
commitc75f288cbdf58acef3c26f0bf660c7f1c2737fb5 (patch)
treebd4466a3d0875092fd0cc89c70bbaff3c1fe39bc /pkgtools
parent61eb32c2348e2dcb72ef3f9b470fd741266e4075 (diff)
downloadpkgsrc-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.pl6
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;