Show a patch.

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

{
    "id": 3150,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3150/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3150/",
    "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": "<20200318001009.32512-5-kgupta@es.iitr.ac.in>",
    "date": "2020-03-18T00:10:07",
    "name": "[libcamera-devel,v2,4/6] libcamera: ipa_proxy: search for proxy in build tree",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "3d311ae6522fc13bbea89ea14637a07270ccf396",
    "submitter": {
        "id": 39,
        "url": "https://patchwork.libcamera.org/api/1.1/people/39/?format=api",
        "name": "Kaaira Gupta",
        "email": "kgupta@es.iitr.ac.in"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3150/mbox/",
    "series": [
        {
            "id": 729,
            "url": "https://patchwork.libcamera.org/api/1.1/series/729/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=729",
            "date": "2020-03-18T00:10:03",
            "name": "libcamera: determine IPA_PROXY_PATH at runtime",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/729/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3150/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3150/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kgupta@es.iitr.ac.in>",
        "Received": [
            "from mail-pg1-x541.google.com (mail-pg1-x541.google.com\n\t[IPv6:2607:f8b0:4864:20::541])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DF45F60422\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Mar 2020 01:10:45 +0100 (CET)",
            "by mail-pg1-x541.google.com with SMTP id 37so12619434pgm.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Mar 2020 17:10:45 -0700 (PDT)",
            "from kaaira-HP-Pavilion-Notebook ([103.113.213.153])\n\tby smtp.gmail.com with ESMTPSA id\n\tf127sm4178266pfa.112.2020.03.17.17.10.43\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 17 Mar 2020 17:10:44 -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=S9PynKcuJpQuOHFN0kYzs6do1Q7f5BCY5H/KXRXtOSw=;\n\tb=AZN6TEGOKuDqe3KiH69oLtXcUjXsNId/klKpnB4hwS6AwKMWDEesqtrgJI9w0YoCpy\n\t7TzrP6JloMp07brEoVLvz/+FT+OxDf/IpcqWz5uXZR4zZk4enU++24qcflgy+sCm/4Pz\n\tvvlVH+OzsbaERgYslhdNUhuwrn+Nx/M+u1zrs86SAiAtU/9ndq5gFQTWOxnxQMF+B7ou\n\tVcoaEc0bYxA6U2W+BhUULawNlCKWpM/4NKduEKkzKwKJNhI2rLtRXGEBl2mVU61BdaDz\n\ts5n5CEokgGoLPp3ZXxbN6zENvkpbuwOQ5PbRjgS7Yhn8Sp3Hp2bPXztExOJMpG5Xre3E\n\tbTfw==",
        "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=S9PynKcuJpQuOHFN0kYzs6do1Q7f5BCY5H/KXRXtOSw=;\n\tb=qE8DW7P/98ZaMZo3ulraAYysUu+G0eVR7rQ4RuhQbH4O8spZeA8zxQ97v7hx5pgI/H\n\tVFIGz2+Kh0/jgtIWQDzCGkZSm5+4edOL778OuTXu0OVn27U0ofPxmq9NQ32DpS//D8jy\n\t4ed/S8kjy7NMc1wXFhhvrfNzLFkTtlDL69tHc0SAsLBCRiIcg2c7Rj0NJBhozSjZRJTq\n\tmPBdBbt+ehIzbz35dBlFxfge+OTX4euw19gkhEJAWbU/2/DBJh2HoM2vuC5XTHlmhsGu\n\twAeN6NFl37YJdF9DFF+X/94InKomtkxt1lGrJoKZnbCdk2x9NFauRDVvlnEuJszuPvBV\n\tDUMA==",
        "X-Gm-Message-State": "ANhLgQ15MLPnfMtAc7PTTpCkTBv0WzWpgKcqJdQONwnXtZ2Q2FUR+6Ld\n\tMYBxjW02vP3rQtvRk+46Rjp4iw==",
        "X-Google-Smtp-Source": "ADFU+vvZ7KGjTM3tbG5lzs031TnpxX8XZWvxj1e64i8FxtbLNyEIPGxSjKG92EZ3PtdBWPoS3AyZwA==",
        "X-Received": "by 2002:aa7:9838:: with SMTP id\n\tq24mr1413578pfl.135.1584490244487; \n\tTue, 17 Mar 2020 17:10:44 -0700 (PDT)",
        "From": "Kaaira Gupta <kgupta@es.iitr.ac.in>",
        "To": "kieran.bingham@ideasonboard.com, libcamera-devel@lists.libcamera.org,\n\tHelen Koike <helen.koike@collabora.com>,\n\tVaishali Thakkar <vthakkar@vaishalithakkar.in>",
        "Cc": "Kaaira Gupta <kgupta@es.iitr.ac.in>",
        "Date": "Wed, 18 Mar 2020 05:40:07 +0530",
        "Message-Id": "<20200318001009.32512-5-kgupta@es.iitr.ac.in>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200318001009.32512-1-kgupta@es.iitr.ac.in>",
        "References": "<20200318001009.32512-1-kgupta@es.iitr.ac.in>",
        "Subject": "[libcamera-devel] [PATCH LIBCAMERA v2 4/6] libcamera: ipa_proxy:\n\tsearch for proxy in build tree",
        "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 00:10:46 -0000"
    },
    "content": "When libcamera is built and tested before installing, it will\nbe unable to locate the path to proxy files, or previously\ninstalled files in the system path may be incorrect to load.\n\nHence, when libcamera is not installed and running from a build\ntree, identify the location of that tree by using libcameraPath(), and\nfrom that point add relative path to the proxy file.\n\nSigned-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>\n---\n src/libcamera/ipa_proxy.cpp | 21 +++++++++++++++++----\n 1 file changed, 17 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\nindex b409e1d..1014e79 100644\n--- a/src/libcamera/ipa_proxy.cpp\n+++ b/src/libcamera/ipa_proxy.cpp\n@@ -91,10 +91,23 @@ std::string IPAProxy::resolvePath(const std::string &file) const\n \t\t}\n \t}\n \n-\t/* Try finding the exec target from the install directory. */\n-\tstd::string proxyPath = std::string(IPA_PROXY_DIR) + proxyFile;\n-\tif (!access(proxyPath.c_str(), X_OK))\n-\t\treturn proxyPath;\n+\t/*\n+\t * When libcamera is used before it is installed, load proxies from the\n+\t * same build directory as the libcamera directory itself. This requires\n+\t * identifying the path of the libcamera.so, and referencing a relative\n+\t * path for the proxies from that point.\n+\t */\n+\tif (!utils::isLibcameraInstalled()) {\n+\t\tstd::string ipaProxyDir = utils::dirname(utils::libcameraPath()) + \"/../../proxy\";\n+\n+\t\tLOG(IPAProxy, Info)\n+\t\t\t<< \"libcamera is not installed. Adding '\"\n+\t\t\t<< ipaProxyDir << \"' to the Proxy search path\";\n+\n+\t\tstd::string proxyPath = ipaProxyDir + proxyFile;\n+\t\tif (!access(proxyPath.c_str(), X_OK))\n+\t\t\treturn proxyPath;\n+\t}\n \n \treturn std::string();\n }\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "4/6"
    ]
}