get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54441,
    "url": "http://patches.dpdk.org/api/patches/54441/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190605202248.394-2-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20190605202248.394-2-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190605202248.394-2-bruce.richardson@intel.com",
    "date": "2019-06-05T20:22:39",
    "name": "[01/10] build: print list of disabled components for meson build",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "be80de37c630e16f892af9b3de9c76bb35e5a01f",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190605202248.394-2-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 4915,
            "url": "http://patches.dpdk.org/api/series/4915/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4915",
            "date": "2019-06-05T20:22:38",
            "name": "enhance meson summary - list disabled components",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4915/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54441/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/54441/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A97EB1B9B0;\n\tWed,  5 Jun 2019 22:23:07 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id E2C901B9B0\n\tfor <dev@dpdk.org>; Wed,  5 Jun 2019 22:23:05 +0200 (CEST)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Jun 2019 13:23:05 -0700",
            "from silpixa00399126.ir.intel.com (HELO\n\tsilpixa00399126.ger.corp.intel.com) ([10.237.223.2])\n\tby orsmga008.jf.intel.com with ESMTP; 05 Jun 2019 13:23:03 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "bluca@debian.org,\n\tthomas@monjalon.net",
        "Cc": "dev@dpdk.org, john.mcnamara@intel.com,\n\tBruce Richardson <bruce.richardson@intel.com>",
        "Date": "Wed,  5 Jun 2019 21:22:39 +0100",
        "Message-Id": "<20190605202248.394-2-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190605202248.394-1-bruce.richardson@intel.com>",
        "References": "<20190605202248.394-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 01/10] build: print list of disabled components\n\tfor meson build",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "When configuring with meson we print out a list of enabled components, but\nit is also useful to list out the disabled components and the reasons why.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n doc/guides/contributing/coding_style.rst | 15 ++++++++++++++-\n drivers/meson.build                      | 12 +++++++++++-\n lib/meson.build                          |  6 +++++-\n meson.build                              | 15 +++++++++++++++\n 4 files changed, 45 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst\nindex a5d5897f3..449b33494 100644\n--- a/doc/guides/contributing/coding_style.rst\n+++ b/doc/guides/contributing/coding_style.rst\n@@ -852,12 +852,15 @@ allow_experimental_apis\n build\n \t**Default Value = true**\n \tUsed to optionally compile a library, based on its dependencies or\n-\tenvironment. A simple example of use would be:\n+\tenvironment. When set to \"false\" the ``reason`` value, explained below, should\n+\talso be set to explain to the user why the component is not being built.\n+\tA simple example of use would be:\n \n .. code-block:: python\n \n \tif not is_linux\n \t        build = false\n+\t        reason = 'only supported on Linux'\n \tendif\n \n \n@@ -938,6 +941,13 @@ objs\n \tobjects that were compiled up as part of another target given in the\n \tincluded library ``meson.build`` file.\n \n+reason\n+\t**Default Value = '<unknown reason>'**.\n+\tThis variable should be used when a library is not to be built i.e. when\n+\t``build`` is set to \"false\", to specify the reason why a library will not be\n+\tbuilt. For missing dependencies this should be of the form\n+\t``'missing dependency, \"libname\"'``.\n+\n version\n \t**Default Value = 1**.\n \tSpecifies the ABI version of the library, and is used as the major\n@@ -991,6 +1001,9 @@ pkgconfig_extra_libs\n \tusing static libraries. Anything added here will be appended to the end\n \tof the ``pkgconfig --libs`` output.\n \n+reason\n+\tAs above.\n+\n sources [mandatory]\n \tAs above\n \ndiff --git a/drivers/meson.build b/drivers/meson.build\nindex 4c444f495..94e6c829e 100644\n--- a/drivers/meson.build\n+++ b/drivers/meson.build\n@@ -40,6 +40,7 @@ foreach class:dpdk_driver_classes\n \n \t\t# set up empty variables used for build\n \t\tbuild = true # set to false to disable, e.g. missing deps\n+\t\treason = '<unknown reason>' # set if build == false to explain\n \t\tname = drv\n \t\tversion = 1\n \t\tallow_experimental_apis = false\n@@ -61,7 +62,16 @@ foreach class:dpdk_driver_classes\n \t\t# pull in driver directory which should assign to each of the above\n \t\tsubdir(drv_path)\n \n-\t\tif build\n+\t\tif not build\n+\t\t\t# some driver directories are placeholders which\n+\t\t\t# are never built, so we allow suppression of the\n+\t\t\t# component disable printout in those cases\n+\t\t\tif reason != ''\n+\t\t\t\tdpdk_drvs_disabled += drv_path\n+\t\t\t\tset_variable(drv_path.underscorify() +\n+\t\t\t\t\t\t'_disable_reason', reason)\n+\t\t\tendif\n+\t\telse\n \t\t\tclass_drivers += name\n \n \t\t\tdpdk_conf.set(config_flag_fmt.format(name.to_upper()),1)\ndiff --git a/lib/meson.build b/lib/meson.build\nindex e067ce5ea..76c13b7da 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -46,6 +46,7 @@ default_cflags += '-D_GNU_SOURCE'\n \n foreach l:libraries\n \tbuild = true\n+\treason = '<unknown reason>' # set if build == false to explain why\n \tname = l\n \tversion = 1\n \tallow_experimental_apis = false\n@@ -68,7 +69,10 @@ foreach l:libraries\n \tdir_name = 'librte_' + l\n \tsubdir(dir_name)\n \n-\tif build\n+\tif not build\n+\t\tdpdk_libs_disabled += name\n+\t\tset_variable(name.underscorify() + '_disable_reason', reason)\n+\telse\n \t\tenabled_libs += name\n \t\tdpdk_conf.set('RTE_LIBRTE_' + name.to_upper(), 1)\n \t\tinstall_headers(headers)\ndiff --git a/meson.build b/meson.build\nindex 9cad43481..63a1ce25b 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -20,6 +20,8 @@ dpdk_driver_classes = []\n dpdk_drivers = []\n dpdk_extra_ldflags = []\n dpdk_app_link_libraries = []\n+dpdk_libs_disabled = []\n+dpdk_drvs_disabled = []\n \n # configure the build, and make sure configs here and in config folder are\n # able to be included in any file. We also store a global array of include dirs\n@@ -108,3 +110,16 @@ foreach class:dpdk_driver_classes\n \tendforeach\n endforeach\n message(output_message + '\\n')\n+\n+output_message = '\\n=================\\nContent Skipped\\n=================\\n'\n+output_message += '\\nlibs:\\n\\t'\n+foreach lib:dpdk_libs_disabled\n+\treason = get_variable(lib.underscorify() + '_disable_reason')\n+\toutput_message += lib + ':\\t' + reason + '\\n\\t'\n+endforeach\n+output_message += '\\ndrivers:\\n\\t'\n+foreach drv:dpdk_drvs_disabled\n+\treason = get_variable(drv.underscorify() + '_disable_reason')\n+\toutput_message += drv + ':\\t' + reason + '\\n\\t'\n+endforeach\n+message(output_message + '\\n')\n",
    "prefixes": [
        "01/10"
    ]
}