Patch Detail
Show a patch.
GET /api/1.1/patches/24008/?format=api
{ "id": 24008, "url": "https://patchwork.libcamera.org/api/1.1/patches/24008/?format=api", "web_url": "https://patchwork.libcamera.org/patch/24008/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20250728153201.7843-3-laurent.pinchart@ideasonboard.com>", "date": "2025-07-28T15:32:00", "name": "[libcamera-ci,v2,2/3] setup-container: Generalize package installation through pip", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "a2a71b0797576e12d5f08393db3d85d7e4c6a670", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/24008/mbox/", "series": [ { "id": 5344, "url": "https://patchwork.libcamera.org/api/1.1/series/5344/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5344", "date": "2025-07-28T15:31:58", "name": "Prepare CI for Sphinx doxylink usage", "version": 2, "mbox": "https://patchwork.libcamera.org/series/5344/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/24008/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/24008/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3EFF9C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Jul 2025 15:32:18 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4A619691C6;\n\tMon, 28 Jul 2025 17:32:17 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 11CA7691B9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jul 2025 17:32:12 +0200 (CEST)", "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id D73CC465\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jul 2025 17:31:29 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"deEWN5cw\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753716690;\n\tbh=w0uuYjIldZzneg9RMX85eMNsxXRUHqWbR3uoeupia6o=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=deEWN5cw9TXarQfjcxOQ96p1yFyeS60eyzdSxlVjujh0oy7Jz9nWssz8XWWJL8StC\n\tXsryKqcr8JDlYytDQlg74IjJguFwQSsEzcz4H334TfjCG7OS+up20ZeSRa0w8PJxbq\n\tkqjQ+Ts4ndVE+O1f7d1Qy3XNK9Uf/crim11ks9pY=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Subject": "[libcamera-ci] [PATCH v2 2/3] setup-container: Generalize package\n\tinstallation through pip", "Date": "Mon, 28 Jul 2025 18:32:00 +0300", "Message-ID": "<20250728153201.7843-3-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.49.1", "In-Reply-To": "<20250728153201.7843-1-laurent.pinchart@ideasonboard.com>", "References": "<20250728153201.7843-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "When building containers, we favour packages from the Debian\nrepositories, and fall back to pip when minimum version requirements are\nnot met by Debian. This is open-coded for two packages (meson and\npython3-pygments). Generalize the mechanism in preparation for adding\nmore packages.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\nChanges since v1:\n\n- Document the PKGS_PIP_MIN_VERSIONS array\n---\n .gitlab-ci/setup-container.sh | 56 +++++++++++++++++++++++------------\n 1 file changed, 37 insertions(+), 19 deletions(-)", "diff": "diff --git a/.gitlab-ci/setup-container.sh b/.gitlab-ci/setup-container.sh\nindex 5e9b89da8431..7fdac1f9fb66 100755\n--- a/.gitlab-ci/setup-container.sh\n+++ b/.gitlab-ci/setup-container.sh\n@@ -93,6 +93,24 @@ PKGS_VIRTME_RUNTIME=(\n \tudev\n )\n \n+# Each entry in the PKGS_PIP_MIN_VERSIONS array describes one package and\n+# contains 4 space-separated fields:\n+#\n+# - The Debian package name\n+# - The PyPI package name\n+# - The minimum version\n+# - Whether to keep or remove the Debian package if a newer version is\n+# installed from PyPI\n+#\n+# Keeping Debian packages is sometimes needed due to dependencies. For\n+# instance, uninstalling python3-pygments would also uninstall python3-sphinx\n+# that depends on it.\n+\n+PKGS_PIP_MIN_VERSIONS=(\n+\t'meson meson 1.2.0 remove'\n+\t'python3-pygments pygments 2.10.0 keep'\n+)\n+\n archs=( amd64 )\n \n declare -A components\n@@ -192,34 +210,34 @@ dpkg_check_version() {\n cbuild_fixups() {\n \techo \"Applying miscellaneous fixups\"\n \n-\tlocal min_version\n \tlocal pip3_options\n-\tlocal version\n+\tlocal pkg\n \n \tif [[ $FDO_DISTRIBUTION_VERSION != 'bullseye' ]] ; then\n \t\tpip3_options=--break-system-packages\n \tfi\n \n-\t# Install meson from pip.\n-\tmin_version=1.2.0\n-\tversion=$(dpkg_version meson)\n-\tif dpkg_check_version $version $min_version ; then\n-\t\techo \"meson $version too old, installing $min_version from pip\"\n+\t# Install packages from pip to ensure minimum versions.\n+\tfor pkg in \"${PKGS_PIP_MIN_VERSIONS[@]}\" ; do\n+\t\tpkg=($pkg)\n+\t\tlocal pkg_name=${pkg[0]}\n+\t\tlocal pip_name=${pkg[1]}\n+\t\tlocal min_version=${pkg[2]}\n+\t\tlocal action=${pkg[3]}\n \n-\t\tapt remove -y meson\n-\t\tapt install -y python3-pip\n-\t\tpip3 install ${pip3_options} meson==${min_version}\n-\tfi\n+\t\tlocal version=$(dpkg_version $pkg_name)\n \n-\t# Install pygments from pip.\n-\tmin_version=2.10.0\n-\tversion=$(dpkg_version python3-pygments)\n-\tif dpkg_check_version $version $min_version ; then\n-\t\techo \"pygments $version too old, installing $min_version from pip\"\n+\t\tif dpkg_check_version $version $min_version ; then\n+\t\t\techo \"$pkg_name $version too old, installing $min_version from pip\"\n \n-\t\tapt install -y python3-pip\n-\t\tpip3 install ${pip3_options} pygments==${min_version}\n-\tfi\n+\t\t\tif [[ $action == 'remove' ]] ; then\n+\t\t\t\tapt remove -y ${pkg_name}\n+\t\t\tfi\n+\n+\t\t\tapt install -y python3-pip\n+\t\t\tpip3 install ${pip3_options} ${pip_name}==${min_version}\n+\t\tfi\n+\tdone\n \n \t# Create pybind11.pc manually if not provided by the distribution\n \t# package.\n", "prefixes": [ "libcamera-ci", "v2", "2/3" ] }