aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2002-09-26 01:50:03 +0800
committerkris <kris@FreeBSD.org>2002-09-26 01:50:03 +0800
commitb9ffbbdc6db9b28f6414b65fef9b09e566d4de06 (patch)
tree795abfa4467b41104f9fc2b25203a16f8c4d391f /Mk
parent2bb9bd42b31972e9806d142a21394a6ba45063f4 (diff)
downloadfreebsd-ports-gnome-b9ffbbdc6db9b28f6414b65fef9b09e566d4de06.tar.gz
freebsd-ports-gnome-b9ffbbdc6db9b28f6414b65fef9b09e566d4de06.tar.zst
freebsd-ports-gnome-b9ffbbdc6db9b28f6414b65fef9b09e566d4de06.zip
* Switch back to .tgz packages for 4.x (5.0 still uses .tbz packages) [1]
* Fix some problems in previous revision relating to writability test of ${DISTDIR}, by moving the check a) after we have made the directory if it doesn't exist, and b) inside the loop that actually fetches files, so the check isn't performed with every port make operation that depends on the fetch target (this breaks non-fetch targets as a different user) [2] Submitted by: bmah [1] Reported by: ijliao [2] Tested on: bento
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk12
1 files changed, 8 insertions, 4 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index c06a282782b9..6cc856b5b722 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1277,7 +1277,11 @@ PKG_ARGS+= -o ${PKGORIGIN}
.if defined(PKG_NOCOMPRESS)
PKG_SUFX?= .tar
.else
+.if ${OSVERSION} >= 500039
PKG_SUFX?= .tbz
+.else
+PKG_SUFX?= .tgz
+.endif
.endif
# where pkg_add records its dirty deeds.
PKG_DBDIR?= /var/db/pkg
@@ -2066,10 +2070,6 @@ pre-everything:
.if !target(do-fetch)
do-fetch:
- @if [ ! -w ${DISTDIR} ]; then \
- ${ECHO_MSG} ">> ${DISTDIR} is not writable; cannot fetch."; \
- exit 1; \
- fi
@${MKDIR} ${_DISTDIR}
@(cd ${_DISTDIR}; \
${_MASTER_SITES_ENV} ; \
@@ -2092,6 +2092,10 @@ do-fetch:
fi; \
fi; \
${ECHO_MSG} ">> $$file doesn't seem to exist in ${_DISTDIR}."; \
+ if [ ! -w ${DISTDIR} ]; then \
+ ${ECHO_MSG} ">> ${DISTDIR} is not writable by you; cannot fetch."; \
+ exit 1; \
+ fi; \
if [ ! -z "$$select" ] ; then \
__MASTER_SITES_TMP= ; \
for group in $$select; do \