Show a patch.

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

{
    "id": 18609,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/18609/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18609/",
    "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": "<20230508132709.20542-1-laurent.pinchart@ideasonboard.com>",
    "date": "2023-05-08T13:27:09",
    "name": "[libcamera-devel] meson: Fix usage of overwritten pipeline variable",
    "commit_ref": "e8fccaea46b9e545282cd37d54b1acb168608a46",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "1fdbb26f86c3c00ebe3e0129e2b454cb3b8915f3",
    "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/18609/mbox/",
    "series": [
        {
            "id": 3869,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3869/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3869",
            "date": "2023-05-08T13:27:09",
            "name": "[libcamera-devel] meson: Fix usage of overwritten pipeline variable",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3869/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18609/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18609/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 34885C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  8 May 2023 13:27:00 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9774D633B4;\n\tMon,  8 May 2023 15:26:59 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 059056053A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  8 May 2023 15:26:57 +0200 (CEST)",
            "from pendragon.ideasonboard.com (softbank126090219015.bbtec.net\n\t[126.90.219.15])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0F3397CE;\n\tMon,  8 May 2023 15:26:49 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1683552419;\n\tbh=zG6LYhsHoH8GmJDOxNeHsUErW900uarRwnsC7hHmCog=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=0Jj0jrqKMmgPQkQYclDdebKqbM5glZE8on2N6lQ4QQsQOROMadvOLg2zPjOIlo41k\n\tm7JHvu29D0JLWMXYYXNDSuU4H0OAeek2sFecnXUbUBvrM9wOoD/KseX6uPvqSdOgcz\n\tNx+OpcPeOjmgXN/GDZPVUZ4dMtjf9lenIEocdDK8fcP0OseWDPVxALbC/LSRD6G8Ln\n\tvR0stlagKEGHgFH/2VnYXrF/2sgfrS4lycgKvJ0aC4PGzliWUXZkqaJ8dVqZS6Mzf8\n\tkLSNN5h+59Vk1yYo31R510IlAp9TV5aHWvxBS/3kRLKRSA4Z4fA1GpotRGGSjeFkoD\n\t6QZf/Htc5Nw7g==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1683552410;\n\tbh=zG6LYhsHoH8GmJDOxNeHsUErW900uarRwnsC7hHmCog=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=Nmiadnz9MS4B2xvK7rUI6dzJbSHybFTdozE4b7W/8LkU0XsYOFBHkQ84vkdZaaFTe\n\tbSCvh3mipRJh+9V6eeBfZ30R+1uQO9XZ9aqCw2RBgKO/vTVGXJqx87IJv3r3jozONl\n\toyahTlLSM1chOzU/P9LIJuCI+Ne41epUVP0f4V3c="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Nmiadnz9\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon,  8 May 2023 16:27:09 +0300",
        "Message-Id": "<20230508132709.20542-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.39.3",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] meson: Fix usage of overwritten pipeline\n\tvariable",
        "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": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "When iterating over enabled pipelines and IPA modules, libcamera\ndescends into subdirectories in a recursive manner, which involves\nnested loops. Both the outer and inner loops use the same loop variable\nnamed 'pipeline'. As the outer loop uses the variable after descending\ninto the inner directory, it ends up using an incorrect value. Fix it by\nmoving all use of the variable before the subdir() call, and add a\ncomment that warns about the issue to avoid reintroducing it.\n\nFixes: e8526c0c2bc6 (\"ipa: meson: Allow nested IPA directory structures\")\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/meson.build                | 5 ++++-\n src/libcamera/pipeline/meson.build | 5 ++++-\n 2 files changed, 8 insertions(+), 2 deletions(-)\n\n\nbase-commit: 1c512d406536d72a393c38c3f6a75fe0fdb9ecb2",
    "diff": "diff --git a/src/ipa/meson.build b/src/ipa/meson.build\nindex 289f861c082d..903eb52ba60f 100644\n--- a/src/ipa/meson.build\n+++ b/src/ipa/meson.build\n@@ -52,8 +52,11 @@ foreach pipeline : pipelines\n         continue\n     endif\n \n-    subdir(pipeline)\n     subdirs += pipeline\n+    subdir(pipeline)\n+\n+    # Don't reuse the pipeline variable below, the subdirectory may have\n+    # overwritten it.\n endforeach\n \n # The ipa-sign-install.sh script which uses the enabled_ipa_modules variable\ndiff --git a/src/libcamera/pipeline/meson.build b/src/libcamera/pipeline/meson.build\nindex b6160d346cf7..8a61991c0fec 100644\n--- a/src/libcamera/pipeline/meson.build\n+++ b/src/libcamera/pipeline/meson.build\n@@ -12,6 +12,9 @@ foreach pipeline : pipelines\n         continue\n     endif\n \n-    subdir(pipeline)\n     subdirs += pipeline\n+    subdir(pipeline)\n+\n+    # Don't reuse the pipeline variable below, the subdirectory may have\n+    # overwritten it.\n endforeach\n",
    "prefixes": [
        "libcamera-devel"
    ]
}