summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-02-11 12:47:05 +0000
committerrillig <rillig@pkgsrc.org>2006-02-11 12:47:05 +0000
commit7135541b60e4955ae3fe4efd6e703c8861cd7a26 (patch)
treef425c56deb822a2ed3f7e104561b2d35a83119a6 /pkgtools
parent8ec9cc07834e7d768b1618fa97dad0341c3eb9b9 (diff)
downloadpkgsrc-7135541b60e4955ae3fe4efd6e703c8861cd7a26.tar.gz
- Absolute pathnames are interpreted as such when pkglint checks whether
the file exists or not.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl4
1 files changed, 2 insertions, 2 deletions
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);