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

* Re: [Buildroot] [PATCH 1/1] utils/docker-run: Bind mount .git/objects if needed
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2023-08-09 21:30 UTC (permalink / raw)
  To: Nicolas Boichat; +Cc: Ricardo Martincoski, buildroot

Nicolas, All,

On 2023-08-08 04:40 +0000, Nicolas Boichat via buildroot spake thusly:
> 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>

Thanks, I've included this in my respin, after adapting to some rework
of mine:

    https://patchwork.ozlabs.org/project/buildroot/list/?series=368134

So I've marked this patch as superseded (the new one stil has you as
author!).

Thanks!

Regards,
Yann E. MORIN.

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

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[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