Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jan 2004 12:29:55 -0500
From:      Joe Marcus Clarke <marcus@FreeBSD.org>
To:        Eivind Eklund <eivind@FreeBSD.org>
Cc:        Kris Kennaway <kris@obsecurity.org>
Subject:   Re: HEADS UP: New bsd.*.mk changes
Message-ID:  <1074619795.757.43.camel@gyros>
In-Reply-To: <20040120171315.GH94636@FreeBSD.org>
References:  <1074590694.85583.20.camel@shumai.marcuscom.com> <400D2939.5090203@fillmore-labs.com> <1074617147.757.16.camel@gyros> <20040120171315.GH94636@FreeBSD.org>

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

--=-NItDnU31PB6keRWbuT9X
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Tue, 2004-01-20 at 12:13, Eivind Eklund wrote:
> On Tue, Jan 20, 2004 at 11:45:47AM -0500, Joe Marcus Clarke wrote:
> > On Tue, 2004-01-20 at 08:12, Oliver Eikemeier wrote:
> [snipped description of options patches. -EE]
> > > Sorry for stepping up so late, but this saves options under
> > >   ${PORT_DBDIR}/${PORTNAME}/options
> > >=20
> > > Lots of ports have the same PORTNAME (ie 'openldap' for
> > > net/openldap2[012]-(client|server), 'apache' for russian/apache13,
> > > www/apache(13|13-fp|2|21)). Some conflict, but -client/-server don't.
> > > Either each port has to set OPTIONSFILE to ${PORT_DBDIR}/${PORTNAME}/=
something,
> > > or we may use LATEST_LINK instead of PORTNAME:
> >=20
> > What's the general consensus on this (is there one)?  What about ports
> > that set NO_LATEST_LINK?  In any event, the patch below would need to b=
e
> > tested on bento again (uggghh).  Since OPTIONSFILE is currently
> > overrideable, couldn't porters that have conflicting PORTNAMEs, set thi=
s
> > file to a unique name.  For example:
> >=20
> > OPTIONSFILE=3D	${PORT_DBDIR}/${PORTNAME}/options.mozilla-devel
> >=20
> > Wouldn't that satisfy most people?
> > Perhaps we could shorten the public
> > OPTIONSFILE to just specify the filename, and do all the grunt work in
> > bsd.port.mk...?
>=20
> The following implements that, and is a fairly trivial patch.
> It might be even better to call "OPTIONSNAME" something like
> "UNIQUENAME".

This looks okay to me, a gives the power to the porter to decide on a
truly unique name for options.

>=20
> There is no obvious consensus - I have no particular opinion beyond
> what I've already said (ie, that the name of LATEST_LINK seems inappropri=
ate
> if it is to be used as a unique name.)

I agree.  This approach seems the most flexible.  As for not being able
to do non-root installs, this is a bogus argument as one could simply
override PORT_DBDIR as they would PKG_DBDIR (even with the original
patch).

Could you also change the comment documentation to reflect the new
macros?  Unless there are serious objections to this, I'll commit this
approach.

Joe

>=20
> Index: bsd.port.mk
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
> retrieving revision 1.475
> diff -u -r1.475 bsd.port.mk
> --- bsd.port.mk	20 Jan 2004 09:14:09 -0000	1.475
> +++ bsd.port.mk	20 Jan 2004 17:07:33 -0000
> @@ -1017,7 +1034,8 @@
>  # where 'make config' records user configuration options
>  PORT_DBDIR?=3D	/var/db/ports
> =20
> -OPTIONSFILE?=3D${PORT_DBDIR}/${PORTNAME}/options
> +OPTIONSNAME?=3D${PORTNAME}
> +OPTIONSFILE?=3D${PORT_DBDIR}/${OPTIONSNAME}/options
>  .if exists(${OPTIONSFILE})
>  .include "${OPTIONSFILE}"
>  .endif
> @@ -4894,8 +4912,8 @@
>  .if !defined(OPTIONS)
>  	@${ECHO_MSG} "=3D=3D=3D> No options to configure"
>  .else
> -	@(${MKDIR} ${PORT_DBDIR}/${PORTNAME} 2> /dev/null) || \
> -		(${ECHO_MSG} "=3D=3D=3D> Cannot create ${PORT_DBDIR}/${PORTNAME}, chec=
k permissions"; exit 1)
> +	@(${MKDIR} ${PORT_DBDIR}/${OPTIONSNAME} 2> /dev/null) || \
> +		(${ECHO_MSG} "=3D=3D=3D> Cannot create ${PORT_DBDIR}/${OPTIONSNAME}, c=
heck permissions"; exit 1)
>  	-@if [ -e ${OPTIONSFILE} ]; then \
>  		. ${OPTIONSFILE}; \
>  	fi; \
> @@ -4964,7 +4982,7 @@
>  .if exists(${OPTIONSFILE})
>  	-@${ECHO_MSG} "=3D=3D=3D> Removing user-configured options for ${PORTNA=
ME}"; \
>  	${RM} -f ${OPTIONSFILE}; \
> -	${RMDIR} ${PORT_DBDIR}/${PORTNAME}
> +	${RMDIR} ${PORT_DBDIR}/${OPTIONSNAME}
>  .else
>  	@${ECHO_MSG} "=3D=3D=3D> No user-specified options configured for ${POR=
TNAME}"
>  .endif
> _______________________________________________
> freebsd-ports@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"
--=20
Joe Marcus Clarke
FreeBSD GNOME Team	::	marcus@FreeBSD.org
gnome@FreeBSD.org
FreeNode / #freebsd-gnome
http://www.FreeBSD.org/gnome


--=-NItDnU31PB6keRWbuT9X
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQBADWWTb2iPiv4Uz4cRApJ8AJ9Dh866yguIkyms1D40loU2PmWWKwCcDREs
LwVORRmZgoNN9ngwKBTjbpA=
=A42f
-----END PGP SIGNATURE-----

--=-NItDnU31PB6keRWbuT9X--



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