new file mode 100644
@@ -0,0 +1,39 @@
+From 9ae0da4650aea70ed85982a5d5121238175e6f21 Mon Sep 17 00:00:00 2001
+From: Antonin Godard <antonin.godard@bootlin.com>
+Date: Thu, 5 Feb 2026 15:50:45 +0100
+Subject: [PATCH] doc/conf.py: adapt for custom switchers.js
+
+Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
+---
+ doc/conf.py | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index fc2ee081119..4d066101a79 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -16,8 +16,12 @@
+
+ import sys
+ import datetime
++import os
+
+-current_version = "dev"
++sys.path.insert(0, os.path.abspath('.'))
++import setversions
++
++current_version = setversions.get_current_version()
+
+ # String used in sidebar
+ version = 'Version: ' + current_version
+@@ -26,6 +30,10 @@ if current_version == 'dev':
+ # Version seen in documentation_options.js and hence in js switchers code
+ release = current_version
+
++setversions.write_switchers_js("sphinx-static/switchers.js.in",
++ "sphinx-static/switchers.js",
++ current_version)
++
+ # -- Project information -----------------------------------------------------
+
+ project = 'Bitbake'
new file mode 100644
@@ -0,0 +1,40 @@
+From dfe8e1431208a593b0c6f525831d52960a384174 Mon Sep 17 00:00:00 2001
+From: Antonin Godard <antonin.godard@bootlin.com>
+Date: Thu, 5 Feb 2026 15:50:45 +0100
+Subject: [PATCH] doc/conf.py: adapt for custom switchers.js
+
+Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
+---
+ doc/conf.py | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index 354dff36f71..4d88286a4b8 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -15,8 +15,13 @@
+ # sys.path.insert(0, os.path.abspath('.'))
+
+ import datetime
++import os
++import sys
+
+-current_version = "dev"
++sys.path.insert(0, os.path.abspath('.'))
++import setversions
++
++current_version = setversions.get_current_version()
+
+ # String used in sidebar
+ version = 'Version: ' + current_version
+@@ -25,6 +30,10 @@ if current_version == 'dev':
+ # Version seen in documentation_options.js and hence in js switchers code
+ release = current_version
+
++setversions.write_switchers_js("sphinx-static/switchers.js.in",
++ "sphinx-static/switchers.js",
++ current_version)
++
+ # -- Project information -----------------------------------------------------
+
+ project = 'Bitbake'
new file mode 120000
@@ -0,0 +1 @@
+1.46
\ No newline at end of file
new file mode 120000
@@ -0,0 +1 @@
+1.46
\ No newline at end of file
new file mode 120000
@@ -0,0 +1 @@
+1.46
\ No newline at end of file
new file mode 120000
@@ -0,0 +1 @@
+1.46
\ No newline at end of file
new file mode 120000
@@ -0,0 +1 @@
+1.46
\ No newline at end of file
new file mode 100644
@@ -0,0 +1,41 @@
+From ef23395086f4e3d6720d1b137ba4a7dd12f95540 Mon Sep 17 00:00:00 2001
+From: Antonin Godard <antonin.godard@bootlin.com>
+Date: Thu, 5 Feb 2026 15:50:45 +0100
+Subject: [PATCH] doc/conf.py: adapt for custom switchers.js
+
+Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
+---
+ doc/conf.py | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index bce386624e..e74905b6fc 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -16,10 +16,14 @@
+
+ import sys
+ import datetime
++import os
+
+ from pathlib import Path
+
+-current_version = "dev"
++sys.path.insert(0, os.path.abspath('.'))
++import setversions
++
++current_version = setversions.get_current_version()
+
+ # String used in sidebar
+ version = 'Version: ' + current_version
+@@ -28,6 +32,10 @@ if current_version == 'dev':
+ # Version seen in documentation_options.js and hence in js switchers code
+ release = current_version
+
++setversions.write_switchers_js("sphinx-static/switchers.js.in",
++ "sphinx-static/switchers.js",
++ current_version)
++
+ # -- Project information -----------------------------------------------------
+
+ project = 'Bitbake'
new file mode 120000
@@ -0,0 +1 @@
+1.46
\ No newline at end of file
new file mode 120000
@@ -0,0 +1 @@
+1.46
\ No newline at end of file
new file mode 120000
@@ -0,0 +1 @@
+1.46
\ No newline at end of file
new file mode 120000
@@ -0,0 +1 @@
+1.46
\ No newline at end of file
@@ -118,7 +118,13 @@ for branch in 1.46 $(git branch --remote --contains "$first_sphinx_commit" --for
git checkout $branch
git reset --hard
git clean -ffdx
- git checkout origin/master releases.rst
+
+ if [ -e "${scriptdir}/docs-build-patches/bitbake/${branch}" ]; then
+ echo Adding patch for $branch
+ git am -3 "${scriptdir}/docs-build-patches/bitbake/${branch}/"000*
+ fi
+
+ git checkout origin/master releases.rst sphinx-static/switchers.js.in setversions.py
(
. $builddir/buildtools/environment-setup*
@@ -243,10 +249,6 @@ for branch in "$ypdocsbranch" dunfell $(git branch --remote --contains "$first_s
git clean -ffdx
done
-# Update bitbake switchers.js with the copy from master ypdocs
-cd $outputdir/bitbake
-find . -name switchers.js -exec cp $outputdir/current/_static/switchers.js {} \;
-
if [ "$PUBLISH" -ne 0 ]; then
cd $outputdir
rsync -irlp --checksum --ignore-times --delete . docs@docs.yoctoproject.org:docs/
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- IMPORTANT: this depends on https://lore.kernel.org/r/20260205-fix-switchers-js-v3-1-61b4401adfdf@bootlin.com being merged on master. --- Changes in v2: - Re-adapt after bitbake patch was resent. - Link to v1: https://patch.msgid.link/20260204-bitbake-custom-switchers-v1-1-5b2ec5229fad@bootlin.com --- ...doc-conf.py-adapt-for-custom-switchers.js.patch | 39 ++++++++++++++++++++ ...doc-conf.py-adapt-for-custom-switchers.js.patch | 40 +++++++++++++++++++++ scripts/docs-build-patches/bitbake/1.50 | 1 + scripts/docs-build-patches/bitbake/1.52 | 1 + scripts/docs-build-patches/bitbake/2.0 | 1 + scripts/docs-build-patches/bitbake/2.10 | 1 + scripts/docs-build-patches/bitbake/2.12 | 1 + ...doc-conf.py-adapt-for-custom-switchers.js.patch | 41 ++++++++++++++++++++++ scripts/docs-build-patches/bitbake/2.2 | 1 + scripts/docs-build-patches/bitbake/2.4 | 1 + scripts/docs-build-patches/bitbake/2.6 | 1 + scripts/docs-build-patches/bitbake/2.8 | 1 + scripts/run-docs-build | 12 ++++--- 13 files changed, 136 insertions(+), 5 deletions(-) --- base-commit: ec17abb0b2d759b800cefec4fcac61cee74dbefc change-id: 20260204-bitbake-custom-switchers-b3812e99e625