X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=build%2FMakefile;h=6ce6dbd9c6561b033b088595dfa43fa6cfcd186c;hb=561a0bbb7671751ab9d75d37ae60d881e69cab64;hp=e836de117a3d31141db532b2c72c452fd980fb6c;hpb=da5ed062277da74d394202a97ffa9344fe88ea2a;p=fuel.git diff --git a/build/Makefile b/build/Makefile index e836de117..6ce6dbd9c 100644 --- a/build/Makefile +++ b/build/Makefile @@ -51,20 +51,21 @@ export REPOINFO := $(BUILD_BASE)/repo_info.sh # Use snapshots # Use nearby repositories -export MIRROR_UBUNTU_URL := $(shell ./f_isoroot/f_repobuild/select_ubuntu_repo.sh --url) -export MIRROR_UBUNTU := $(shell echo "$(MIRROR_UBUNTU_URL)" | cut -d'/' -f3 ) -export MIRROR_UBUNTU_ROOT := $(shell echo -n '/' ; echo "$(MIRROR_UBUNTU_URL)" | cut -d'/' -f4-) +export MIRROR_UBUNTU_URL ?= $(shell ./f_isoroot/f_repobuild/select_ubuntu_repo.sh) +export MIRROR_UBUNTU ?= $(shell echo "$(MIRROR_UBUNTU_URL)" | cut -d'/' -f3 ) +export MIRROR_UBUNTU_ROOT ?= $(shell echo -n '/' ; echo "$(MIRROR_UBUNTU_URL)" | cut -d'/' -f4-) +ifeq (,$(MIRROR_UBUNTU_URL)) +$(warning $(shell ./f_isoroot/f_repobuild/select_ubuntu_repo.sh -d)) +$(error No sane Ubuntu mirror available) +endif export LATEST_MIRROR_ID_URL := http://$(shell ./select_closest_fuel_mirror.py) -# Short circuiting normal package selection as this seems currently broken, see -# hard coding in config.mk -# export MIRROR_MOS_UBUNTU ?= $(shell echo "$(LATEST_MIRROR_ID_URL)" | cut -d'/' -f3) -# export LATEST_TARGET_UBUNTU := $(shell curl -sSf "$(MIRROR_MOS_UBUNTU)/mos-repos/ubuntu/$(MOSVERSION).target.txt" | head -1) -# export LATEST_TARGET_UBUNTU := snapshots/9.0-2016-06-23-164100-copy -# export MIRROR_MOS_UBUNTU_ROOT := /mos-repos/ubuntu/$(LATEST_TARGET_UBUNTU) -# export LATEST_TARGET_CENTOS := $(shell curl -sSf "$(LATEST_MIRROR_ID_URL)/mos-repos/centos/mos$(MOSVERSION)-centos7/os.target.txt" | head -1) -# export MIRROR_FUEL := "$(LATEST_MIRROR_ID_URL)/mos-repos/centos/mos$(MOSVERSION)-centos7/$(LATEST_TARGET_CENTOS)/x86_64" +export MIRROR_MOS_UBUNTU ?= $(shell echo "$(LATEST_MIRROR_ID_URL)" | cut -d'/' -f3) +export LATEST_TARGET_UBUNTU := $(shell curl -sSf "$(MIRROR_MOS_UBUNTU)/mos-repos/ubuntu/$(MOSVERSION).target.txt" | head -1) +export MIRROR_MOS_UBUNTU_ROOT := /mos-repos/ubuntu/$(LATEST_TARGET_UBUNTU) +export LATEST_TARGET_CENTOS := $(shell curl -sSf "$(LATEST_MIRROR_ID_URL)/mos-repos/centos/mos$(MOSVERSION)-centos7/os.target.txt" | head -1) +export MIRROR_FUEL := "$(LATEST_MIRROR_ID_URL)/mos-repos/centos/mos$(MOSVERSION)-centos7/$(LATEST_TARGET_CENTOS)/x86_64" # uncomment and use: make print-VARIABLE #print-% : ; @echo $* = $($*) @@ -183,7 +184,7 @@ deepclean: clean clean-cache docker rmi opnfv.org/ubuntu-builder:14.04 &>/dev/null || exit 0 docker rmi opnfv.org/ubuntu-builder:latest &>/dev/null || exit 0 docker rmi ubuntu:14.04 &>/dev/null || exit 0 - @if docker images | grep -q "ubuntu *14.04"; then \ + @if docker images | grep -q "^ubuntu *14.04"; then \ echo "Error: ubuntu:14.04 still present!"; \ exit 1; \ fi