Summary: | establish proper master-slave relations between ports | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Oliver Eikemeier <eikemeier> |
Component: | Individual Port(s) | Assignee: | Mark Linimon <linimon> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | ||
Priority: | Normal | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Oliver Eikemeier
2004-03-18 00:10:17 UTC
State Changed From-To: open->feedback maintainers are notified Responsible Changed From-To: freebsd-ports-bugs->eik I'll handle this rule two originally read: > 2.) Slave ports shout define MASTERDIR using one of the following lines: > > MASTERDIR= ${.CURDIR}/../../<category>/<port> > MASTERDIR= ${.CURDIR}/../<port> > MASTERDIR= ${PORTSDIR}/<category>/<port> Thanks to Clement Laforet <clement@FreeBSD.org> for pointing out that ${PORTSDIR}/... won't work without including bsd.port.pre.mk. Because including bsd.port.pre.mk is a slave port is bad (rule 6), since all the variables that have to be defined *before* bsd.port.pre.mk in the master port won't have any effect, only the first two possibilities remain. Sorry for the oversight Oliver "Oliver Eikemeier" <eikemeier@fillmore-labs.com> wrote: > 5.) The last line of a non-slave ports Makefile must be one of: > > include <bsd.port.mk> > include <bsd.port.post.mk> [snip] > cyrille.lefevre@laposte.net > [ ] lang/gforth (5) I'm not the one who add the following line to the Makefile : CONFIGURE_TARGET:= --build=${CONFIGURE_TARGET} however, the best way to handle this is to move CONFIGURE_TARGET from bsd.port.pre.mk to bsd.port.post.mk. so, CONFIGURE_TARGET could be updated in a port's Makefile. of course, it is still possible to manually define CONFIGURE_TARGET in Makefile, but that may cause trouble in the future. Cyrille Lefevre. -- home: mailto:cyrille.lefevre@laposte.net Oliver Eikemeier schrieb:, > I checked the current ports tree assuming the following rules: > 1.) A port is a slave port if and only if MASTERDIR != .CURDIR I checked that this should work woth a symlinked portstree. # ls -l /usr/ports lrwxr-xr-x 1 root wheel 12 Aug 9 2001 /usr/ports@ -> /image/ports /usr/ports/german/webalizer2# make -V MASTERDIR -V .CURDIR /image/ports/german/webalizer2/../../www/webalizer /image/ports/german/webalizer2 /usr/ports/www/webalizer# make -V MASTERDIR -V .CURDIR /image/ports/www/webalizer /image/ports/www/webalizer > 2.) Slave ports shout define MASTERDIR using one of the following lines: > > MASTERDIR= ${.CURDIR}/../../<category>/<port> > MASTERDIR= ${.CURDIR}/../<port> both seen ... > MASTERDIR= ${PORTSDIR}/<category>/<port> This construct will have problmes on the bento cluser, or when /usr/ports is a symlink ... if I revert /usr/ports/german/webalizer2/Makefile to use: PORTSDIR= /usr/ports MASTERDIR?= ${PORTSDIR}/www/webalizer # make -V MASTERDIR -V .CURDIR /usr/ports/www/webalizer /image/ports/german/webalizer2 We have common setups where: ${.CURDIR}/../.. is diffrent from ${PORTSDIR} > dinoex@FreeBSD.org > [ ] lang/gnustep-base (5) This can't be fixed now: # bsd.port.post.mk clobbers MAKE_ENV MAKE_ENV+= PATH=${autotools_path}:$(PREFIX)/System/Tools:${PATH} > [x] mail/popa3d (5)i fixed. kind regards Dirk - Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany - [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org] Cyrille Lefevre wrote:
>>cyrille.lefevre@laposte.net
>> [ ] lang/gforth (5)
>
> I'm not the one who add the following line to the Makefile :
>
> CONFIGURE_TARGET:= --build=${CONFIGURE_TARGET}
>
> however, the best way to handle this is to move CONFIGURE_TARGET
> from bsd.port.pre.mk to bsd.port.post.mk.
> so, CONFIGURE_TARGET could be updated in a port's Makefile.
> of course, it is still possible to manually define CONFIGURE_TARGET
> in Makefile, but that may cause trouble in the future.
this is a longstanding problem. Most ports use
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
which should not be problematic if we ever change the default in bsd.port.mk
(which we currently can not, since it will break your port) and is easy to
search and replace if all ports use the same line. This is a good example why
it is important to adhere to the rules and a workaround than makes it hard to
improve bsd.port.mk.
Thanks
Oliver
Just a note here as the recipient list is so long. Please, please, please make sure that you either leave the subject list intact or drop freebsd-gnats-submit@freebsd.org from the recipients when replying to this, or the gnats database will get spammed stupid with misfiled PRs. Thank you, Ceri [with bugmeister@ hat on] -- State Changed From-To: feedback->closed With bugmeister hat on, reassign from inactive committer. A later change to bsd.port.mk that I submitted allows a way for individual ports to force a flag to state that they are either a slave port or a master port. In all but a few dozen cases, the default that my code reports is sufficient for both FreshPorts and portsmon to so determine. The maintainers of all but one other port agreed to add these variables. eik, however, is correct in that my solution is insufficiently rigorous to completely determine whether or not a port's metadata must be rebuilt given changes to a different port (which is what FreshPorts and portsmon want to know) -- for instance, neither of those understands such things as dependencies on changes to things in bsd.*.mk. The current technology that the two monitoring systems employ is to simply rebuild the metadata on occasion. eik at one time had some code that he claimed completely modeled all the file dependencies in the ports tree, but neither Dan nor I took the time to pursue that avenue. So, basically, a far lighterweight solution than this PR was adopted. Responsible Changed From-To: eik->linimon |