pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk For the fetch-list target: Do not use mkdir if just...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a6611238e47c
branches: trunk
changeset: 496608:a6611238e47c
user: reed <reed%pkgsrc.org@localhost>
date: Wed Jul 06 05:52:34 2005 +0000
description:
For the fetch-list target: Do not use mkdir if just creating a shell
script that will make the directory later. This fixes the problem
where it fails when doesn't have write access -- for example use
"make fetch-list" to create the shell script to use on another
system.
Thank you, Geert Hendrickx, for your feedback.
Also in a few places echo ${fetchfile:T} instead of ${fetchfile}.
(Todo: maybe should not say "not fetched" until has tried all sites.)
diffstat:
mk/bsd.pkg.mk | 23 +++++++++--------------
1 files changed, 9 insertions(+), 14 deletions(-)
diffs (65 lines):
diff -r 0497afc66da8 -r a6611238e47c mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Wed Jul 06 03:35:28 2005 +0000
+++ b/mk/bsd.pkg.mk Wed Jul 06 05:52:34 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1705 2005/06/27 16:25:43 rillig Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1706 2005/07/06 05:52:34 reed Exp $
#
# This file is in the public domain.
#
@@ -3255,12 +3255,9 @@
@${ECHO} '#'
@location=`${PWD_CMD} | ${AWK} -F / '{ print $$(NF-1) "/" $$NF }'`; \
${ECHO} '# Need additional files for ${PKGNAME} ('$$location')...'
- @${ECHO} '#'
- @${MKDIR} ${_DISTDIR}
. for fetchfile in ${_ALLFILES}
. if defined(_FETCH_MESSAGE)
- @(cd ${_DISTDIR}; \
- if [ ! -f ${fetchfile:T} ]; then \
+ if [ ! -f ${_DISTDIR}/${fetchfile:T} ]; then \
${ECHO}; \
filesize=`${AWK} ' \
/^Size/ && $$2 == "(${fetchfile})" { print $$4 } \
@@ -3268,10 +3265,9 @@
${ECHO} '# Prompt user to get ${fetchfile} ('$${filesize-???}' bytes) manually:'; \
${ECHO} '#'; \
${ECHO} ${_FETCH_MESSAGE:Q}; \
- fi)
+ fi
. elif defined(DYNAMIC_MASTER_SITES)
- @(cd ${_DISTDIR}; \
- if [ ! -f ${fetchfile:T} ]; then \
+ if [ ! -f ${_DISTDIR}/${fetchfile:T} ]; then \
${ECHO}; \
filesize=`${AWK} ' \
/^Size/ && $$2 == "(${fetchfile})" { print $$4 } \
@@ -3288,13 +3284,12 @@
${ECHO} 'cd ${_DISTDIR} && [ -f ${fetchfile} -o -f ${fetchfile:T} ] ||'; \
${ECHO} 'for site in $$sites; do'; \
${ECHO} ' ${FETCH_CMD} ${FETCH_BEFORE_ARGS} "$${site}${fetchfile:T}" ${FETCH_AFTER_ARGS} && break ||'; \
- ${ECHO} ' ${ECHO} ${fetchfile} not fetched'; \
+ ${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \
${ECHO} done; \
${ECHO} ')'; \
- fi)
+ fi
. else
- @(cd ${_DISTDIR}; \
- if [ ! -f ${fetchfile:T} ]; then \
+ if [ ! -f ${_DISTDIR}/${fetchfile:T} ]; then \
${ECHO}; \
filesize=`${AWK} ' \
/^Size/ && $$2 == "(${fetchfile})" { print $$4 } \
@@ -3307,9 +3302,9 @@
${ECHO} 'cd ${_DISTDIR} && [ -f ${fetchfile} -o -f ${fetchfile:T} ] ||'; \
${ECHO} 'for site in $$sites; do'; \
${ECHO} ' ${FETCH_CMD} ${FETCH_BEFORE_ARGS} "$${site}${fetchfile:T}" ${FETCH_AFTER_ARGS} && break ||'; \
- ${ECHO} ' ${ECHO} ${fetchfile} not fetched'; \
+ ${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \
${ECHO} done; \
- fi)
+ fi
. endif # defined(_FETCH_MESSAGE) || defined(DYNAMIC_MASTER_SITES)
. endfor
. endif # !empty(_ALLFILES)
Home |
Main Index |
Thread Index |
Old Index