Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1558718/?format=api
{ "id": 1558718, "url": "http://patchwork.ozlabs.org/api/patches/1558718/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20211123180354.615946-12-sjg@chromium.org/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20211123180354.615946-12-sjg@chromium.org>", "list_archive_url": null, "date": "2021-11-23T18:03:48", "name": "[11/17] binman: Allow control of which entries to read", "commit_ref": "e586f44ea70867684426007ff9079389c6baddfe", "pull_url": null, "state": "accepted", "archived": false, "hash": "7eefcac8a86f74441d18d105a14439130eb0ae5c", "submitter": { "id": 6170, "url": "http://patchwork.ozlabs.org/api/people/6170/?format=api", "name": "Simon Glass", "email": "sjg@chromium.org" }, "delegate": { "id": 3184, "url": "http://patchwork.ozlabs.org/api/users/3184/?format=api", "username": "sjg", "first_name": "Simon", "last_name": "Glass", "email": "sjg@chromium.org" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20211123180354.615946-12-sjg@chromium.org/mbox/", "series": [ { "id": 273476, "url": "http://patchwork.ozlabs.org/api/series/273476/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=273476", "date": "2021-11-23T18:03:37", "name": "binman: Various tidy-ups and refactors", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/273476/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1558718/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1558718/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "bilbo.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256\n header.s=google header.b=lKNh9wRn;\n\tdkim-atps=neutral", "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>)", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org\n header.b=\"lKNh9wRn\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=sjg@chromium.org" ], "Received": [ "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits))\n\t(No client certificate requested)\n\tby bilbo.ozlabs.org (Postfix) with ESMTPS id 4HzBsY3zFlz9ssD\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 24 Nov 2021 05:06:25 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 6C22583763;\n\tTue, 23 Nov 2021 19:05:50 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id 2F72483718; Tue, 23 Nov 2021 19:04:40 +0100 (CET)", "from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com\n [IPv6:2607:f8b0:4864:20::32e])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id A284083691\n for <u-boot@lists.denx.de>; Tue, 23 Nov 2021 19:04:27 +0100 (CET)", "by mail-ot1-x32e.google.com with SMTP id\n w6-20020a9d77c6000000b0055e804fa524so147779otl.3\n for <u-boot@lists.denx.de>; Tue, 23 Nov 2021 10:04:27 -0800 (PST)", "from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net.\n [67.190.101.114])\n by smtp.gmail.com with ESMTPSA id c8sm2357514otk.40.2021.11.23.10.04.25\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 23 Nov 2021 10:04:25 -0800 (PST)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,\n SPF_PASS autolearn=ham autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=OUMPrOkRPz22ptPlrPeQPzgqLsd4lsb+8xzILjIVL9U=;\n b=lKNh9wRnZ2UmwT4zIgh7FPtpx+hIteTYeHXZfM7ic+TQIlTw+cr32J5lMgHQQSCwAY\n shvjbN7Nhw66wRGipKOhp+xlv+gNIyr0IQgsb3c9X4E3obGVYNG2t3lv5rYdG8HOiK0e\n CLmHp424RVaXiDExilUunkumnrMOIfCyA+JX4=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=OUMPrOkRPz22ptPlrPeQPzgqLsd4lsb+8xzILjIVL9U=;\n b=wV1jzcXMH7JsGBHmQ2hsVF0J9ZEvQdMvNMCxzlUiUzPySDYUt0Yq5/3Qm+waOBOAAc\n 3f1IQ97yW5KP81E9ZmWpKWvGlSFLBrFcf2sCS+mE++A/Jm3Q+Tr5mjhGXisSrFwa6W3v\n IejyYFtmdonKizd+nYJCKQCouBwxtnY6MomuGNr3PPEB9wb/RDQ8EF0bcqiBjA7d9I6U\n Swoq5UdYQMll5Al9DUChwBpm97OFKEaY6HWjoaYeC8fAIX4irgmg7PPsWrLFgVAQkk6n\n sIKyn0a5c3lLudRgF40+a6YCYiwT0uAgfDEKivvPGBGRG2KYdTUbVVAPwqdrXUZ6/q9C\n jT2A==", "X-Gm-Message-State": "AOAM533tGLHyc6eMaYERUVtx7HOcaUn2Wzc4KBLKve+Kf9fp0d5FKQHX\n RVu5aoJNhdh+F/e9j+QSY3MYTiGMCDfUxg==", "X-Google-Smtp-Source": "\n ABdhPJyheXMTBsCF5zXVYYmJSvTImId7pr/ClTgai4LVmAVtZRByqKHZ3tIji3Vcf+ONc3VujCKsTQ==", "X-Received": "by 2002:a9d:da2:: with SMTP id 31mr6406916ots.21.1637690665940;\n Tue, 23 Nov 2021 10:04:25 -0800 (PST)", "From": "Simon Glass <sjg@chromium.org>", "To": "U-Boot Mailing List <u-boot@lists.denx.de>", "Cc": "Tom Rini <trini@konsulko.com>,\n\tSimon Glass <sjg@chromium.org>", "Subject": "[PATCH 11/17] binman: Allow control of which entries to read", "Date": "Tue, 23 Nov 2021 11:03:48 -0700", "Message-Id": "<20211123180354.615946-12-sjg@chromium.org>", "X-Mailer": "git-send-email 2.34.0.rc2.393.gf8c9666880-goog", "In-Reply-To": "<20211123180354.615946-1-sjg@chromium.org>", "References": "<20211123180354.615946-1-sjg@chromium.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.37", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.2 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "The ObtainContents() and GetEntryContents() methods in this file read\nevery single entry in the section. This is the common case.\n\nHowever when one of the entries has had its data updated (e.g. with\n'binman replace') we don't want to read it again from the file. Allow\nthe entry to be skipped, for this purpose. This is currently done in the\nCBFS implementation, so adding it here will allow that to use more of\nthe entry_Section code.\n\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\n tools/binman/etype/section.py | 13 +++++++------\n 1 file changed, 7 insertions(+), 6 deletions(-)", "diff": "diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py\nindex 334240384ea..76e5eb19648 100644\n--- a/tools/binman/etype/section.py\n+++ b/tools/binman/etype/section.py\n@@ -143,8 +143,8 @@ class Entry_section(Entry):\n for entry in self._entries.values():\n entry.AddMissingProperties(have_image_pos)\n \n- def ObtainContents(self):\n- return self.GetEntryContents()\n+ def ObtainContents(self, skip_entry=None):\n+ return self.GetEntryContents(skip_entry=skip_entry)\n \n def GetPaddedDataForEntry(self, entry, entry_data):\n \"\"\"Get the data for an entry including any padding\n@@ -527,12 +527,13 @@ class Entry_section(Entry):\n return entry\n return None\n \n- def GetEntryContents(self):\n+ def GetEntryContents(self, skip_entry=None):\n \"\"\"Call ObtainContents() for each entry in the section\n \"\"\"\n def _CheckDone(entry):\n- if not entry.ObtainContents():\n- next_todo.append(entry)\n+ if entry != skip_entry:\n+ if not entry.ObtainContents():\n+ next_todo.append(entry)\n return entry\n \n todo = self._entries.values()\n@@ -620,7 +621,7 @@ class Entry_section(Entry):\n \n def ListEntries(self, entries, indent):\n \"\"\"List the files in the section\"\"\"\n- Entry.AddEntryInfo(entries, indent, self.name, 'section', self.size,\n+ Entry.AddEntryInfo(entries, indent, self.name, self.etype, self.size,\n self.image_pos, None, self.offset, self)\n for entry in self._entries.values():\n entry.ListEntries(entries, indent + 1)\n", "prefixes": [ "11/17" ] }