mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-01 06:21:56 -09:00
utils/docker-run: bind mount .git/objects if needed
If buildroot is checked out as part of a 'repo' manifest, docker-run doesn't fully bind mount the .git directory, leading to commands such as `utils/docker-run make check-package` to fail. Signed-off-by: Nicolas Boichat <drinkcat@google.com> [yann.morin.1998@free.fr: use newly introduced mountpoints list] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
committed by
Yann E. MORIN
parent
7fddbe2530
commit
e71fb8f71c
@@ -33,6 +33,14 @@ if [ "${GIT_DIR}" ]; then
|
|||||||
# path already (in a wordir), then that's a noop.
|
# path already (in a wordir), then that's a noop.
|
||||||
GIT_DIR="$(cd "${MAIN_DIR}"; readlink -e "${GIT_DIR}")"
|
GIT_DIR="$(cd "${MAIN_DIR}"; readlink -e "${GIT_DIR}")"
|
||||||
mountpoints+=( "${GIT_DIR}" )
|
mountpoints+=( "${GIT_DIR}" )
|
||||||
|
|
||||||
|
# 'repo' stores .git/objects separately.
|
||||||
|
if [ -L "${GIT_DIR}/objects" ]; then
|
||||||
|
# GITDIR is already an absolute path, but for symetry
|
||||||
|
# with the above, keep the same cd+readlink construct.
|
||||||
|
OBJECTS_DIR="$(cd "${MAIN_DIR}"; readlink -e "${GIT_DIR}/objects")"
|
||||||
|
mountpoints+=( "${OBJECTS_DIR}" )
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${BR2_DL_DIR}" ]; then
|
if [ "${BR2_DL_DIR}" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user