summaryrefslogtreecommitdiffstats
path: root/build/f_isoroot/f_repobuild
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2016-12-20 00:49:47 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2016-12-20 19:09:57 +0100
commit592d5a420bdcc8e78530ee42527fe05f82371b5b (patch)
tree453069f9111fd8ca06ae723f7e1cf0a7c52c5dce /build/f_isoroot/f_repobuild
parentf3e8720ea4ca033bf90521258f2e08f99a56d572 (diff)
build: select_ubuntu_repo: break on err
Stop ISO build process if no sane Ubuntu mirrors are available, instead of continuing with an empty URL, which is bound to fail later. While at it, skip re-assesing the output of select_ubuntu_repo.sh if the URL var already is set. Also, stderr and stdout were both captured in UBUNTU_MIRROR_URL, so disable debug by default, and only print debug info in case no valid mirror is found. v2 -> v3: - allow "One hour behind" mirror state to be considered, since we already accept "Six hours behind" mirrors; JIRA: FUEL-240 Change-Id: I791942da234304528ff5cae1891415602e1a62b2 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'build/f_isoroot/f_repobuild')
-rwxr-xr-xbuild/f_isoroot/f_repobuild/select_ubuntu_repo.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh b/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh
index 24bd42234..5618eb79b 100755
--- a/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh
+++ b/build/f_isoroot/f_repobuild/select_ubuntu_repo.sh
@@ -69,14 +69,14 @@ if [ "$1" == "-d" ]; then
fi
# Hardcode for testing purposes
-DEBUG=1
+# DEBUG=1
TMPFILE=$(mktemp /tmp/mirrorsXXXXX)A
trap cleanup exit
# Generate a list of mirrors considered as "up"
curl -s https://launchpad.net/ubuntu/+archivemirrors | \
- grep -P -B8 "statusUP|statusSIX" | \
+ grep -P -B8 "statusUP|statusONE|statusSIX" | \
grep -o -P "(f|ht)tp.*\"" | \
sed 's/"$//' | sort | uniq > $TMPFILE