ports/89809: Ports INDEX cannot be moved out of ports tree

Peter Jeremy PeterJeremy at optushome.com.au
Sun Dec 4 00:04:12 UTC 2005


The patch supplied in the PR was incomplete and fails in the case
where INDEXDIR is not set.  The following patch replaces the
previously supplied patch for Mk/bsd.port.subdir.mk:

Index: Mk/bsd.port.subdir.mk
===================================================================
RCS file: /usr/ncvs/ports/Mk/bsd.port.subdir.mk,v
retrieving revision 1.61
diff -u -r1.61 bsd.port.subdir.mk
--- Mk/bsd.port.subdir.mk	8 Nov 2005 09:02:51 -0000	1.61
+++ Mk/bsd.port.subdir.mk	3 Dec 2005 19:57:46 -0000
@@ -240,7 +240,7 @@
 .if defined(PORTSTOP)
 readmes: readme ${SUBDIR:S/^/_/:S/$/.readmes/}
 	@${ECHO_MSG} "===>   Creating README.html for all ports"
-	@perl ${PORTSDIR}/Tools/make_readmes < ${PORTSDIR}/${INDEXFILE}
+	@perl ${PORTSDIR}/Tools/make_readmes < ${INDEXDIR}/${INDEXFILE}
 .else
 readmes: readme
 .endif
@@ -265,6 +265,7 @@
 .endif
 COMMENTFILE?=	${.CURDIR}/pkg/COMMENT
 DESCR?=		${.CURDIR}/pkg/DESCR
+INDEXDIR?=	${PORTSDIR}
 .if ${OSVERSION} >= 600000
 INDEXFILE?=	INDEX-6
 .elif ${OSVERSION} >= 500036
@@ -333,7 +334,7 @@
 PORTSEARCH_XKEYLIM?=0
 PORTSEARCH_IGNORECASE?=1
 
-search: ${PORTSDIR}/${INDEXFILE}
+search: ${INDEXDIR}/${INDEXFILE}
 	@here=${.CURDIR}; \
 	cd ${PORTSDIR}; \
 	if [ -z "$$key"   -a -z "$$xkey"   -a \
@@ -431,4 +432,4 @@
 	      if (i in disp) \
 	        printf("%s:\t%s\n", names[i], $$i); \
 	    print(""); \
-	  }' ${PORTSDIR}/${INDEXFILE}
+	  }' ${INDEXDIR}/${INDEXFILE}

-- 
Peter Jeremy



More information about the freebsd-ports-bugs mailing list