Show a patch.

GET /api/patches/26072/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 26072,
    "url": "https://patchwork.libcamera.org/api/patches/26072/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/26072/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20260202112511.640320-3-barnabas.pocze@ideasonboard.com>",
    "date": "2026-02-02T11:25:10",
    "name": "[RFC,v1,2/3] utils: checkstyle.py: Make custom dependency checks possible",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "3489eee428d324a58df5a4b5e2f00d0c03156e1e",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/26072/mbox/",
    "series": [
        {
            "id": 5765,
            "url": "https://patchwork.libcamera.org/api/series/5765/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5765",
            "date": "2026-02-02T11:25:09",
            "name": "meson: Add `meson.format` file",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5765/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/26072/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/26072/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 E2F9AC3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  2 Feb 2026 11:25:32 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DCA0261FE8;\n\tMon,  2 Feb 2026 12:25:30 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 572B461FC8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  2 Feb 2026 12:25:28 +0100 (CET)",
            "from pb-laptop.local (185.221.142.123.nat.pool.zt.hu\n\t[185.221.142.123])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9730BC59\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  2 Feb 2026 12:24:47 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"AIZuLFgL\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1770031487;\n\tbh=TsjCH/ReG1kEGibML7E8DOUtSMwuOHkZi+DImtqGfMo=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=AIZuLFgLP9Fx8hOE27evfmGa9pVtDUu+ZOrCPWL9W0txiJDUqkshkbb7k3NGcfbTp\n\tZn5ewlZqN8RicRqU795Jjhi6TXlJQMiywwEydiNUvNEFExW3dhnBr/M3rNGrONX3O8\n\tBSTDk8lHbpP9w5dqkK8JDcmQa8YgbTbARUXNO+Lg=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[RFC PATCH v1 2/3] utils: checkstyle.py: Make custom dependency\n\tchecks possible",
        "Date": "Mon,  2 Feb 2026 12:25:10 +0100",
        "Message-ID": "<20260202112511.640320-3-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260202112511.640320-1-barnabas.pocze@ideasonboard.com>",
        "References": "<20260202112511.640320-1-barnabas.pocze@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": "Previously it was only possible check the presence of a dependency,\nbut no further checks, such as version checks, could be carried out.\nMake it possible for any checkers/formatters to specify a custom\nfunction for each dependency that is invoked to carry out extra cheks.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n utils/checkstyle.py | 12 +++++++++++-\n 1 file changed, 11 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/utils/checkstyle.py b/utils/checkstyle.py\nindex fa1355c17..06b9f199a 100755\n--- a/utils/checkstyle.py\n+++ b/utils/checkstyle.py\n@@ -381,12 +381,22 @@ class CheckerBase(metaclass=ClassRegistry):\n \n         issues = []\n \n-        for command in cls.dependencies:\n+        for dep in cls.dependencies:\n+            check = None\n+            if type(dep) is str:\n+                command = dep\n+            else:\n+                (command, check) = dep\n+\n             if command not in dependencies:\n                 dependencies[command] = shutil.which(command)\n \n             if not dependencies[command]:\n                 issues.append(CommitIssue(f'Missing {command} to run {cls.__name__}'))\n+            elif check:\n+                issues_ = check()\n+                if issues_:\n+                    issues.extend(issues_)\n \n         return issues\n \n",
    "prefixes": [
        "RFC",
        "v1",
        "2/3"
    ]
}