Show a patch.

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

{
    "id": 23326,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/23326/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23326/",
    "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": "<20250501095818.3996419-3-barnabas.pocze@ideasonboard.com>",
    "date": "2025-05-01T09:58:17",
    "name": "[v2,2/3] utils: codegen: Make users depend on `controls.py` in meson",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "4e75d0fc4727419ef6e4a5a7f3f76c7c9949b6ac",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/1.1/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23326/mbox/",
    "series": [
        {
            "id": 5157,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5157/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5157",
            "date": "2025-05-01T09:58:15",
            "name": "libcamera: controls: String controls as `std::string_view`",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/5157/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23326/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23326/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 2455BBE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  1 May 2025 09:58:28 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 360AB68B25;\n\tThu,  1 May 2025 11:58:26 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CF92C68ADC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  1 May 2025 11:58:22 +0200 (CEST)",
            "from pb-laptop.local (185.221.143.50.nat.pool.zt.hu\n\t[185.221.143.50])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D01B2741\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  1 May 2025 11:58:15 +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=\"RRN3TXR6\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1746093495;\n\tbh=ZPIGsVmc754ok3ggX8m8980N3ahxgYkMnJOfzVD2O3A=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=RRN3TXR6w1prkVTeY7ztZor+yhifrDFnrlJGzjwew0K8CXmFMbx7RqW6Yhij5RgM8\n\tuXzZLUuFe0rlwPcyQtdPocxjlqvXrtyETFJUrO35MLq2r2puWwqOfXVLqztC6gdn7X\n\tJ0ZrDjke3TiWMrRHfQuoYuuOv3GkYQnztpIG8NaQ=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH v2 2/3] utils: codegen: Make users depend on `controls.py` in\n\tmeson",
        "Date": "Thu,  1 May 2025 11:58:17 +0200",
        "Message-ID": "<20250501095818.3996419-3-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.49.0",
        "In-Reply-To": "<20250501095818.3996419-1-barnabas.pocze@ideasonboard.com>",
        "References": "<20250501095818.3996419-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": "Currently, modifying `controls.py` does not make those build targets dirty\nthat use a script that includes it (e.g. `gen-controls.py`) because meson\nhas no knowledge of this dependency. Add `depend_files` to each\n`custom_target()` invocation to fix this.\n\nIdeally it would be possible to attach this dependency to `gen_controls`,\n`gen_gst_controls`, etc. objects themselves, so that repetition is\navoided, but this does not seem possible at the moment.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n include/libcamera/meson.build | 1 +\n src/gstreamer/meson.build     | 1 +\n src/libcamera/meson.build     | 1 +\n src/py/libcamera/meson.build  | 2 ++\n utils/codegen/meson.build     | 2 ++\n 5 files changed, 7 insertions(+)",
    "diff": "diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\nindex 9297f3fa3..30ea76f94 100644\n--- a/include/libcamera/meson.build\n+++ b/include/libcamera/meson.build\n@@ -90,6 +90,7 @@ foreach mode, entry : controls_map\n                                      command : [gen_controls, '-o', '@OUTPUT@',\n                                                 '--mode', mode, '-t', template_file,\n                                                 '-r', ranges_file, '@INPUT@'],\n+                                     depend_files : [py_mod_controls],\n                                      env : py_build_env,\n                                      install : true,\n                                      install_dir : libcamera_headers_install_dir)\ndiff --git a/src/gstreamer/meson.build b/src/gstreamer/meson.build\nindex 6b7e53b55..fd83e073d 100644\n--- a/src/gstreamer/meson.build\n+++ b/src/gstreamer/meson.build\n@@ -33,6 +33,7 @@ libcamera_gst_sources += custom_target('gstlibcamera-controls.cpp',\n                                        output : 'gstlibcamera-controls.cpp',\n                                        command : [gen_gst_controls, '-o', '@OUTPUT@',\n                                                   '-t', gen_gst_controls_template, '@INPUT@'],\n+                                       depend_files : [py_mod_controls],\n                                        env : py_build_env)\n \n libcamera_gst_cpp_args = [\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 800d40807..202db1efe 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -156,6 +156,7 @@ foreach mode, inout_files : controls_mode_files\n                                      command : [gen_controls, '-o', '@OUTPUT@',\n                                                 '--mode', mode, '-t', template_file,\n                                                 '-r', ranges_file, '@INPUT@'],\n+                                     depend_files : [py_mod_controls],\n                                      env : py_build_env)\n endforeach\n \ndiff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build\nindex 596a203ca..456ee7932 100644\n--- a/src/py/libcamera/meson.build\n+++ b/src/py/libcamera/meson.build\n@@ -36,6 +36,7 @@ pycamera_sources += custom_target('py_gen_controls',\n                                   output : ['py_controls_generated.cpp'],\n                                   command : [gen_py_controls, '--mode', 'controls', '-o', '@OUTPUT@',\n                                              '-t', gen_py_controls_template, '@INPUT@'],\n+                                  depend_files : [py_mod_controls],\n                                   env : py_build_env)\n \n pycamera_sources += custom_target('py_gen_properties',\n@@ -43,6 +44,7 @@ pycamera_sources += custom_target('py_gen_properties',\n                                   output : ['py_properties_generated.cpp'],\n                                   command : [gen_py_controls, '--mode', 'properties', '-o', '@OUTPUT@',\n                                              '-t', gen_py_controls_template, '@INPUT@'],\n+                                  depend_files : [py_mod_controls],\n                                   env : py_build_env)\n \n # Generate formats\ndiff --git a/utils/codegen/meson.build b/utils/codegen/meson.build\nindex 904dd66d1..8d1c69086 100644\n--- a/utils/codegen/meson.build\n+++ b/utils/codegen/meson.build\n@@ -16,4 +16,6 @@ gen_header = files('gen-header.sh')\n gen_ipa_pub_key = files('gen-ipa-pub-key.py')\n gen_tracepoints = files('gen-tp-header.py')\n \n+py_mod_controls = files('controls.py')\n+\n subdir('ipc')\n",
    "prefixes": [
        "v2",
        "2/3"
    ]
}