Show a patch.

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

{
    "id": 19217,
    "url": "https://patchwork.libcamera.org/api/patches/19217/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19217/",
    "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": "<20231121145350.5956-3-naush@raspberrypi.com>",
    "date": "2023-11-21T14:53:46",
    "name": "[libcamera-devel,v2,2/6] controls: Update argument handling for controls generation scripts",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "ac38445316a7ded7f2c73b4df962dc6da514672f",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/19217/mbox/",
    "series": [
        {
            "id": 4077,
            "url": "https://patchwork.libcamera.org/api/series/4077/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4077",
            "date": "2023-11-21T14:53:44",
            "name": "Vendor controls and properties",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4077/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19217/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19217/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 2C12DC328F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Nov 2023 14:54:00 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DDD99629B6;\n\tTue, 21 Nov 2023 15:53:59 +0100 (CET)",
            "from mail-lj1-x229.google.com (mail-lj1-x229.google.com\n\t[IPv6:2a00:1450:4864:20::229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0988261DB0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Nov 2023 15:53:58 +0100 (CET)",
            "by mail-lj1-x229.google.com with SMTP id\n\t38308e7fff4ca-2c876f1e44dso37086441fa.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Nov 2023 06:53:58 -0800 (PST)",
            "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\th18-20020a05600c351200b004063ea92492sm17570968wmq.22.2023.11.21.06.53.55\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 21 Nov 2023 06:53:55 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1700578439;\n\tbh=N5lmsMB0/dZMHFpG1hIvgGUnLo18Jz3E9dr9ei9LXMw=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=MUt2C6I8cPQwurIg8CmyI782Eta0pzfjkXpS78vqGoBJQmGs7SMrcKMnbsYgxmmIB\n\ti5ZAPmFXuH1Y2U4L2xzAGyGI9ZaHbUrw2IB+tlzfpg+bTRwuZfKBXSl4g5kj6I4k7O\n\tu8iA6aP2QtyGL4undublD5N12o1VdRzrZDxFqPgZwXdFWJUYJggyZ2GmBruOJ/bQ+I\n\tamnru3OF+mG0tebTM0nMB1fquZK31quaJIyeOHCioVc0TAjKgrYwtmkjzTXdqOKPUD\n\tWiDZR24F9E1X128YXp6Zj1opRY9FXfLOHFkTbyKpbUBQrNxVoq3nMjYu+zdajqPEG4\n\t9jpkJC26G87vQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1700578437; x=1701183237;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=S7qLn4hXZgTbdZqaZ5za1br9W0F1gEiccigSkouVflU=;\n\tb=bappw0w21IWyohjAk4M8cqZPFObIhMrXfGz19wK50tS9X7JPsAr9vya7eqpRdUEVEP\n\tm/NRBrwwqrgeLFJkbxcWeq2FoxOv0+IDMR9XkRUWsuWLbvzQV7wJuQNG89775g/PQdwr\n\tL10uPgpvNQhaE29eoLrOiKjv54bPI7Bd4lY2lDQqnrWdBRtJPhstN/4f3B1Fau8wkv4n\n\t02Tue94Oh6/Ibdh/nipp4rq42Eg4YA2usm80hDJU062xfkZDGoicrwDeMLEyMh2wc1a3\n\twJs6gG+OWCYQXy0dtSsVXfL5F74Sa7BmgQ182BJ+FvoslId84LoI2mf5hQgCl2TgUWrU\n\t/uhw=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"bappw0w2\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1700578437; x=1701183237;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=S7qLn4hXZgTbdZqaZ5za1br9W0F1gEiccigSkouVflU=;\n\tb=j1CLp7LciNU0M8KL5Uak78ZGQe7w0TcueYdhoVBqV7emgqOtnNOU3UzrhuzfeEUHge\n\tZyCcAf4JYAtLSru6MDrZ6sXbImtKpOfWnqB33dq8sMH4zgUte+LkgwxmDmwHZJ4xG6Ep\n\tgkZ5UuNWMdyl6lWZMY5H00uCEHpWYvq1GQfH+7xsC2D8ogbpiRDswCkkZ9ZxrLU4OAVn\n\t2aYTZyxTmPSSDaDPBL1K1YtSshWl95x6yNMhJJaXXpW5fXxc/eh/4pqd21NlvCO79XJM\n\t5JlqPjxeFdYytpSEQuR9U+QzqTmlzxojNARzIKpLStQbUHTsdF3Efqq7xEKPOY/0abFS\n\ttmbQ==",
        "X-Gm-Message-State": "AOJu0YxxsUu5cfkjOEVWKLYBJ5Jn65nVpIQ+S5Ai5T94dQ1/HkjG0P2B\n\t9W4Z4wxc3raDDZBggYaIOGuTMnFmEkFUSp2gW4n1qg==",
        "X-Google-Smtp-Source": "AGHT+IHsL0WCpBIRiqccYe7nLJAcVBYHcJHyCklmls41hzd+UbI6JM93PSG7yR2t+pQJgzLtNlSaqQ==",
        "X-Received": "by 2002:a2e:b816:0:b0:2c5:2eaa:5399 with SMTP id\n\tu22-20020a2eb816000000b002c52eaa5399mr8065086ljo.6.1700578436730; \n\tTue, 21 Nov 2023 06:53:56 -0800 (PST)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 21 Nov 2023 14:53:46 +0000",
        "Message-Id": "<20231121145350.5956-3-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20231121145350.5956-1-naush@raspberrypi.com>",
        "References": "<20231121145350.5956-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 2/6] controls: Update argument handling\n\tfor controls generation scripts",
        "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>",
        "From": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Naushir Patuck <naush@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The template file to the gen-controls.py and gen-py-controls.py is now\npassed in through the '-t' command line argument instead of being a\npositional argument.  This will allow multiple input files to be\nprovided to the scripts in a future commit.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n include/libcamera/meson.build       |  7 ++++---\n src/libcamera/meson.build           |  7 ++++---\n src/py/libcamera/gen-py-controls.py |  2 +-\n src/py/libcamera/meson.build        | 18 ++++++++----------\n utils/gen-controls.py               |  2 +-\n 5 files changed, 18 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\nindex 2c8c0258c95e..5fb772e6dd14 100644\n--- a/include/libcamera/meson.build\n+++ b/include/libcamera/meson.build\n@@ -41,12 +41,13 @@ control_source_files = {\n control_headers = []\n \n foreach header, mode : control_source_files\n-    input_files = files('../../src/libcamera/' + header +'.yaml', header + '.h.in')\n+    input_files = files('../../src/libcamera/' + header +'.yaml')\n+    template_file = files(header + '.h.in')\n     control_headers += custom_target(header + '_h',\n                                      input : input_files,\n                                      output : header + '.h',\n-                                     command : [gen_controls, '-o', '@OUTPUT@', '@INPUT@',\n-                                                '--mode', mode],\n+                                     command : [gen_controls, '-o', '@OUTPUT@',\n+                                                '--mode', mode, '-t', template_file, '@INPUT@'],\n                                      install : true,\n                                      install_dir : libcamera_headers_install_dir)\n endforeach\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex e49bf850b355..05ee38daf22b 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -128,12 +128,13 @@ endif\n control_sources = []\n \n foreach source, mode : control_source_files\n-    input_files = files(source +'.yaml', source + '.cpp.in')\n+    input_files = files(source +'.yaml')\n+    template_file = files(source + '.cpp.in')\n     control_sources += custom_target(source + '_cpp',\n                                      input : input_files,\n                                      output : source + '.cpp',\n-                                     command : [gen_controls, '-o', '@OUTPUT@', '@INPUT@',\n-                                                '--mode', mode])\n+                                     command : [gen_controls, '-o', '@OUTPUT@',\n+                                                '--mode', mode, '-t', template_file, '@INPUT@'])\n endforeach\n \n libcamera_sources += control_sources\ndiff --git a/src/py/libcamera/gen-py-controls.py b/src/py/libcamera/gen-py-controls.py\nindex 8f14cdafe313..ea28f0139f23 100755\n--- a/src/py/libcamera/gen-py-controls.py\n+++ b/src/py/libcamera/gen-py-controls.py\n@@ -93,7 +93,7 @@ def main(argv):\n                         help='Output file name. Defaults to standard output if not specified.')\n     parser.add_argument('input', type=str,\n                         help='Input file name.')\n-    parser.add_argument('template', type=str,\n+    parser.add_argument('-t', dest='template', type=str, required=True,\n                         help='Template file name.')\n     parser.add_argument('--mode', type=str, required=True,\n                         help='Mode is either \"controls\" or \"properties\"')\ndiff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build\nindex f58c7198ee9e..1c3ea1843ac0 100644\n--- a/src/py/libcamera/meson.build\n+++ b/src/py/libcamera/meson.build\n@@ -28,29 +28,27 @@ pycamera_sources = files([\n \n # Generate controls\n \n-gen_py_controls_input_files = files([\n-    '../../libcamera/control_ids.yaml',\n-    'py_controls_generated.cpp.in',\n-])\n+gen_py_controls_input_files = files('../../libcamera/control_ids.yaml')\n+gen_py_controls_template = files('py_controls_generated.cpp.in')\n \n gen_py_controls = files('gen-py-controls.py')\n \n pycamera_sources += custom_target('py_gen_controls',\n                                   input : gen_py_controls_input_files,\n                                   output : ['py_controls_generated.cpp'],\n-                                  command : [gen_py_controls, '--mode', 'controls', '-o', '@OUTPUT@', '@INPUT@'])\n+                                  command : [gen_py_controls, '--mode', 'controls', '-o', '@OUTPUT@',\n+                                             '-t', gen_py_controls_template, '@INPUT@'])\n \n # Generate properties\n \n-gen_py_property_enums_input_files = files([\n-    '../../libcamera/property_ids.yaml',\n-    'py_properties_generated.cpp.in',\n-])\n+gen_py_property_enums_input_files = files('../../libcamera/property_ids.yaml')\n+gen_py_properties_template = files('py_properties_generated.cpp.in')\n \n pycamera_sources += custom_target('py_gen_properties',\n                                   input : gen_py_property_enums_input_files,\n                                   output : ['py_properties_generated.cpp'],\n-                                  command : [gen_py_controls, '--mode', 'properties', '-o', '@OUTPUT@', '@INPUT@'])\n+                                  command : [gen_py_controls, '--mode', 'properties', '-o', '@OUTPUT@',\n+                                             '-t', gen_py_properties_template, '@INPUT@'])\n \n # Generate formats\n \ndiff --git a/utils/gen-controls.py b/utils/gen-controls.py\nindex 8f2f8fdb02c3..8af33d29cd07 100755\n--- a/utils/gen-controls.py\n+++ b/utils/gen-controls.py\n@@ -361,7 +361,7 @@ def main(argv):\n                         help='Output file name. Defaults to standard output if not specified.')\n     parser.add_argument('input', type=str,\n                         help='Input file name.')\n-    parser.add_argument('template', type=str,\n+    parser.add_argument('-t', dest='template', type=str, required=True,\n                         help='Template file name.')\n     parser.add_argument('--mode', type=str, required=True, choices=['controls', 'properties'],\n                         help='Mode of operation')\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "2/6"
    ]
}