summaryrefslogtreecommitdiffstats
path: root/build/f_isoroot/f_repobuild
diff options
context:
space:
mode:
authorJonas Bjurel <jonas.bjurel@ericsson.com>2016-09-20 15:54:27 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-09-20 15:54:27 +0000
commitaae10837b3763e9d0a806dda9964abaebb6d8736 (patch)
tree5236c5d193cc699cf872e7c2c874944df25fc11a /build/f_isoroot/f_repobuild
parent4d3783e1afadf7c23a6a96624170906c4cf90f0d (diff)
parent3618bd69b8fc88b45330dff2a698e5303602622e (diff)
Merge "Make sure to use only up-to-date mirrors" into stable/colorado
Diffstat (limited to 'build/f_isoroot/f_repobuild')
-rwxr-xr-xbuild/f_isoroot/f_repobuild/select_ubuntu_repo.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh b/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh
index 7b134e73c..c3bb5cf36 100755
--- a/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh
+++ b/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh
@@ -8,14 +8,20 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-# Try to choose close ubuntu mirror
+# Try to choose close ubuntu mirror from mirrors.txt, but "whitewash" this
+# against the full repo list to removed mirrors not up-to-date.
# Some Ubuntu mirrors seem less reliable for this type of mirroring -
# as they are discoved they can be added to the blacklist below in order
# for them not to be considered.
-BLACKLIST="mirrors.se.eu.kernel.org mirror.its.dal.ca"
+BLACKLIST="mirror.clibre.uqam.ca"
-for url in $(curl -s http://mirrors.ubuntu.com/mirrors.txt)
+for url in $((curl -s https://launchpad.net/ubuntu/+archivemirrors | \
+ grep -P -B8 "statusUP|statusSIX" | \
+ grep -o -P "(f|ht)tp.*\"" | \
+ sed 's/"$//' | sort | uniq; \
+ curl -s http://mirrors.ubuntu.com/mirrors.txt | sort | uniq) | \
+ sort | uniq -d)
do
host=$(echo $url | cut -d'/' -f3)
echo ${BLACKLIST} | grep -q ${host} && continue