summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjoerg <joerg>2015-09-13 15:03:57 +0000
committerjoerg <joerg>2015-09-13 15:03:57 +0000
commit56daee6475f4981ddeb3a66df8c2dfca7546896f (patch)
tree13a7f7cb4ea0fe7afeb868fd02b75f24075a50d6 /mk
parentd04562d12467152f66e5ddc854ee2cc50d20c182 (diff)
downloadpkgsrc-56daee6475f4981ddeb3a66df8c2dfca7546896f.tar.gz
Introduce IGNORE_INTERACTIVE_FETCH to allow trying to fetch files from
the override site, even for INTERACTIVE_STATE=stage or FETCH_MESSAGE. Ignore all backup sites as they won't have the distfile anyway, the fetch wouldn't be interactive in first place otherwise.
Diffstat (limited to 'mk')
-rw-r--r--mk/fetch/bsd.fetch-vars.mk8
-rw-r--r--mk/fetch/fetch.mk9
2 files changed, 14 insertions, 3 deletions
diff --git a/mk/fetch/bsd.fetch-vars.mk b/mk/fetch/bsd.fetch-vars.mk
index 0239e2579bf..533ecc17d4b 100644
--- a/mk/fetch/bsd.fetch-vars.mk
+++ b/mk/fetch/bsd.fetch-vars.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.fetch-vars.mk,v 1.21 2015/09/08 12:37:56 joerg Exp $
+# $NetBSD: bsd.fetch-vars.mk,v 1.22 2015/09/13 15:03:57 joerg Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -17,6 +17,12 @@
# obtained a file. It is called with the relative path of the distfile
# in ${DISTDIR} and the full URL it was obtained from.
#
+# IGNORE_INTERACTIVE_FETCH can be set to yes to skip the normal
+# interactive check logic and tries any provided MASTER_SITE
+# or MASTER_SITE_OVERRIDE.
+#
+# The normal backup sites are explicitly disabled in this case.
+#
# The following variables may be set in a package Makefile:
#
# DIST_SUBDIR is the subdirectory of ${DISTDIR} in which the original
diff --git a/mk/fetch/fetch.mk b/mk/fetch/fetch.mk
index c2f3d90a42b..1d8b7256113 100644
--- a/mk/fetch/fetch.mk
+++ b/mk/fetch/fetch.mk
@@ -1,6 +1,8 @@
-# $NetBSD: fetch.mk,v 1.65 2015/09/08 11:13:12 joerg Exp $
+# $NetBSD: fetch.mk,v 1.66 2015/09/13 15:03:57 joerg Exp $
+.if empty(INTERACTIVE_STAGE:Mfetch) && empty(FETCH_MESSAGE:U)
_MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP:=${DIST_SUBDIR}${DIST_SUBDIR:D/}}
+.endif
_MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE:=${DIST_SUBDIR}${DIST_SUBDIR:D/}}
# Where to put distfiles that don't have any other master site
@@ -115,7 +117,10 @@ post-fetch:
${DISTDIR}/${_file_}:
@${DO_NADA}
. else
-${DISTDIR}/${_file_}: fetch-check-interactive do-fetch-file error-check
+${DISTDIR}/${_file_}: do-fetch-file error-check
+. if !empty(IGNORE_INTERACTIVE_FETCH:M[yY][eE][sS])
+${DISTDIR}/${_file_}: fetch-check-interactive
+. endif
. endif
.endfor