Date: Tue, 20 Jan 2004 10:41:23 -0800 From: Eivind Eklund <eivind@FreeBSD.org> To: Joe Marcus Clarke <marcus@FreeBSD.org> Cc: Oliver Eikemeier <eikemeier@fillmore-labs.com> Subject: Re: HEADS UP: New bsd.*.mk changes Message-ID: <20040120184123.GI94636@FreeBSD.org> In-Reply-To: <1074622845.757.69.camel@gyros> References: <1074617147.757.16.camel@gyros> <20040120171315.GH94636@FreeBSD.org> <1074619795.757.43.camel@gyros> <400D68A1.4030501@fillmore-labs.com> <1074620919.757.51.camel@gyros> <20040120175136.GC3365@toxic.magnesium.net> <400D6D8F.7010708@fillmore-labs.com> <1074621945.757.63.camel@gyros> <400D7077.30009@fillmore-labs.com> <1074622845.757.69.camel@gyros>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 20, 2004 at 01:20:45PM -0500, Joe Marcus Clarke wrote: > > I totally agree that nobody want to use a variable called 'LATEST_LINK' used for that > > purpose, but, hey, it's just a name. If we use something like > > OPTIONSNAME?=${LATEST_LINK} > > we have to use an workaround only for the port that build no packages, the rest should > > be automagically right. All the work of thinking of an unique name has already been done > > for a lot of ports. > > Yes, sorry I've missed some of these points. I'm trying to balance real > work and this discussion. You're right that we could just "borrow" > LATEST_LINK for the options purpose, but it will require your > re-ordering patch that will require testing on bento. > > So, the way I see it, we could keep things the way they are and wait for > the next experimental build cycle, or commit a UNIQUENAME patch that is > temporary until LATEST_LINK can be evaluated. Once that gets decided, > we can PR the patch we want tested. We take a hit if we put OPTIONS into production without a final settlement on this, as the options are saved and the users would lose the options they have set in the meantime. Here's a UNIQUENAME patch w/docs: Index: bsd.port.mk =================================================================== 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 18:10:35 -0000 @@ -69,6 +86,8 @@ # Optional. # PKGNAMESUFFIX - Suffix to specify compilation options. Optional. # Do not define this in your Makefile. +# UNIQUENAME - A name for your port that is globally unique. By default, +# this is set to ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} # DISTNAME - Name of port or distribution used in generating # WRKSRC and DISTFILES below (default: # ${PORTNAME}-${PORTVERSION}). @@ -1017,7 +1036,8 @@ # where 'make config' records user configuration options PORT_DBDIR?= /var/db/ports -OPTIONSFILE?=${PORT_DBDIR}/${PORTNAME}/options +UNIQUENAME?=${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} +OPTIONSFILE?=${PORT_DBDIR}/${UNIQUENAME}/options .if exists(${OPTIONSFILE}) .include "${OPTIONSFILE}" .endif @@ -4894,8 +4914,8 @@ .if !defined(OPTIONS) @${ECHO_MSG} "===> No options to configure" .else - @(${MKDIR} ${PORT_DBDIR}/${PORTNAME} 2> /dev/null) || \ - (${ECHO_MSG} "===> Cannot create ${PORT_DBDIR}/${PORTNAME}, check permissions"; exit 1) + @(${MKDIR} ${PORT_DBDIR}/${UNIQUENAME} 2> /dev/null) || \ + (${ECHO_MSG} "===> Cannot create ${PORT_DBDIR}/${UNIQUENAME}, check permissions"; exit 1) -@if [ -e ${OPTIONSFILE} ]; then \ . ${OPTIONSFILE}; \ fi; \ @@ -4964,7 +4984,7 @@ .if exists(${OPTIONSFILE}) -@${ECHO_MSG} "===> Removing user-configured options for ${PORTNAME}"; \ ${RM} -f ${OPTIONSFILE}; \ - ${RMDIR} ${PORT_DBDIR}/${PORTNAME} + ${RMDIR} ${PORT_DBDIR}/${UNIQUENAME} .else @${ECHO_MSG} "===> No user-specified options configured for ${PORTNAME}" .endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040120184123.GI94636>