Subject: Re: make fetch 'broken'
To: None <tech-pkg@NetBSD.org>
From: Johnny C. Lam <jlam@pkgsrc.org>
List: tech-pkg
Date: 05/28/2007 11:09:42
This is a multi-part message in MIME format.
--------------020600000608040104060806
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Bernd Ernesti wrote:
>
> someone broke the make fetch stage so it creates now the work directory
> if it is executed!
Does this patch fix the problem? It does two things:
(1) Move the meat of the bootstrap-depends target entirely within the
lock, which I think is what was originally intended.
(2) Avoid creating ${WRKDIR}/.depends when running the bootstrap-depends
target, which is run as part of running the fetch target. We still
create the .depends file later when we need it.
Cheers,
-- Johnny Lam <jlam@pkgsrc.org>
--------------020600000608040104060806
Content-Type: text/plain;
name="depends.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="depends.diff"
Index: flavor/pkg/depends.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/flavor/pkg/depends.mk,v
retrieving revision 1.34
diff -u -r1.34 depends.mk
--- flavor/pkg/depends.mk 28 May 2007 11:07:00 -0000 1.34
+++ flavor/pkg/depends.mk 28 May 2007 15:06:47 -0000
@@ -46,6 +46,12 @@
" "${BUILD_DEPENDS:Q} \
" "${DEPENDS:Q}
+_LIST_DEPENDS_CMD.bootstrap= \
+ ${SETENV} AWK=${AWK:Q} PKG_ADMIN=${PKG_ADMIN:Q} \
+ PKGSRCDIR=${PKGSRCDIR:Q} PWD_CMD=${PWD_CMD:Q} SED=${SED:Q} \
+ ${SH} ${PKGSRCDIR}/mk/flavor/pkg/list-dependencies \
+ " "${BOOTSTRAP_DEPENDS:Q} " " " "
+
_RESOLVE_DEPENDS_CMD= \
${SETENV} _PKG_DBDIR=${_PKG_DBDIR:Q} PKG_ADMIN=${PKG_ADMIN:Q} \
_DEPENDS_FILE=${_DEPENDS_FILE:Q} \
@@ -128,11 +134,14 @@
###
.PHONY: bootstrap-depends
_BOOTSTRAP_DEPENDS_TARGETS+= acquire-bootstrap-depends-lock
-_BOOTSTRAP_DEPENDS_TARGETS+= ${_DEPENDS_FILE}
+_BOOTSTRAP_DEPENDS_TARGETS+= _flavor-bootstrap-depends
_BOOTSTRAP_DEPENDS_TARGETS+= release-bootstrap-depends-lock
bootstrap-depends: ${_BOOTSTRAP_DEPENDS_TARGETS}
- ${RUN}${CAT} ${_DEPENDS_FILE} | \
+
+.PHONY: _flavor-bootstrap-depends
+_flavor-bootstrap-depends:
+ ${RUN}${_LIST_DEPENDS_CMD.bootstrap} | \
while read type pattern dir; do \
${TEST} "$$type" != "bootstrap" && continue; \
${_DEPENDS_INSTALL_CMD}; \
--------------020600000608040104060806--