Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] utils/docker-run: Bind mount .git/objects if needed
@ 2023-08-08  4:40 Nicolas Boichat via buildroot
  2023-08-09 21:30 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Boichat via buildroot @ 2023-08-08  4:40 UTC (permalink / raw)
  To: buildroot; +Cc: Nicolas Boichat, Ricardo Martincoski

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>
---
 utils/docker-run | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/utils/docker-run b/utils/docker-run
index ab95e61e84..6a58db6d9f 100755
--- a/utils/docker-run
+++ b/utils/docker-run
@@ -32,6 +32,12 @@ if [ "${GIT_DIR}" ]; then
     # path already (in a wordir), then that's a noop.
     GIT_DIR="$(cd "${MAIN_DIR}"; readlink -e "${GIT_DIR}")"
     docker_opts+=( --mount "type=bind,src=${GIT_DIR},dst=${GIT_DIR}" )
+
+    # 'repo' stores .git/objects separately.
+    if [ -L "${GIT_DIR}/objects" ]; then
+        OBJECTS_DIR="$(readlink -e "${GIT_DIR}/objects")"
+        docker_opts+=( --mount "type=bind,src=${OBJECTS_DIR},dst=${OBJECTS_DIR}" )
+    fi
 fi
 
 if tty -s; then
-- 
2.41.0.640.ga95def55d0-goog

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-09 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-08  4:40 [Buildroot] [PATCH 1/1] utils/docker-run: Bind mount .git/objects if needed Nicolas Boichat via buildroot
2023-08-09 21:30 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox