summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2018-02-23 16:39:38 +0000
committerRaphaël Hertzog <hertzog@debian.org>2018-02-23 16:39:38 +0000
commitee8d06c46cfa30fb0c7d43fde5d4f8dfef3967c4 (patch)
tree48377335c9178913db2e8607c78f4415968fc1c6
parent96e73960b3e64bae81294250e5ad531212ef0ac1 (diff)
parent9a0c6102fdff56da0871bfb1a63cc0349d6317f4 (diff)
downloadvyos-live-build-ee8d06c46cfa30fb0c7d43fde5d4f8dfef3967c4.tar.gz
vyos-live-build-ee8d06c46cfa30fb0c7d43fde5d4f8dfef3967c4.zip
Merge branch 'fix_offline_repo' into 'master'
Fix build with local offline mirrors See merge request live-team/live-build!1
-rwxr-xr-xscripts/build/chroot_archives12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/build/chroot_archives b/scripts/build/chroot_archives
index 85ad35b0c..596fafc57 100755
--- a/scripts/build/chroot_archives
+++ b/scripts/build/chroot_archives
@@ -449,12 +449,6 @@ EOF
mv chroot/etc/apt/sources.list.d/zz-sources.list chroot/etc/apt/sources.list
fi
- # Unmount local repository
-if echo "${LB_PARENT_MIRROR_CHROOT}" | grep -q '^file:/'
-then
- Chroot_unbind_path chroot "$(echo ${LB_PARENT_MIRROR_CHROOT} | sed -e 's|file:||')"
-fi
-
# Configure generic indices
# Cleaning apt list cache
rm -rf chroot/var/lib/apt/lists
@@ -652,6 +646,12 @@ EOF
# Updating indices
Apt chroot update
+ # Unmount local repository - after apt update or it will fail due to missing files
+ if echo "${LB_PARENT_MIRROR_CHROOT}" | grep -q '^file:/'
+ then
+ Chroot_unbind_path chroot "$(echo ${LB_PARENT_MIRROR_CHROOT} | sed -e 's|file:||')"
+ fi
+
# Cleaning apt package cache
rm -rf chroot/var/cache/apt
mkdir -p chroot/var/cache/apt/archives/partial