From: "Antonin Godard" <antonin.godard@bootlin.com>
To: "Quentin Schulz" <foss@0leil.net>, <docs@lists.yoctoproject.org>
Cc: "Quentin Schulz" <quentin.schulz@cherry.de>
Subject: Re: [docs] [PATCH v2 3/3] tools/build-docs-container: build in separate directory for each distro
Date: Tue, 14 Oct 2025 11:27:28 +0200 [thread overview]
Message-ID: <DDHXSDDQ1EBG.5IL8Q984MU8S@bootlin.com> (raw)
In-Reply-To: <20251009-iid-file-v2-3-715d527457f0@cherry.de>
On Thu Oct 9, 2025 at 12:24 PM CEST, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> This allows to compare build output from different distros if necessary
> and make it easier to make sure we start building from a clean slate.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
> ---
> documentation/tools/build-docs-container | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/documentation/tools/build-docs-container b/documentation/tools/build-docs-container
> index 831d357fb..47320e182 100755
> --- a/documentation/tools/build-docs-container
> +++ b/documentation/tools/build-docs-container
> @@ -60,6 +60,7 @@ main ()
> fi
>
> local image="$1"
> + local orig_image=$image
> shift
>
> OCI=$(which "$CONTAINERCMD")
> @@ -159,6 +160,7 @@ main ()
> --volume="$DOCS_DIR:/docs:rw"
> --workdir=/docs
> --security-opt label=disable
> + --env BUILDDIR="_build-$orig_image-$image_sha"
I think the idea is good for improving concurrency, however I think for
development it would be nice to keep _build the default. What about having
the following default behavior:
- Build in "_build-$orig_image-$image_sha"
- If "_build" does not exist _or_ is a symlink, create or replace a symlink to
"_build-$orig_image-$image_sha" from the previous step, named "_build"
_build -> _build-$orig_image-$image_sha"
- If "_build" exists and is a directory, leave it untouched as it may be
originating from another "regular" build.
Then:
- `make clean` removes "_build" and "_build-$orig_image-$image_sha" (when
"_build-$orig_image-$image_sha" exists and _build is a symlink to it)
- We could maybe also have a "cleanall" (or name alike) that removes all the
_build* it finds, to clean everything up.
With this, additional runs with different SHAs will just stack next to this,
re-creating the symlink only when it is not a directory. This way, I know that
for any previous run of build-docs-container, I can open the "_build" symlink
to get the latest output. Of course I need to be careful when running concurrent
builds, but that is another use-case, a bit different from day-to-day
development IMO.
What do you think?
Antonin
--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-10-14 9:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 10:23 [PATCH v2 0/3] tools/build-docs-container: improve concurrent safety Quentin Schulz
2025-10-09 10:23 ` [PATCH v2 1/3] tools/build-docs-container: guarantee the image to run matches the just-built image Quentin Schulz
2025-10-09 10:24 ` [PATCH v2 2/3] Makefile: allow to specify build directory Quentin Schulz
2025-10-09 10:24 ` [PATCH v2 3/3] tools/build-docs-container: build in separate directory for each distro Quentin Schulz
2025-10-14 9:27 ` Antonin Godard [this message]
2025-10-15 11:37 ` [docs] " Quentin Schulz
2025-12-22 12:47 ` Antonin Godard
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=DDHXSDDQ1EBG.5IL8Q984MU8S@bootlin.com \
--to=antonin.godard@bootlin.com \
--cc=docs@lists.yoctoproject.org \
--cc=foss@0leil.net \
--cc=quentin.schulz@cherry.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.