From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Nicolas Boichat <drinkcat@google.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 3/5] utils/docker-run: bind mount .git/objects if needed
Date: Thu, 10 Aug 2023 21:13:10 +0200 [thread overview]
Message-ID: <20230810191310.GI421096@scaer> (raw)
In-Reply-To: <CAHRZCZVN4W6d_GEeMxjv36oyQ=Edp5dzoGhyojAxT0gGt9R8UA@mail.gmail.com>
Nicolas, All,
On 2023-08-10 08:23 +0800, Nicolas Boichat via buildroot spake thusly:
> On Thu, Aug 10, 2023 at 5:24 AM Yann E. MORIN < [1]yann.morin.1998@free.fr> wrote:
> From: Nicolas Boichat < [2]drinkcat@google.com>
>
> 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 < [3]drinkcat@google.com>
> [ [4]yann.morin.1998@free.fr: use newly introduced mountpoints list]
> Signed-off-by: Yann E. MORIN < [5]yann.morin.1998@free.fr>
> ---
> utils/docker-run | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/utils/docker-run b/utils/docker-run
> index 7b27a9b05c..ff903b96e9 100755
> --- a/utils/docker-run
> +++ b/utils/docker-run
> @@ -33,6 +33,12 @@ if [ "${GIT_DIR}" ]; then
> # path already (in a wordir), then that's a noop.
> GIT_DIR="$(cd "${MAIN_DIR}"; readlink -e "${GIT_DIR}")"
> mountpoints+=( "${GIT_DIR}" )
> +
> + # 'repo' stores .git/objects separately.
> + if [ -L "${GIT_DIR}/objects" ]; then
> + OBJECTS_DIR="$(cd "${MAIN_DIR}"; readlink -e "${GIT_DIR}/objects")"
>
> I intentionally removed `cd "${MAIN_DIR}"` in my patch, as ${GIT_DIR}
> has already been made an absolute path, just above, so the cd
> operation is unnecessary.
That's right. But for symetry, I preferred to use the same construct.
True, that's superfluous, but at least we don;t have to think too hard
about it when we look at the code.
Thanks for the feedback; I should probably have mentioned that in the
commit log.
Regards,
Yann E. MORIN.
> + mountpoints+=( "${OBJECTS_DIR}" )
>
> Otherwise, that's a nice cleanup ,-)
> Thanks!
>
>
> + fi
> fi
>
> if [ "${BR2_DL_DIR}" ]; then
> --
> 2.25.1
>
> Links:
> 1. mailto:yann.morin.1998@free.fr
> 2. mailto:drinkcat@google.com
> 3. mailto:drinkcat@google.com
> 4. mailto:yann.morin.1998@free.fr
> 5. mailto:yann.morin.1998@free.fr
> _______________________________________________
> 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
next prev parent reply other threads:[~2023-08-10 19:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 21:24 [Buildroot] [PATCH 0/5] utils/docker-run: cleanups and improvements (branch yem/docker-run) Yann E. MORIN
2023-08-09 21:24 ` [Buildroot] [PATCH 1/5] utils/docker-run: introduce sorted list of mountpoints Yann E. MORIN
2023-08-09 21:24 ` [Buildroot] [PATCH 2/5] utils/docker-run: mount the download directory if specified Yann E. MORIN
2023-08-09 21:24 ` [Buildroot] [PATCH 3/5] utils/docker-run: bind mount .git/objects if needed Yann E. MORIN
2023-08-10 0:23 ` Nicolas Boichat via buildroot
2023-08-10 19:13 ` Yann E. MORIN [this message]
2023-08-09 21:24 ` [Buildroot] [PATCH 4/5] utils/docker-run: also mount current working directory Yann E. MORIN
2023-08-09 21:24 ` [Buildroot] [PATCH 5/5] utils/docker-run: make it compatible with SELinux Yann E. MORIN
2023-08-20 14:22 ` [Buildroot] [PATCH 0/5] utils/docker-run: cleanups and improvements (branch yem/docker-run) Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230810191310.GI421096@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=drinkcat@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox