pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files TOOLS_DEPENDS.* names a depende...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f81584a8eb17
branches:  trunk
changeset: 551424:f81584a8eb17
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Mon Dec 15 12:47:31 2008 +0000

description:
TOOLS_DEPENDS.* names a dependency, and all the directories that are
mentioned in it must actually contain a Makefile.

diffstat:

 pkgtools/pkglint/files/makevars.map |   3 ++-
 pkgtools/pkglint/files/pkglint.pl   |  10 ++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r 113209a98c60 -r f81584a8eb17 pkgtools/pkglint/files/makevars.map
--- a/pkgtools/pkglint/files/makevars.map       Mon Dec 15 12:28:49 2008 +0000
+++ b/pkgtools/pkglint/files/makevars.map       Mon Dec 15 12:47:31 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.187 2008/11/18 08:04:35 rillig Exp $
+# $NetBSD: makevars.map,v 1.188 2008/12/15 12:47:31 rillig Exp $
 #
 
 # This file contains the guessed type of some variables, according to
@@ -669,6 +669,7 @@
 TOOLS_ALIASES          List of Filename [$system]
 TOOLS_BROKEN           List of Tool [$system]
 TOOLS_CREATE           List of Tool [$system]
+TOOLS_DEPENDS.*                InternalList of DependencyWithPath [$system]
 TOOLS_GNU_MISSING      List of Tool [$system]
 TOOLS_NOOP             List of Tool [$system]
 TOOLS_PATH.*           Pathname [$system]
diff -r 113209a98c60 -r f81584a8eb17 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Mon Dec 15 12:28:49 2008 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Mon Dec 15 12:47:31 2008 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.795 2008/12/14 18:46:58 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.796 2008/12/15 12:47:31 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -3650,7 +3650,13 @@
        checkline_relative_path($line, $path, true);
        $path = resolve_relative_path($path, false);
 
-       if ($path !~ m"^(?:\./)?\.\./\.\./[^/]+/[^/]+$") {
+       if ($path =~ m"^(?:\./)?\.\./\.\./([^/]+/[^/]+)$") {
+               my $otherpkgpath = $1;
+               if (! -f "$cwd_pkgsrcdir/$otherpkgpath/Makefile") {
+                       $line->log_error("There is no package in $otherpkgpath.");
+               }
+
+       } else {
                $line->log_warning("\"${path}\" is not a valid relative package directory.");
                $line->explain_warning(
 "A relative pathname always starts with \"../../\", followed",



Home | Main Index | Thread Index | Old Index