diff options
author | hubertf <hubertf> | 2000-05-31 01:07:14 +0000 |
---|---|---|
committer | hubertf <hubertf> | 2000-05-31 01:07:14 +0000 |
commit | beacbb8a0e93e479f9b8381b73cd859f716c93de (patch) | |
tree | f634f70169157bd3289c39d4bcfc5fc47ecb56d2 /mk/bsd.pkg.mk | |
parent | cecbe5e8524920cba56949b4aaf76914f03c6d15 (diff) | |
download | pkgsrc-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.mk | 6 |
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 \ |