Show a patch.

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

{
    "id": 3167,
    "url": "https://patchwork.libcamera.org/api/patches/3167/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3167/",
    "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": "<20200318115846.7975-6-kgupta@es.iitr.ac.in>",
    "date": "2020-03-18T11:58:45",
    "name": "[libcamera-devel,v3,5/6] libcamera: ipa_manager: replace by utils functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "19406734ddde5618324aa717db103d3ee58d9297",
    "submitter": {
        "id": 39,
        "url": "https://patchwork.libcamera.org/api/people/39/?format=api",
        "name": "Kaaira Gupta",
        "email": "kgupta@es.iitr.ac.in"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3167/mbox/",
    "series": [
        {
            "id": 731,
            "url": "https://patchwork.libcamera.org/api/series/731/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=731",
            "date": "2020-03-18T11:58:40",
            "name": "libcamera: determine IPA_PROXY_PATH at runtime",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/731/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3167/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3167/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kgupta@es.iitr.ac.in>",
        "Received": [
            "from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com\n\t[IPv6:2607:f8b0:4864:20::62f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9F70F60418\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Mar 2020 12:59:34 +0100 (CET)",
            "by mail-pl1-x62f.google.com with SMTP id h11so11089025plk.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Mar 2020 04:59:34 -0700 (PDT)",
            "from kaaira-HP-Pavilion-Notebook ([103.113.213.153])\n\tby smtp.gmail.com with ESMTPSA id\n\ty131sm6613014pfg.25.2020.03.18.04.59.32\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 18 Mar 2020 04:59:32 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=9ua74D+pawbGOHEp2jkPTCrGO8MCR0QT8xKXKQ8HvG0=;\n\tb=SUp8S9ZOG/9Yq5OGbQIKPS2i3I38RV4wnQeqtwUyoNGhuvxiyaCFyJT6k2YofeI20T\n\tpiWUVI32G49w20k8ukdzCqQAUSoJ1lgra6ceLxs2yjuLbA+aq+ql8mJFtCt+iBP1eP7s\n\to2ECOfCcnCEzCbZju9WcqdkwWCC3mSwxs+bHTXSQbHYI51dklhIwOpn7M57xS4ghCecr\n\tQyoLggcRP1MDEdFtAsMAyp4Tpf96hB6Z6bqK8emLkQpVEssIzugIFV2k5CwYI0jLvN7c\n\t53wp/uuqK2/u5oWTHD0PdAiDlBtl4NeThZ2OLH+QJDPIMaaqUgSauGV8xwmwQWsJSSyt\n\tjUhg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=9ua74D+pawbGOHEp2jkPTCrGO8MCR0QT8xKXKQ8HvG0=;\n\tb=kgIliijTd2KVuTPpMaKLeFAlhsn217+MpBFZ9/MTVDBT1LfrKnCFdt7lwdk2243Q1q\n\txD+UEO46N89HXYUxTKIBm/hx8zwA6Eu1WmaOm9LbZjYLrp7Gs4YldaAOiAFY9wD8oInQ\n\tRHois0fuLzEpEv8NuO31q4+xHTkWnKz2C/6+Ihsdbup8jc05NxhacGMSsXCQWRc8efba\n\tLuW5UqLXowQhpue+21ot9b6NfnFZMsGGU6IwoSGhEzKfo4VPGr43TOmWiqabSXrLjjPZ\n\tg2q2SZL9CrPPTt/tij6yRc3zdb9Orqjzto9GHqnkCLFceu85QQT9YuUWJUH8FekYrdz6\n\tp89g==",
        "X-Gm-Message-State": "ANhLgQ0sKSa3nI3xghhcPK3AZzWCivrU8mRl7QUSd5wFkH/1nRNS8tK9\n\txODkzs2j13auJ8Q1/5wa68VmVA==",
        "X-Google-Smtp-Source": "ADFU+vsZqqhy6NBdWaVB/hHnvbRBVURdD7miE7eUgwek5N6FmXWnPP4jrEV3hYopqyK3AJX7VhYJYQ==",
        "X-Received": "by 2002:a17:90a:3328:: with SMTP id\n\tm37mr4296506pjb.158.1584532773127; \n\tWed, 18 Mar 2020 04:59:33 -0700 (PDT)",
        "From": "Kaaira Gupta <kgupta@es.iitr.ac.in>",
        "To": "Helen Koike <helen.koike@collabora.com>,\n\tVaishali Thakkar <vthakkar@vaishalithakkar.in>,\n\tkieran.bingham@ideasonboard.com, libcamera-devel@lists.libcamera.org",
        "Cc": "Kaaira Gupta <kgupta@es.iitr.ac.in>",
        "Date": "Wed, 18 Mar 2020 17:28:45 +0530",
        "Message-Id": "<20200318115846.7975-6-kgupta@es.iitr.ac.in>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200318115846.7975-1-kgupta@es.iitr.ac.in>",
        "References": "<20200318115846.7975-1-kgupta@es.iitr.ac.in>",
        "Subject": "[libcamera-devel] [PATCH LIBCAMERA v3 5/6] libcamera: ipa_manager:\n\treplace by utils functions",
        "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, 18 Mar 2020 11:59:34 -0000"
    },
    "content": "Now that functions isLibcameraInstalled() and libcameraPath() are\ndefined in utils, they don't need to be defined here again. Hence remove\nthem and replace them with utils' functions.\n\nSigned-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>\n---\n src/libcamera/ipa_manager.cpp | 36 ++---------------------------------\n 1 file changed, 2 insertions(+), 34 deletions(-)",
    "diff": "diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\nindex 238433d..0bd280c 100644\n--- a/src/libcamera/ipa_manager.cpp\n+++ b/src/libcamera/ipa_manager.cpp\n@@ -9,9 +9,6 @@\n \n #include <algorithm>\n #include <dirent.h>\n-#include <dlfcn.h>\n-#include <elf.h>\n-#include <link.h>\n #include <string.h>\n #include <sys/types.h>\n \n@@ -27,35 +24,6 @@\n  * \\brief Image Processing Algorithm module manager\n  */\n \n-static bool isLibcameraInstalled()\n-{\n-\t/* musl doesn't declare _DYNAMIC in link.h, declare it manually. */\n-\textern ElfW(Dyn) _DYNAMIC[];\n-\n-\t/*\n-\t * DT_RUNPATH (DT_RPATH when the linker uses old dtags) is removed on\n-\t * install.\n-\t */\n-\tfor (const ElfW(Dyn) *dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn) {\n-\t\tif (dyn->d_tag == DT_RUNPATH || dyn->d_tag == DT_RPATH)\n-\t\t\treturn false;\n-\t}\n-\n-\treturn true;\n-}\n-\n-static std::string libcameraPath()\n-{\n-\tDl_info info;\n-\n-\t/* Look up our own symbol. */\n-\tint ret = dladdr(reinterpret_cast<void *>(libcameraPath), &info);\n-\tif (ret == 0)\n-\t\treturn nullptr;\n-\n-\treturn info.dli_fname;\n-}\n-\n namespace libcamera {\n \n LOG_DEFINE_CATEGORY(IPAManager)\n@@ -151,8 +119,8 @@ IPAManager::IPAManager()\n \t * path for the IPA from that point. We need to recurse one level of\n \t * sub-directories to match the build tree.\n \t */\n-\tif (!isLibcameraInstalled()) {\n-\t\tstd::string ipaBuildPath = utils::dirname(libcameraPath()) + \"/../ipa\";\n+\tif (!utils::isLibcameraInstalled()) {\n+\t\tstd::string ipaBuildPath = utils::dirname(utils::libcameraPath()) + \"/../ipa\";\n \t\tconstexpr int maxDepth = 1;\n \n \t\tLOG(IPAManager, Info)\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "5/6"
    ]
}