Generally, when I work on a port in mystuff that depends on another
port in mystuff, I set PORTSDIR_PATH=/usr/ports/mystuff:/usr/ports
in the environment.

As I've just figured out the hard way, this doesn't work for
update-plist.  (I wonder how many dodgy PLISTs I've committed because
of this.)  The environment setting isn't passed through to the make
print-plist call in make-plist.

Here's a potential fix:

Index: bin/make-plist
===================================================================
RCS file: /cvs/ports/infrastructure/bin/make-plist,v
retrieving revision 1.8
diff -u -p -r1.8 make-plist
--- bin/make-plist      3 Nov 2014 19:50:01 -0000       1.8
+++ bin/make-plist      19 Jul 2015 01:25:41 -0000
@@ -131,6 +131,7 @@ my $baseprefix=$ENV{PREFIX};
 my $shared_only;
 my $make = $ENV{MAKE};
 my $portsdir = $ENV{PORTSDIR};
+my $portsdir_path = $ENV{PORTSDIR_PATH};
 
 sub prettify
 {
@@ -172,7 +173,7 @@ sub build_mtree
                $stripped->{$pkgpath} = 1;
                if (!defined $cached_tree->{$pkgpath}) {
                        $cached_tree->{$pkgpath} = {};
-                       open my $fh, "cd $portsdir && env -i SUBDIR=$pkgpath 
ECHO_MSG=: $make print-plist |" or die "blech\n";
+                       open my $fh, "cd $portsdir && env -i 
PORTSDIR_PATH=$portsdir_path SUBDIR=$pkgpath ECHO_MSG=: $make print-plist |" or 
die "blech\n";
                        augment_mtree($cached_tree->{$pkgpath}, $fh);
                        close($fh);
                }
Index: mk/bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1297
diff -u -p -r1.1297 bsd.port.mk
--- mk/bsd.port.mk      11 Jun 2015 09:26:01 -0000      1.1297
+++ mk/bsd.port.mk      19 Jul 2015 01:24:28 -0000
@@ -2452,6 +2452,7 @@ _internal-plist _internal-update-plist: 
        INSTALL_PRE_COOKIE=${_INSTALL_PRE_COOKIE} \
        MAKE="${MAKE}" \
        PORTSDIR=${PORTSDIR} \
+       PORTSDIR_PATH=${PORTSDIR_PATH} \
        FLAVORS='${FLAVORS}' MULTI_PACKAGES='${MULTI_PACKAGES}' \
        OKAY_FILES='${_FAKE_COOKIE} ${_INSTALL_PRE_COOKIE} 
${WRKINST}/.saved_libs' \
        SHARED_ONLY="${SHARED_ONLY}" \
-- 
Christian "naddy" Weisgerber                          [email protected]

Reply via email to