pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files - Absolute pathnames are interp...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f80005fdfff3
branches:  trunk
changeset: 507912:f80005fdfff3
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat Feb 11 12:47:05 2006 +0000

description:
- Absolute pathnames are interpreted as such when pkglint checks whether
  the file exists or not.

diffstat:

 pkgtools/pkglint/files/pkglint.pl |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 4cb59e0a8885 -r f80005fdfff3 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sat Feb 11 11:55:19 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sat Feb 11 12:47:05 2006 +0000
@@ -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 @@
        $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);



Home | Main Index | Thread Index | Old Index