HEADS UP - master/slave ports

Dan Langille dan at langille.org
Thu Jun 17 12:44:36 GMT 2004


On 17 Jun 2004 at 14:28, Roman Neuhauser wrote:

> # dan at langille.org / 2004-06-17 08:13:01 -0400:
> > On 17 Jun 2004 at 14:07, Roman Neuhauser wrote:
> > > # dan at langille.org / 2004-06-17 07:41:08 -0400:
> > > > On 17 Jun 2004 at 12:27, Roman Neuhauser wrote:
> > > > > # dan at langille.org / 2004-06-16 11:41:54 -0400:
> > > > > > +MASTERPORT!=   ${ECHO_CMD} "${_MASTERDIR}" | ${SED} -Ee 's;^.*/([^/]+/[^/]+)/?$$;\1;'
> > > > > 
> > > > >     You don't need the sed, or rely on the fact that the category
> > > > >     hierarchy is flat.  Instead:
> > > > > 
> > > > >     _REALPORTSDIR!= ${REALPATH} "${PORTSDIR}"
> > > > >     MASTERPORT=	${MASTERDIR:S#^${_REALPORTSDIR}##}
> > > > 
> > > > I apologise for not giving credit to Mark Linimon for patch.
> > > > 
> > > > Roman: I tried your patch.  Here is what is does:
> > > > 
> > > > [dan at polo:~/ports/www/mod_php4] $ make -V MASTERPORT -f ./Makefile 
> > > > PORTSDIR=~/ports LOCALBASE=/nonexistentlocal X11BASE=/nonexistentx
> > > > Unknown modifier '`'
> > > 
> > >     replace the hashes, e. g.:
> > > 
> > >     MASTERPORT=	${MASTERDIR:S,^${_REALPORTSDIR}/,,}
> > 
> > That's getting better:
> > 
> > $ make -V MASTERPORT -f ./Makefile PORTSDIR=~/ports 
> > LOCALBASE=/nonexistentlocal X11BASE=/nonexistentx
> > /www/mod_php4/../../lang/php4
> > 
> > But not the same as the original:
> > 
> > $ make -V MASTERPORT -f ./Makefile PORTSDIR=~/ports 
> > LOCALBASE=/nonexistentlocal X11BASE=/nonexistentx
> > lang/php4
> 
>     Ugh, I see; I was confusing this with another feature... That would
>     make it
> 
>     _REALPORTSDIR!=     ${REALPATH} "${PORTSDIR}"
>     _REALMASTERDIR!=    ${REALPATH} "${MASTERDIR}"
>     MASTERPORT=     ${_REALMASTERDIR:S,^${_REALPORTSDIR}/,,}

That's better:

[dan at polo:~/ports/www/mod_php4] $ make -V MASTERPORT -f ./Makefile 
PORTSDIR=~/ports LOCALBASE=/nonexistentlocal X11BASE=/nonexistentx
lang/php4

>     and I'm not sure that's any better than what you had originally.

Why do you think that?

>     But, what will both versions output in databases/mysql40-client?

Both output the same thing:

$ make -V MASTERPORT -f ./Makefile PORTSDIR=~/ports \
    LOCALBASE=/nonexistentlocal X11BASE=/nonexistentx
databases/mysql40-server
-- 
Dan Langille : http://www.langille.org/
BSDCan - http://www.bsdcan.org/



More information about the freebsd-ports mailing list