Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Mar 2015 18:01:49 +0100
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Adam Weinberger <adamw@adamw.org>
Cc:        svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, MANTANI Nobutaka <nobutaka@FreeBSD.org>, ports-committers@freebsd.org
Subject:   Re: svn commit: r382234 - head/net/dshell
Message-ID:  <20150325170149.GC63722@ivaldir.etoilebsd.net>
In-Reply-To: <AA790A8D-E7E0-41BA-8F88-0B9511EA296B@adamw.org>
References:  <201503251525.t2PFP4ET035840@svn.freebsd.org> <AA790A8D-E7E0-41BA-8F88-0B9511EA296B@adamw.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--LKTjZJSUETSlgu2t
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Mar 25, 2015 at 09:48:07AM -0600, Adam Weinberger wrote:
> > On 25 Mar, 2015, at 9:25, MANTANI Nobutaka <nobutaka@FreeBSD.org> wrote:
> >=20
> > Modified: head/net/dshell/Makefile
> >=20
> > -BUILD_DEPENDS=3D	bash:${PORTSDIR}/shells/bash
> > -RUN_DEPENDS=3D	${PYTHON_PKGNAMEPREFIX}pygeoip>0:${PORTSDIR}/net/py-pyg=
eoip \
> > +BUILD_DEPENDS=3D	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=3D	${BUILD_DEPENDS}
>=20
> That needs to be
> RUN_DEPENDS:=3D	${BUILD_DEPENDS}
>=20
> See https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/ma=
kefile-depend.html (Bottom of section 5.8.2).
>=20
> # Adam
>=20

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

RUN_DEPENDS=3D	${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 t=
ree,
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=3D	a:b \
		c:d

BUILD_DEPENDS=3D	${RB_DEPENDS}
RUN_DEPENDS=3D	${RB_DEPENDS}

Best regards,
Bapt

--LKTjZJSUETSlgu2t
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlUS6f0ACgkQ8kTtMUmk6ExE6wCdH4gWcIldep3Nvy4Uh+E15rqZ
oSgAn2BtPY9+bOeJR514dqVgsZSoWKrB
=Tams
-----END PGP SIGNATURE-----

--LKTjZJSUETSlgu2t--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150325170149.GC63722>