From owner-freebsd-ports Mon May 6 17:40:14 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2606F37B403 for ; Mon, 6 May 2002 17:40:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g470e2p51667; Mon, 6 May 2002 17:40:02 -0700 (PDT) (envelope-from gnats) Received: from tomts17-srv.bellnexxia.net (tomts17.bellnexxia.net [209.226.175.71]) by hub.freebsd.org (Postfix) with ESMTP id 26B7E37B406 for ; Mon, 6 May 2002 17:37:25 -0700 (PDT) Received: from shall.anarcat.dyndns.org ([65.94.191.78]) by tomts17-srv.bellnexxia.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP id <20020507003723.DYWV6552.tomts17-srv.bellnexxia.net@shall.anarcat.dyndns.org> for ; Mon, 6 May 2002 20:37:23 -0400 Received: from lenny.anarcat.dyndns.org (lenny.anarcat.dyndns.org [192.168.0.4]) by shall.anarcat.dyndns.org (Postfix) with SMTP id 5803D64; Mon, 6 May 2002 20:37:20 -0400 (EDT) Received: by lenny.anarcat.dyndns.org (sSMTP sendmail emulation); Mon, 6 May 2002 20:36:23 -0400 Message-Id: <20020507003720.5803D64@shall.anarcat.dyndns.org> Date: Mon, 6 May 2002 20:36:23 -0400 From: The Anarcat Reply-To: The Anarcat To: FreeBSD-gnats-submit@FreeBSD.org Cc: anarcat@anarcat.dyndns.org X-Send-Pr-Version: 3.113 Subject: ports/37809: make index target fails on read-only /usr/ports Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 37809 >Category: ports >Synopsis: make index target fails on read-only /usr/ports >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 06 17:40:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: The Anarcat >Release: FreeBSD 4.5-STABLE i386 >Organization: Nada, Inc. >Environment: System: FreeBSD lenny.anarcat.dyndns.org 4.5-STABLE FreeBSD 4.5-STABLE #1: Tue Apr 30 18:11:04 EDT 2002 anarcat@lenny.anarcat.dyndns.org:/usr/obj/usr/src/sys/LENNY i386 >Description: make index is a pretty cpu and disk intensive activity. In some setups, a simple file server is used to serve a ports tree as read-only, and a more powerful machine is setup as the build machine. Well, in my setup anyways. :) The make index target doesn't really take this into account and hardcodes the path to the INDEX file. >How-To-Repeat: mount -r /usr/porst make index >Fix: This patch "works" here, but I'm not sure it is correct since it discards all .CURDIR in favor of PORTSDIR. While I'm here, %s#${.CURDIR}/INDEX#${INDEXFILE}#g If the latter is not appropriate, only patch the index and ${INDEXFILE} target, and everything should be merry. --- /usr/ports/Makefile Sun Dec 23 05:58:42 2001 +++ Makefile Mon May 6 20:15:50 2002 @@ -56,26 +56,28 @@ .include +INDEXFILE?=${PORTSDIR}/INDEX + index: - @rm -f ${.CURDIR}/INDEX - @cd ${.CURDIR} && make ${.CURDIR}/INDEX + @rm -f ${INDEXFILE} + @cd ${.CURDIR} && make ${INDEXFILE} -${.CURDIR}/INDEX: +${INDEXFILE}: @echo -n "Generating INDEX - please wait.." - @cd ${.CURDIR} && make describe ECHO_MSG="echo > /dev/null" | \ - perl ${.CURDIR}/Tools/make_index > ${.CURDIR}/INDEX + @cd ${PORTSDIR} && make describe ECHO_MSG="echo > /dev/null" | \ + perl ${PORTSDIR}/Tools/make_index > ${INDEXFILE} .if !defined(INDEX_NOSORT) - @sed -e 's./..g' ${.CURDIR}/INDEX | \ + @sed -e 's./..g' ${INDEXFILE} | \ sort -t '|' +1 -2 | \ - sed -e 's../.g' > ${.CURDIR}/INDEX.tmp - @mv -f ${.CURDIR}/INDEX.tmp ${.CURDIR}/INDEX + sed -e 's../.g' > ${INDEXFILE}.tmp + @mv -f ${INDEXFILE}.tmp ${INDEXFILE} .endif @echo " Done." -print-index: ${.CURDIR}/INDEX - @awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9); }' < ${.CURDIR}/INDEX +print-index: ${INDEXFILE} + @awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9); }' < ${INDEXFILE} -parallel: ${.CURDIR}/INDEX +parallel: ${INDEXFILE} .if !defined(branch) @echo "The parallel target requires a branch parameter," @echo "e.g.: \"make parallel branch=X\"" @@ -84,7 +86,7 @@ .for dir in ${SUBDIR} @echo "all: ${dir}-all" .endfor - @awk -F '|' '{me=$$1; here=$$2; bdep=$$8; rdep=$$9; split(here, tmp, "/"); if (bdep != "") { gsub("$$", ".tgz", bdep); gsub(" ", ".tgz ", bdep); } if (rdep != "") { gsub("$$", ".tgz", rdep); gsub(" ", ".tgz ", rdep); } print tmp[4] "-all: " me ".tgz"; print me ": " me ".tgz"; print me ".tgz: " bdep " " rdep; printf("\t@/var/portbuild/scripts/pdispatch ${branch} /var/portbuild/scripts/portbuild %s.tgz %s", me, here); if (bdep != "") printf(" %s", bdep); if (rdep != "") printf(" %s", rdep); printf("\n")}' < ${.CURDIR}/INDEX + @awk -F '|' '{me=$$1; here=$$2; bdep=$$8; rdep=$$9; split(here, tmp, "/"); if (bdep != "") { gsub("$$", ".tgz", bdep); gsub(" ", ".tgz ", bdep); } if (rdep != "") { gsub("$$", ".tgz", rdep); gsub(" ", ".tgz ", rdep); } print tmp[4] "-all: " me ".tgz"; print me ": " me ".tgz"; print me ".tgz: " bdep " " rdep; printf("\t@/var/portbuild/scripts/pdispatch ${branch} /var/portbuild/scripts/portbuild %s.tgz %s", me, here); if (bdep != "") printf(" %s", bdep); if (rdep != "") printf(" %s", rdep); printf("\n")}' < ${INDEXFILE} CVS?= cvs .if defined(SUPHOST) >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message