[libcamera-ci,v2] Add sphinx-book-theme package to container images
diff mbox series

Message ID 20250912165458.32168-1-laurent.pinchart@ideasonboard.com
State New
Headers show
Series
  • [libcamera-ci,v2] Add sphinx-book-theme package to container images
Related show

Commit Message

Laurent Pinchart Sept. 12, 2025, 4:54 p.m. UTC
libcamera will soon switch to sphinx-book-theme for documentation. Add
the corresponding package to container images.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Changes since v1:

- Fix pip package name
- Fix handling of missing debian packages
---
 .gitlab-ci/setup-container.sh | 20 +++++++++++++++++---
 gitlab-ci.yml                 |  6 +++---
 2 files changed, 20 insertions(+), 6 deletions(-)


base-commit: d58b30ed21a5663c5c6fd19da158de01b186831e

Patch
diff mbox series

diff --git a/.gitlab-ci/setup-container.sh b/.gitlab-ci/setup-container.sh
index 7029919c509c..9d8319c9779b 100755
--- a/.gitlab-ci/setup-container.sh
+++ b/.gitlab-ci/setup-container.sh
@@ -111,6 +111,7 @@  PKGS_VIRTME_RUNTIME=(
 PKGS_PIP_MIN_VERSIONS=(
 	'meson meson 1.2.0 remove'
 	'python3-pygments pygments 2.10.0 keep'
+	'python3-sphinx-book-theme sphinx-book-theme 0.1.7 remove'
 	'python3-sphinxcontrib.doxylink sphinxcontrib-doxylink 1.6.1 remove'
 )
 
@@ -125,6 +126,8 @@  case $FDO_DISTRIBUTION_VERSION in
 	PKGS_LIBCAMERA_RUNTIME+=( g++-9 )
 	;;
 'bookworm')
+	# Sphinx theme for the documentation.
+	PKGS_LIBCAMERA_RUNTIME+=( python3-sphinx-book-theme )
 	# libclang-rt-dev for the clang ASan runtime.
 	PKGS_LIBCAMERA_RUNTIME_MULTIARCH+=( libclang-rt-dev )
 	# For cam and lc-compliance
@@ -134,6 +137,8 @@  case $FDO_DISTRIBUTION_VERSION in
 'trixie')
 	# gcc 13 to expand compilation testing coverage.
 	PKGS_LIBCAMERA_RUNTIME+=( g++-13 )
+	# Sphinx theme for the documentation.
+	PKGS_LIBCAMERA_RUNTIME+=( python3-sphinx-book-theme )
 	# libclang-rt-dev for the clang ASan runtime.
 	PKGS_LIBCAMERA_RUNTIME_MULTIARCH+=( libclang-rt-dev )
 	;;
@@ -196,7 +201,7 @@  cbuild_install_pkgs() {
 dpkg_version() {
 	local pkg=$1
 
-	local version=$(dpkg -s $pkg | grep '^Version: ')
+	local version=$(dpkg -s $pkg 2>/dev/null | grep '^Version: ')
 	version=${version#* }
 	version=${version%%+*}
 	version=${version%%-*}
@@ -230,8 +235,17 @@  cbuild_fixups() {
 
 		local version=$(dpkg_version $pkg_name)
 
-		if dpkg_check_version $version $min_version ; then
-			echo "$pkg_name $version too old, installing $min_version from pip"
+		if dpkg_check_version "$version" "$min_version" ; then
+			local reason
+
+			if [[ -n "$version" ]] ; then
+				reason="$version too old"
+			else
+				reason="missing"
+				action=
+			fi
+
+			echo "$pkg_name $reason, installing $min_version from pip"
 
 			if [[ $action == 'remove' ]] ; then
 				apt remove -y ${pkg_name}
diff --git a/gitlab-ci.yml b/gitlab-ci.yml
index 57607dbfe7e4..e5bcc6883c95 100644
--- a/gitlab-ci.yml
+++ b/gitlab-ci.yml
@@ -59,17 +59,17 @@  include:
 .libcamera-ci.debian:11:
   variables:
     FDO_DISTRIBUTION_VERSION: 'bullseye'
-    FDO_DISTRIBUTION_TAG: '2025-07-27.1'
+    FDO_DISTRIBUTION_TAG: '2025-09-12.2'
 
 .libcamera-ci.debian:12:
   variables:
     FDO_DISTRIBUTION_VERSION: 'bookworm'
-    FDO_DISTRIBUTION_TAG: '2025-07-27.1'
+    FDO_DISTRIBUTION_TAG: '2025-09-12.2'
 
 .libcamera-ci.debian:13:
   variables:
     FDO_DISTRIBUTION_VERSION: 'trixie'
-    FDO_DISTRIBUTION_TAG: '2025-07-27.1'
+    FDO_DISTRIBUTION_TAG: '2025-09-12.2'
 
 .container-debian:
   extends: