Show a patch.

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

{
    "id": 3611,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3611/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3611/",
    "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": "<20200429151919.2341586-1-kieran.bingham@ideasonboard.com>",
    "date": "2020-04-29T15:19:19",
    "name": "[libcamera-devel] libcamera: utils: Identify the 'real' build path",
    "commit_ref": "9e41dfbbffc59fab90aeb7bae34f2ca91c23b16e",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "e8401e9a4a308e9be7b5821dc3d0bb6b73b24842",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3611/mbox/",
    "series": [
        {
            "id": 852,
            "url": "https://patchwork.libcamera.org/api/1.1/series/852/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=852",
            "date": "2020-04-29T15:19:19",
            "name": "[libcamera-devel] libcamera: utils: Identify the 'real' build path",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/852/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3611/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3611/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kieran.bingham@ideasonboard.com>",
        "Received": [
            "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 43F1F609D6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Apr 2020 17:19:25 +0200 (CEST)",
            "from Q.local (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net\n\t[86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C75BF521;\n\tWed, 29 Apr 2020 17:19:24 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"VwXeCuQP\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1588173564;\n\tbh=vAKKadpXiRlxLrwi7FH0x1NYtsIDfKCUwpyehNONQ4Y=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=VwXeCuQPahJ2m0aYKVqhh1W5WK2EIUNo1ggR5LHcWbv8zSaFmxgV5TWWwOKLCPIfp\n\tFgjpj6nBFSmysm7eBsONsBpSKHKotzIwnPybqb29zsBB9616/LY+eTyVOMCc/u8DW+\n\t4rzeuBzoSKjLS4qRVxu0w3bjGpB1WiAn0r8Fz51U=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Wed, 29 Apr 2020 16:19:19 +0100",
        "Message-Id": "<20200429151919.2341586-1-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] libcamera: utils: Identify the 'real'\n\tbuild path",
        "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>",
        "X-List-Received-Date": "Wed, 29 Apr 2020 15:19:25 -0000"
    },
    "content": "Call realpath() to strip out any levels of indirection required in\nreferencing the root build directory.\n\nThis simplifies the debug output when reporting and parsing paths.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/utils.cpp | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/utils.cpp b/src/libcamera/utils.cpp\nindex a96ca7f40cbd..fbadf350908a 100644\n--- a/src/libcamera/utils.cpp\n+++ b/src/libcamera/utils.cpp\n@@ -386,7 +386,16 @@ std::string libcameraBuildPath()\n \tif (ret == 0)\n \t\treturn std::string();\n \n-\treturn dirname(info.dli_fname) + \"/../../\";\n+\tstd::string path = dirname(info.dli_fname) + \"/../../\";\n+\n+\tchar *real = realpath(path.c_str(), nullptr);\n+\tif (!real)\n+\t\treturn std::string();\n+\n+\tpath = real;\n+\tfree(real);\n+\n+\treturn path + \"/\";\n }\n \n /**\n",
    "prefixes": [
        "libcamera-devel"
    ]
}