Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jun 2004 11:41:54 -0400
From:      "Dan Langille" <dan@langille.org>
To:        ports@FreeBSD.org
Cc:        dan@langille.org
Subject:   HEADS UP - master/slave ports
Message-ID:  <40D03202.11738.76559182@localhost>

next in thread | raw e-mail | index | archive | help
If you are maintaining any port which makes use of a master/slave 
relationship, please help me help you.

A slave port is a port which obtains information from another port.  
Example: www/mod_php4 is a slave port. lang/php4 is the master.

http://beta.freshports.org/ now has support for displaying 
master/slave relationships.  This is the first step in automatically 
updating a slave port when a commit is made to a master port.  Until 
recently, there was no acceptable method for determing master/slave 
relationship.  Consequently, FreshPorts makes no attempt to refresh a 
slave port when the master port is updated.

The following two URLs will demonstrate how FreshPorts can/will 
display such relationships:

  http://beta.freshports.org/www/mod_php4/
  http://beta.freshports.org/lang/php4/

If you maintain any slave/master ports, please visit them at the 
FreshPorts beta website (http://beta.freshports.org/) and ensure that 
the relationships are correctly displayed.

Note: FreshPorts beta is not running on the same database as 
FreshPorts production.  That said, beta and production should have 
all the same commits, ports, etc.  Just don't assume your watch lists 
on beta are up to date.

Note: FreshPorts beta is making use of this patch to obtain this 
master/slave information (tabs will be corrupted in this paste and 
lines will be wrapped):

--- bsd.port.mk 27 May 2004 11:29:06 -0000      1.489
+++ bsd.port.mk 30 May 2004 10:05:28 -0000
@@ -911,6 +911,18 @@

 MASTERDIR?=    ${.CURDIR}

+# Try to determine if we are a slave port.  These variables are used 
by
+# FreshPorts and portsmon, but not yet by the ports framework 
itself.
+_MASTERDIR!=   ${REALPATH} "${MASTERDIR}"
+
+.if ${_MASTERDIR} != ${.CURDIR}
+IS_SLAVE_PORT?=        yes
+MASTERPORT!=   ${ECHO_CMD} "${_MASTERDIR}" | ${SED} -Ee 
's;^.*/([^/]+/[^/]+)/?$$;\1;'
+.else
+IS_SLAVE_PORT?=        no
+MASTERPORT=
+.endif
+
 # If they exist, include Makefile.inc, then architecture/operating
 # system specific Makefiles, then local Makefile.local.

FreshPorts can then make use of "make -V IS_SLAVE_PORT -V 
MASTERPORT".

Thank you.


-- 
Dan Langille : http://www.langille.org/
BSDCan - http://www.bsdcan.org/



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