diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-01-28 09:16:20 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-01-29 00:05:18 +0100 |
commit | f9db9e4a5fbcc790273b8afb2f39002cf2be2021 (patch) | |
tree | 912684221dbe76a14bb9ad22084a8c31d0d59084 | |
parent | 2fd3e88abae39bd8f8a2412570792050184855b2 (diff) | |
download | ptxdist-f9db9e4a5fbcc790273b8afb2f39002cf2be2021.tar.gz ptxdist-f9db9e4a5fbcc790273b8afb2f39002cf2be2021.tar.xz |
setup: allow whitelisting URLs when 'only use PTXdist Mirror' is enabled
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | config/setup/Kconfig | 12 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_get.sh | 3 |
2 files changed, 14 insertions, 1 deletions
diff --git a/config/setup/Kconfig b/config/setup/Kconfig index b7af5508c..f61160368 100644 --- a/config/setup/Kconfig +++ b/config/setup/Kconfig @@ -133,6 +133,18 @@ config SETUP_PTXMIRROR help Enter the fallback mirror for all packages here. +if SETUP_PTXMIRROR_ONLY + +config SETUP_URL_WHITELIST + string + prompt "URL Whitelist" + help + A space separated list of URLs. Any download URL that starts with + one of the here specified URLs will always be used. This + overwrites the 'only use PTXdist Mirror' feature for these URLs. + +endif # SETUP_PTXMIRROR_ONLY + ######################################################################## # WARNING! # # # diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh index c3c0bb257..d6c66fb92 100644 --- a/scripts/lib/ptxd_make_get.sh +++ b/scripts/lib/ptxd_make_get.sh @@ -292,7 +292,8 @@ ptxd_make_get() { if [ -n "${PTXCONF_SETUP_PTXMIRROR_ONLY}" ]; then local pattern add=false - for pattern in "${PTXCONF_SETUP_PTXMIRROR}"; do + for pattern in "${PTXCONF_SETUP_PTXMIRROR}" \ + ${PTXCONF_SETUP_URL_WHITELIST}; do if [[ "${url}" =~ "${pattern}" ]]; then add=true break |