summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authorhubertf <hubertf>2000-05-31 01:07:14 +0000
committerhubertf <hubertf>2000-05-31 01:07:14 +0000
commitbeacbb8a0e93e479f9b8381b73cd859f716c93de (patch)
treef634f70169157bd3289c39d4bcfc5fc47ecb56d2 /mk/bsd.pkg.mk
parentcecbe5e8524920cba56949b4aaf76914f03c6d15 (diff)
downloadpkgsrc-beacbb8a0e93e479f9b8381b73cd859f716c93de.tar.gz
Check if $DISTDIR is writable before downloading something
(and wonder if the "permission denied" comes from the distfile being unreadable)
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 051ee9883f8..fa868c8fc83 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.443 2000/05/31 01:02:08 hubertf Exp $
+# $NetBSD: bsd.pkg.mk,v 1.444 2000/05/31 01:07:14 hubertf Exp $
#
# This file is in the public domain.
#
@@ -1053,6 +1053,10 @@ describe:
_FETCH_FILE= \
if [ ! -f $$file -a ! -f $$bfile -a ! -h $$bfile ]; then \
${ECHO_MSG} "=> $$bfile doesn't seem to exist on this system."; \
+ if [ ! -w ${_DISTDIR}/. ]; then \
+ ${ECHO_MSG} "=> Can't download to ${_DISTDIR} (permission denied?)."; \
+ exit 1; \
+ fi; \
for site in $$sites; do \
${ECHO_MSG} "=> Attempting to fetch $$bfile from $${site}."; \
if ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${bfile} ${FETCH_AFTER_ARGS}; then \