Merge branch 'fix_offline_repo' into 'master'

Fix build with local offline mirrors

See merge request live-team/live-build!1
This commit is contained in:
Raphaël Hertzog 2018-02-23 16:39:38 +00:00
commit ee8d06c46c
1 changed files with 6 additions and 6 deletions

View File

@ -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