From 7135541b60e4955ae3fe4efd6e703c8861cd7a26 Mon Sep 17 00:00:00 2001 From: rillig Date: Sat, 11 Feb 2006 12:47:05 +0000 Subject: - Absolute pathnames are interpreted as such when pkglint checks whether the file exists or not. --- pkgtools/pkglint/files/pkglint.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgtools') diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 453130163a0..c4173b3d907 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.508 2006/02/11 11:55:19 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.509 2006/02/11 12:47:05 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -2122,7 +2122,7 @@ sub checkline_relative_path($$) { $res_path = resolve_relative_path($path, true); if ($res_path =~ regex_unresolved) { $line->log_info("Unresolved path: \"${path}\"."); - } elsif (!-e "${current_dir}/${res_path}") { + } elsif (!-e ((($res_path =~ qr"^/") ? "" : "${current_dir}/") . $res_path)) { $line->log_error("\"${res_path}\" does not exist."); } elsif ($path =~ qr"^\.\./\.\./([^/]+)/([^/]+)(.*)") { my ($cat, $pkg, $rest) = ($1, $2, $3); -- cgit v1.2.3