aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorMichal Skalski <mskalski@mirantis.com>2016-02-10 01:25:17 +0100
committerMichal Skalski <mskalski@mirantis.com>2016-02-10 08:21:37 +0000
commit400ccd8fd50bc1d32f1baf141ebfe2270895c51c (patch)
treee4c443bb45b42d541cc7fdb7712f668de82f9cf6 /build
parent5049b392f5e2c0960ca2ceae8c8b82fecd9ea61d (diff)
Put ubuntu mirror in predictable directory
Change-Id: I05cb8dfcf8d8b7cf256c6e6d900f1a90a2b2870e Signed-off-by: Michal Skalski <mskalski@mirantis.com> (cherry picked from commit 28abcb7287d3170e007e938872116161c927c38a)
Diffstat (limited to 'build')
-rw-r--r--build/f_isoroot/f_repobuild/Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/build/f_isoroot/f_repobuild/Makefile b/build/f_isoroot/f_repobuild/Makefile
index 455caf263..e95dbf2ef 100644
--- a/build/f_isoroot/f_repobuild/Makefile
+++ b/build/f_isoroot/f_repobuild/Makefile
@@ -10,8 +10,7 @@
SHELL := /bin/bash
TOP := $(shell pwd)
-UBUNTU_DIR := $(shell dirname $(MIRROR_UBUNTU_ROOT))
-TMP_ROOT_DIR := $(shell echo "$(UBUNTU_DIR)" | cut -d "/" -f2)
+TMP_ROOT_DIR := $(shell echo "$(MIRROR_UBUNTU_ROOT)" | cut -d "/" -f2)
# Enable use of exact repo commit if defined, else use Fuel main branch
FUEL_MIRROR_COMMIT?=$(FUEL_MAIN_TAG)
@@ -36,9 +35,11 @@ nailgun:
sudo fuel-mirror --debug --config ./opnfv-config.yaml create --group ubuntu --pattern=ubuntu
sudo chmod -R 755 /var/www/nailgun
cp -Rp /var/www/nailgun .
- if [ "$(UBUNTU_DIR)" != "/" ]; then \
- mv nailgun/mirrors$(UBUNTU_DIR)/ubuntu nailgun/mirrors/ubuntu;\
- rm -rf nailgun/mirrors/$(TMP_ROOT_DIR);\
+ # On the end we want to have ubuntu repository in mirrors/ubuntu directory
+ -if [ "$(MIRROR_UBUNTU_ROOT)" != "/ubuntu/" ]; then \
+ mkdir -p nailgun/mirrors/ubuntu;\
+ mv nailgun/mirrors$(MIRROR_UBUNTU_ROOT)* nailgun/mirrors/ubuntu;\
+ [ "$(MIRROR_UBUNTU_ROOT)" != "/" ] && rm -rf nailgun/mirrors/$(TMP_ROOT_DIR);\
fi
# Store artifact in cache straight away if caching is enabled
# (no .cacheid will be present unless this is a cached build)