summaryrefslogtreecommitdiff
path: root/scripts/build/bootstrap_archives
diff options
context:
space:
mode:
authorJan Blunck <jblunck@brocade.com>2014-11-28 20:53:50 +0100
committerDaniel Baumann <mail@daniel-baumann.ch>2014-12-10 08:43:02 +0100
commit9d5639e9a058ea7cfb13500ed71dd97447135069 (patch)
tree170a4babf9a39ec0be4d2095290390e6fa6c7fcc /scripts/build/bootstrap_archives
parent04a09f27e4089aaab0694ea067d7273d9420f9c8 (diff)
downloadvyos-live-build-9d5639e9a058ea7cfb13500ed71dd97447135069.tar.gz
vyos-live-build-9d5639e9a058ea7cfb13500ed71dd97447135069.zip
Bind local repository into chroot directory.
If a local repository path is given as a mirror URL lets bind it into the chroot. The local repository will be unmounted while processing "remove" or latest by the exit function.
Diffstat (limited to 'scripts/build/bootstrap_archives')
-rwxr-xr-xscripts/build/bootstrap_archives5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/build/bootstrap_archives b/scripts/build/bootstrap_archives
index c2e37db27..42cb98550 100755
--- a/scripts/build/bootstrap_archives
+++ b/scripts/build/bootstrap_archives
@@ -59,6 +59,11 @@ Restore_cache cache/packages.chroot
# Configure custom sources.list
+if echo "${LB_PARENT_MIRROR_CHROOT}" | grep -q '^file:/'
+then
+ Chroot_bind_path chroot "$(echo ${LB_PARENT_MIRROR_CHROOT} | sed -e 's|file:||')"
+fi
+
cat > chroot/etc/apt/${_PARENT_FILE} << EOF
deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION} ${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}
EOF