Summary: | [patch] Ports INDEX cannot be moved out of ports tree | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Peter Jeremy <PeterJeremy> | ||||||
Component: | Individual Port(s) | Assignee: | Port Management Team <portmgr> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | ||||||||
Priority: | Normal | ||||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
Peter Jeremy
2005-12-01 18:40:02 UTC
Responsible Changed From-To: freebsd-ports-bugs->portmgr Infrastructure change to portmgr. 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 State Changed From-To: open->feedback Here is a patch that combines changes from this PR as well as ports/89363 and ports/91086. Since I do not have the proxy problem, the submitters of those latter two PRs need to test to see if I have properly combined the fixes. The current one seems to DTRT with respect to fetching otherwise. I have not yet tested searching or readmes. Note: this patch is against the files as currently running on 5-exp (and also devel/portmk), so there may be some drift. --- Makefile.5-exp Wed Jan 11 20:46:40 2006 +++ Makefile Wed Jan 11 21:23:34 2006 @@ -67,14 +67,19 @@ .include <bsd.port.subdir.mk> index: - @rm -f ${.CURDIR}/${INDEXFILE} - @cd ${.CURDIR} && make ${.CURDIR}/${INDEXFILE} + @rm -f ${INDEXDIR}/${INDEXFILE} + @cd ${.CURDIR} && make ${INDEXDIR}/${INDEXFILE} -fetchindex: - @cd ${.CURDIR} && ${FETCHINDEX} ${MASTER_SITE_INDEX}/${INDEXFILE}.bz2 && bunzip2 -f ${INDEXFILE}.bz2 && chmod a+r ${INDEXFILE} +fetchindex: ${INDEXDIR}/{INDEXFILE}.bz2 + @bunzip2 < ${INDEXDIR}/${INDEXFILE}.bz2 > ${INDEXDIR}/${INDEXFILE} + @chmod a+r ${INDEXDIR}/${INDEXFILE} + +${INDEXDIR}/{INDEXFILE}.bz2: .PHONY + @${FETCHINDEX} -o ${INDEXDIR}/${INDEXFILE}.bz2 ${MASTER_SITE_INDEX}${INDEXFILE}.bz2 MASTER_SITE_INDEX?= http://www.FreeBSD.org/ports/ -FETCHINDEX?= fetch -am +SETENV?= /usr/bin/env +FETCHINDEX?= ${SETENV} ${FETCH_ENV} fetch -am INDEX_JOBS?= 2 .if !defined(INDEX_VERBOSE) @@ -85,7 +90,7 @@ INDEX_ECHO_1ST= echo .endif -${.CURDIR}/${INDEXFILE}: +${INDEXDIR}/${INDEXFILE}: @${INDEX_ECHO_1ST} "Generating ${INDEXFILE} - please wait.."; if [ "${INDEX_PRISTINE}" != "" ]; then export LOCALBASE=/nonexistentlocal; @@ -119,18 +124,18 @@ cat $${tmpdir}/${INDEXFILE}.desc.* | perl ${.CURDIR}/Tools/make_index | sed -e 's/ */ /g' -e 's/| */|/g' -e 's/ *|/|/g' -e 's./..g' | sort -t '|' +1 -2 | - sed -e 's../.g' > ${.CURDIR}/${INDEXFILE}.tmp; + sed -e 's../.g' > ${INDEXDIR}/${INDEXFILE}.tmp; if [ "${INDEX_PRISTINE}" != "" ]; then sed -e "s,$${LOCALBASE},/usr/local," -e "s,$${X11BASE},/usr/X11R6," - ${.CURDIR}/${INDEXFILE}.tmp > ${.CURDIR}/${INDEXFILE}; + ${INDEXDIR}/${INDEXFILE}.tmp > ${INDEXDIR}/${INDEXFILE}; else - mv ${.CURDIR}/${INDEXFILE}.tmp ${.CURDIR}/${INDEXFILE}; + mv ${INDEXDIR}/${INDEXFILE}.tmp ${INDEXDIR}/${INDEXFILE}; fi; rm -rf $${tmpdir}; echo " Done." -print-index: ${.CURDIR}/${INDEXFILE} - @awk -F| '{ printf("Port:t%snPath:t%snInfo:t%snMaint:t%snIndex:t%snB-deps:t%snR-deps:t%snE-deps:t%snP-deps:t%snF-deps:t%snWWW:t%snn", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$11, $$12, $$13, $$10); }' < ${.CURDIR}/${INDEXFILE} +print-index: ${INDEXDIR}/${INDEXFILE} + @awk -F| '{ printf("Port:t%snPath:t%snInfo:t%snMaint:t%snIndex:t%snB-deps:t%snR-deps:t%snE-deps:t%snP-deps:t%snF-deps:t%snWWW:t%snn", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$11, $$12, $$13, $$10); }' < ${INDEXDIR}/${INDEXFILE} CVS?= cvs SUP?= cvsup --- Mk/bsd.port.mk.5-exp Wed Jan 11 20:50:57 2006 +++ Mk/bsd.port.mk Wed Jan 11 20:58:30 2006 @@ -1224,6 +1224,7 @@ LINUXBASE?= ${DESTDIR}/compat/linux DISTDIR?= ${PORTSDIR}/distfiles _DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} +INDEXDIR?= ${PORTSDIR} .if ${OSVERSION} >= 500036 INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/1/} .else @@ -4905,11 +4906,11 @@ # The following two targets require an up-to-date INDEX in ${PORTSDIR} _PRETTY_PRINT_DEPENDS_LIST= - if [ ! -r ${PORTSDIR}/${INDEXFILE} ] ; then + if [ ! -r ${INDEXDIR}/${INDEXFILE} ] ; then ${ECHO_CMD} "${.TARGET} requires an INDEX file (${INDEXFILE}). Please run make index or make fetchindex."; else ${ECHO_CMD} -n 'This port requires package(s) "' ; - ${ECHO_CMD} -n `${AWK} -F| '$$1 ~ /^${PKGNAME}/ {print $$8;}' ${PORTSDIR}/${INDEXFILE}` ; + ${ECHO_CMD} -n `${AWK} -F| '$$1 ~ /^${PKGNAME}/ {print $$8;}' ${INDEXDIR}/${INDEXFILE}` ; ${ECHO_CMD} '" to ${.TARGET:C/pretty-print-(.*)-depends-list/1/}.'; fi; --- Mk/bsd.port.subdir.mk.5-exp Wed Jan 11 20:50:50 2006 +++ Mk/bsd.port.subdir.mk Wed Jan 11 21:05:42 2006 @@ -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} >= 500036 INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/1/} .else @@ -333,7 +334,7 @@ _PORTSEARCH= here=${.CURDIR}; - if [ ! -r ${PORTSDIR}/${INDEXFILE} ] ; then + if [ ! -r ${INDEXDIR}/${INDEXFILE} ] ; then echo "The ${.TARGET} target requires ${INDEXFILE}. Please run make index or make fetchindex."; else cd ${PORTSDIR}; @@ -437,7 +438,7 @@ if (i in disp) printf("%s:t%sn", names[i], $$i); print(""); - }' ${PORTSDIR}/${INDEXFILE} ; fi + }' ${INDEXDIR}/${INDEXFILE} search: @${_PORTSEARCH} State Changed From-To: feedback->analyzed The combined patch based on this PR and 89363 and 91086 has now been accepted for a test build on the cluster. State Changed From-To: analyzed->closed Committed, thanks. |