| Summary: | Broken handling of non-system perl on -stable | ||
|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Ade Lovett <ade> |
| Component: | Individual Port(s) | Assignee: | Port Management Team <portmgr> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-ports-bugs->portmgr bsd.port.mk territory I find my patch less intrusive.
It doesn't touch the actual logic, only put the missing dependencies on
the code.
--- /home/op/FreeBSD/ports/Mk/bsd.port.mk Tue Jun 1 07:20:16 2004
+++ Mk/bsd.port.mk Tue Jun 1 08:18:54 2004
@@ -1459,6 +1459,14 @@
@${ECHO_CMD} "Dependency error: you don't have the right version
of per
l in /usr/bin."
@${FALSE}
.endif
+.if ${PERL_LEVEL} >= 500600
+.if defined(USE_PERL5) || defined(USE_PERL5_BUILD)
+BUILD_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
+.endif
+.if defined(USE_PERL5) || defined(USE_PERL5_RUN)
+RUN_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
+.endif
+.endif
.else
.if defined(USE_PERL5) || defined(USE_PERL5_BUILD)
BUILD_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
Jose, Your patch is wrong. It results in: (4.10-PRERELEASE box:) [will@puck /usr/ports/converters/p5-MIME-Base64]% make -V RUN_DEPENDS /usr/bin/perl5.8.2:/usr/ports/lang/perl5.8 The more I think about it, the more I agree with Ade's solution. If PERL_VERSION is greater than 5.005, it's obviously not a base perl. So we no longer need the old dependency error check. Regards, -- wca El Viernes, 4 de Junio de 2004 03:45, Will Andrews escribi=F3: > Jose, > > Your patch is wrong. It results in: > > (4.10-PRERELEASE box:) > [will@puck /usr/ports/converters/p5-MIME-Base64]% make -V RUN_DEPENDS > /usr/bin/perl5.8.2:/usr/ports/lang/perl5.8 > > The more I think about it, the more I agree with Ade's solution. > If PERL_VERSION is greater than 5.005, it's obviously not a base > perl. So we no longer need the old dependency error check. > > Regards, I too. But I not sure that the code eliminated is not needed in any case. Of course, not with a correct use of use.perl. But ... On your objections to my patch, are you sure that the port doesn't=20 requires lang/perl5.8? I think that my patch is a correct mimic of the dependency code used in=20 the case of CURRENT system. But I may be wrong. In any case, my only disagree with ade@ is in the urgency. We need any=20 solution to this ASAP. =2D- josemi State Changed From-To: open->analyzed Testing on bento for subsequent commit State Changed From-To: analyzed->closed Patch committed, thanks! |
Dependencies not registered on ports version of perl if installed and being used (via use.perl port) on any 4.x system. Fix: With this, I now see: [root@4x:ports/converters/p5-MIME-Base64] 27# use.perl system [root@4x:ports/converters/p5-MIME-Base64] 28# make -V RUN_DEPENDS [root@4x:ports/converters/p5-MIME-Base64] 29# use.perl port [root@4x:ports/converters/p5-MIME-Base64] 30# make -V RUN_DEPENDS /usr/local/bin/perl5.8.2:/usr/ports/lang/perl5.8 which is expected behavior. -current is not affected by this.--dcVhduZoKAzjPDCsE85Dg2VoRWs8bADeKbKhxASTdbgJfmEO Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" Index: bsd.port.mk =================================================================== RCS file: /home/FreeBSD/cvs/ports/Mk/bsd.port.mk,v retrieving revision 1.486 diff -u -1 -r1.486 bsd.port.mk --- bsd.port.mk 3 Apr 2004 23:59:50 -0000 1.486 +++ bsd.port.mk 15 Apr 2004 04:27:58 -0000 @@ -1218,3 +1218,3 @@ -.if exists(/usr/bin/perl5) && ${OSVERSION} >= 300000 && ${OSVERSION} < 500036 +.if ${PERL_LEVEL} < 500600 PERL5= /usr/bin/perl${PERL_VERSION} @@ -1768,10 +1768,3 @@ -.if exists(/usr/bin/perl5) && ${OSVERSION} >= 300000 && ${OSVERSION} < 500036 -.if !exists(/usr/bin/perl${PERL_VERSION}) && ( defined(USE_PERL5) || \ - defined(USE_PERL5_BUILD) || defined(USE_PERL5_RUN) ) -check-depends:: - @${ECHO_CMD} "Dependency error: you don't have the right version of perl in /usr/bin." - @${FALSE} -.endif -.else +.if ${PERL_LEVEL} >= 500600 .if defined(USE_PERL5) || defined(USE_PERL5_BUILD) How-To-Repeat: Take a stock 5.x box, with nothing but the base system, install lang/perl5.8 (use.perl port is automatically run), then choose a perl port at random and: [root@5x:ports/converters/p5-MIME-Base64] 4# make -V RUN_DEPENDS /usr/local/bin/perl5.8.2:/usr/ports/lang/perl5.8 Take a stock 4.x box, install lang/perl5.8, use.perl port, take the same port: [root@4x:ports/converters/p5-MIME-Base64] 6# use.perl port [root@4x:ports/converters/p5-MIME-Base64] 7# make -V RUN_DEPENDS Hrm.. no dependency registered, even though this port would install files in .../site_perl/5.8.2/... which would get rather upset if, say, lang/perl5.8 were to be upgraded to 5.8.3 (in the works), where everything starts looking in .../site_perl/5.8.3/... There's a whole ton of other interesting ways in which not having the dependency correctly registered will break on upgrades of the perl port itself. This should probably go in before 4.10 ...