mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-15 21:57:19 +00:00
Use portageq to determine portage distdir
Signed-off-by: Rabi Shanker Guha <guha.rabishankar@gmail.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
91c5c53f59
commit
b69e7bf14e
@ -442,12 +442,18 @@ container_portage()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf "trying to guess portage distfiles dir from host ...\n"
|
||||||
|
portage_distfiles_dir="$(portageq distdir 2>/dev/null)"
|
||||||
|
if [ ! -d "${portage_distfiles_dir}" ]; then
|
||||||
|
portage_distfiles_dir="${portage_dir}/distfiles"
|
||||||
|
fi
|
||||||
|
|
||||||
# if we are here, we have shared portage_dir
|
# if we are here, we have shared portage_dir
|
||||||
#ensure dir exists
|
#ensure dir exists
|
||||||
chroot "${rootfs}" mkdir ${portage_container}
|
chroot "${rootfs}" mkdir ${portage_container}
|
||||||
portage_mount="#container set with shared portage
|
portage_mount="#container set with shared portage
|
||||||
lxc.mount.entry=${portage_dir} ${portage_container/\//} none ro,bind 0 0
|
lxc.mount.entry=${portage_dir} ${portage_container/\//} none ro,bind 0 0
|
||||||
lxc.mount.entry=${portage_dir}/distfiles ${portage_container/\//}/distfiles none rw,bind 0 0
|
lxc.mount.entry=${portage_distfiles_dir} ${portage_container/\//}/distfiles none rw,bind 0 0
|
||||||
#If you use eix, you should uncomment this
|
#If you use eix, you should uncomment this
|
||||||
#lxc.mount.entry=/var/cache/eix var/cache/eix none ro,bind 0 0"
|
#lxc.mount.entry=/var/cache/eix var/cache/eix none ro,bind 0 0"
|
||||||
store_user_message "container has a shared portage from host's ${portage_dir} to ${portage_container/\//}"
|
store_user_message "container has a shared portage from host's ${portage_dir} to ${portage_container/\//}"
|
||||||
|
Loading…
Reference in New Issue
Block a user