svn commit: r382234 - head/net/dshell

Baptiste Daroussin bapt at FreeBSD.org
Wed Mar 25 17:01:55 UTC 2015


On Wed, Mar 25, 2015 at 09:48:07AM -0600, Adam Weinberger wrote:
> > On 25 Mar, 2015, at 9:25, MANTANI Nobutaka <nobutaka at FreeBSD.org> wrote:
> > 
> > Modified: head/net/dshell/Makefile
> > 
> > -BUILD_DEPENDS=	bash:${PORTSDIR}/shells/bash
> > -RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pygeoip>0:${PORTSDIR}/net/py-pygeoip \
> > +BUILD_DEPENDS=	bash:${PORTSDIR}/shells/bash \
> > +		${PYTHON_PKGNAMEPREFIX}pygeoip>0:${PORTSDIR}/net/py-pygeoip \
> > 		${PYTHON_PKGNAMEPREFIX}pycrypto>0:${PORTSDIR}/security/py-pycrypto \
> > 		${PYTHON_PKGNAMEPREFIX}dpkt>0:${PORTSDIR}/net/py-dpkt \
> > 		${PYTHON_PKGNAMEPREFIX}ipy>0:${PORTSDIR}/net-mgmt/py-ipy \
> > 		${PYTHON_PKGNAMEPREFIX}pypcap>0:${PORTSDIR}/net/py-pypcap
> > +RUN_DEPENDS=	${BUILD_DEPENDS}
> 
> That needs to be
> RUN_DEPENDS:=	${BUILD_DEPENDS}
> 
> See https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-depend.html (Bottom of section 5.8.2).
> 
> # Adam
> 

Except here is will not and cannot work because := enforces the expansion right
away meaning PYTHON_PKGNAMEPREFIX will be expanded to empty at this time.

RUN_DEPENDS=	${BUILD_DEPENDS}

Is also boggus because any thing adding to BUILD_DEPENDS later on will
automatically be added to RUN_DEPENDS anyway

Imho this kind of factorisation should be avoided everywhere in the ports tree,
the comment in PHB should also be modified to say basically don't do that.

The right way to factorize safely dependency is to use a 3rd variable:

RB_DEPENDS=	a:b \
		c:d

BUILD_DEPENDS=	${RB_DEPENDS}
RUN_DEPENDS=	${RB_DEPENDS}

Best regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-head/attachments/20150325/4a54fc01/attachment.sig>


More information about the svn-ports-head mailing list