From 81d6aae9287795734ff4ce9e2873847da32c96b8 Mon Sep 17 00:00:00 2001 From: rillig Date: Wed, 7 Dec 2005 18:46:28 +0000 Subject: - Added a check that exists if RelativePkgDir exists. Suggested by wiz in a private mail. --- pkgtools/pkglint/files/pkglint.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pkgtools') diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 2ae8acc99c8..eaad3911d71 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.428 2005/12/06 22:07:35 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.429 2005/12/07 18:46:28 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by: @@ -1842,7 +1842,11 @@ sub checkline_mk_vartype_basic($$$$$) { $line->log_error("\"${varname}\" is a read-only variable and therefore must not be modified."); } elsif ($type eq "RelativePkgDir") { - if ($value !~ qr"^\.\./\.\./[^/]+/[^/]+$") { + if ($value =~ qr"^\.\./\.\./[^/]+/[^/]+$") { + if (!-d "${current_dir}/${value}") { + $line->log_error("The directory \"${value}\" does not exist."); + } + } else { $line->log_warning("\"${value}\" is not a valid relative package directory."); $line->explain( "A relative package directory always starts with \"../../\", followed", -- cgit v1.2.3