| Message ID | 20251222-concurrent-safety-v1-4-e3d86e44cd38@bootlin.com |
|---|---|
| State | New |
| Headers | show |
| Series | Parallel docs build improvements | expand |
Hi Antonin, On 12/22/25 1:27 PM, Antonin Godard wrote: > This is useful to open the output always at the same location. > > Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> > --- > documentation/tools/build-docs-container | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/documentation/tools/build-docs-container b/documentation/tools/build-docs-container > index b377777ed..7f3ba3680 100755 > --- a/documentation/tools/build-docs-container > +++ b/documentation/tools/build-docs-container > @@ -185,6 +185,10 @@ main () > --env BUILDDIR="_build/$orig_image-$image_sha" > ) > > + # Create a symlink pointing to the latest build output > + mkdir -p "$DOCS_DIR"/documentation/_build > + ln -snf "$orig_image-$image_sha" "$DOCS_DIR"/documentation/_build/latest > + But we haven't even built it yet? It should at the very least be *after* $OCI run. I'm actually wondering if we shouldn't have it as last command in the Makefile targets instead? Because here you only add the latest symlink if we're building via the containers, but we could also run two native builds in parallel (well, hopefully at the end of this series :)?) and we wouldn't have a "latest" symlink in that case? Maybe we should do something like ROOT_BUILDDIR = _build BUILDDIR ?= dev (Or something else, just not latest) FULL_BUILDDIR = $(ROOT_BUILDDIR)/$(BUILDDIR) Replace all BUILDDIR with FULL_BUILDDIR in Makefile. In all targets calling SPHINXBUILD, add after it: ln --force --symbolic --no-dereference $(FULL_BUILDDIR) $(ROOT_BUILDDIR)/latest (Not tested) What do you think? Cheers, Quentin
diff --git a/documentation/tools/build-docs-container b/documentation/tools/build-docs-container index b377777ed..7f3ba3680 100755 --- a/documentation/tools/build-docs-container +++ b/documentation/tools/build-docs-container @@ -185,6 +185,10 @@ main () --env BUILDDIR="_build/$orig_image-$image_sha" ) + # Create a symlink pointing to the latest build output + mkdir -p "$DOCS_DIR"/documentation/_build + ln -snf "$orig_image-$image_sha" "$DOCS_DIR"/documentation/_build/latest + if [ "$(basename "$OCI")" = "docker" ]; then args_run+=( --user="$(id -u)":"$(id -g)"
This is useful to open the output always at the same location. Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- documentation/tools/build-docs-container | 4 ++++ 1 file changed, 4 insertions(+)