On Thu, Aug 27, 2015 at 11:47:19PM +0200, Juan Francisco Cantero Hurtado wrote:
> I see the problem now. You can remove the symlinks from ${WRKDIR}/bin with:
> 
> pre-test:
> >-------rm -f ${WRKDIR}/bin/chgrp

While this would fix the problem, since the problem is not in zsh
itself, I don't think that the zsh port is the right place to fix this.

> The problem with your patch is that you're modifying the environment
> for thousands of ports and we can't test manually every port to see if
> your changes are breaking something.

However, overriding chown and chgrp during test is a bug. They clearly
don't need to be overridden during test since the symlinks only exist if
test is called after fake and don't exist for make clean test.

${WRKDIR}/bin is only in PATH during extract, configure, build, fake,
and test. Since fake creates the chown and chgrp symlinks, extract,
configure, build, and test must not depend on those symlinks as they
don't depend on fake. Would it be acceptable to clean up the symlinks
after fake completes or rm -f them in test in case test is run after
fake? Both patches below fix the issue.

However, I still believe that the first patch is correct as any ports it
breaks has tests that depend on non-standard install(1) behavior caused
by the perl wrapper so including ${WRKDIR}/bin in PATH is just
concealing the breakage.

- Matthew Martin


Index: infrastructure/mk/bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1298
diff -u -p -r1.1298 bsd.port.mk
--- infrastructure/mk/bsd.port.mk       19 Jul 2015 17:31:44 -0000      1.1298
+++ infrastructure/mk/bsd.port.mk       28 Aug 2015 01:58:04 -0000
@@ -2886,6 +2886,8 @@ ${_FAKE_COOKIE}: ${_BUILD_COOKIE} ${_FAK
                fi; \
        done
 
+       @rm -f ${WRKDIR}/bin/chown ${WRKDIR}/bin/chgrp
+
        @${_FAKESUDO} ${_MAKE_COOKIE} $@
 
 print-plist:


Index: infrastructure/mk/bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1298
diff -u -p -r1.1298 bsd.port.mk
--- infrastructure/mk/bsd.port.mk       19 Jul 2015 17:31:44 -0000      1.1298
+++ infrastructure/mk/bsd.port.mk       28 Aug 2015 02:06:13 -0000
@@ -2786,6 +2786,7 @@ ${_TEST_COOKIE}: ${_BUILD_COOKIE}
        @exit 1
 .    endif
 .  endif
+       @rm -f ${WRKDIR}/bin/chown ${WRKDIR}/bin/chgrp
 .  if target(pre-test)
        @${_MAKE} pre-test
 .  endif

Reply via email to