Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/453147/?format=api
{ "id": 453147, "url": "http://patchwork.ozlabs.org/api/patches/453147/?format=api", "web_url": "http://patchwork.ozlabs.org/project/buildroot/patch/ba2046d72b5e7f4de0bec7179fe328f6f611415a.1427037564.git.yann.morin.1998@free.fr/", "project": { "id": 27, "url": "http://patchwork.ozlabs.org/api/projects/27/?format=api", "name": "Buildroot development", "link_name": "buildroot", "list_id": "buildroot.buildroot.org", "list_email": "buildroot@buildroot.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<ba2046d72b5e7f4de0bec7179fe328f6f611415a.1427037564.git.yann.morin.1998@free.fr>", "list_archive_url": null, "date": "2015-03-22T15:21:04", "name": "[5/7,v3] support/download: properly catch missing hashes", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "abdc50ccaf803acb120fe3b6b63f5c6647d42728", "submitter": { "id": 13903, "url": "http://patchwork.ozlabs.org/api/people/13903/?format=api", "name": "Yann E. MORIN", "email": "yann.morin.1998@free.fr" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/buildroot/patch/ba2046d72b5e7f4de0bec7179fe328f6f611415a.1427037564.git.yann.morin.1998@free.fr/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/453147/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/453147/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<buildroot-bounces@busybox.net>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "buildroot@lists.busybox.net" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "buildroot@osuosl.org" ], "Received": [ "from silver.osuosl.org (silver.osuosl.org [140.211.166.136])\n\tby ozlabs.org (Postfix) with ESMTP id 50016140146\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 23 Mar 2015 02:21:37 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 68EB832BF7;\n\tSun, 22 Mar 2015 15:21:36 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id MgHfLFIcAIzE; Sun, 22 Mar 2015 15:21:31 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 984D332BE4;\n\tSun, 22 Mar 2015 15:21:23 +0000 (UTC)", "from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id C8B9F1C2343\n\tfor <buildroot@lists.busybox.net>;\n\tSun, 22 Mar 2015 15:21:16 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id C159394D2E\n\tfor <buildroot@lists.busybox.net>;\n\tSun, 22 Mar 2015 15:21:16 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id YJ1dvYy4OEGu for <buildroot@lists.busybox.net>;\n\tSun, 22 Mar 2015 15:21:16 +0000 (UTC)", "from mail-wi0-f176.google.com (mail-wi0-f176.google.com\n\t[209.85.212.176])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id E5BA294CE4\n\tfor <buildroot@buildroot.org>; Sun, 22 Mar 2015 15:21:15 +0000 (UTC)", "by wibg7 with SMTP id g7so27203516wib.1\n\tfor <buildroot@buildroot.org>; Sun, 22 Mar 2015 08:21:14 -0700 (PDT)", "from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66])\n\tby mx.google.com with ESMTPSA id\n\t14sm15244710wjv.29.2015.03.22.08.21.13\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tSun, 22 Mar 2015 08:21:13 -0700 (PDT)" ], "Authentication-Results": "ozlabs.org; dkim=fail\n\treason=\"verification failed; unprotected key\"\n\theader.d=gmail.com header.i=@gmail.com header.b=xtsXSjTB;\n\tdkim-adsp=none (unprotected policy); dkim-atps=neutral", "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=kqih3WrLNzxy0ST36qMrsW4bkJ3lK+FQgEyPtZuSO88=;\n\tb=xtsXSjTBTQrrMwJeNwjLn6amASJnlUQvuZ9J+w+UmK5I8WJ5MH4Iiiic1J23SYIXaa\n\tWmbqqIEKcQxumClITH7xBC+hKx5nhf31k76Yq1DH9c0eStDzaz4zmS1oN5QSNNbOdaTm\n\txiAaN9f68TF1his+edyGElVMmSbXO5g9nSTt5fn5QsdhubMUNA4Xk1MCA7VO9154HZ0R\n\tmmBpEsiAPwMWD1yS0k6fIF0BCr7UWlh8GVIFohnTGvABFg+VKYzcZHahLB86Tx8hzq5X\n\tGpAvFI8iOacvf9+vXeEX5531zFkSh9HaLTbwiTdEyW5uSqyJmDAiGv7Xt8tcS0aC2vNW\n\t1S6A==", "X-Received": "by 10.180.108.81 with SMTP id hi17mr11887095wib.91.1427037674289;\n\tSun, 22 Mar 2015 08:21:14 -0700 (PDT)", "From": "\"Yann E. MORIN\" <yann.morin.1998@free.fr>", "To": "buildroot@buildroot.org", "Date": "Sun, 22 Mar 2015 16:21:04 +0100", "Message-Id": "<ba2046d72b5e7f4de0bec7179fe328f6f611415a.1427037564.git.yann.morin.1998@free.fr>", "X-Mailer": "git-send-email 1.9.1", "In-Reply-To": "<cover.1427037564.git.yann.morin.1998@free.fr>", "References": "<cover.1427037564.git.yann.morin.1998@free.fr>", "Cc": "Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\t\"Yann E. MORIN\" <yann.morin.1998@free.fr>", "Subject": "[Buildroot] [PATCH 5/7 v3] support/download: properly catch missing\n\thashes", "X-BeenThere": "buildroot@busybox.net", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Discussion and development of buildroot <buildroot.busybox.net>", "List-Unsubscribe": "<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>", "List-Archive": "<http://lists.busybox.net/pipermail/buildroot/>", "List-Post": "<mailto:buildroot@busybox.net>", "List-Help": "<mailto:buildroot-request@busybox.net?subject=help>", "List-Subscribe": "<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "buildroot-bounces@busybox.net", "Sender": "\"buildroot\" <buildroot-bounces@busybox.net>" }, "content": "When checking hashes reports no hash for a file, and this is treated as\nan error (now: because BR2_ENFORCE_CHECK_HASH is set; later: because\nthat will be the new and only behaviour), exit promptly in error.\n\nSigned-off-by: \"Yann E. MORIN\" <yann.morin.1998@free.fr>\nCc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\nCc: Arnout Vandecappelle <arnout@mind.be>\nReviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>\n\n---\nChanges v2 -> v3:\n - change the exit code to 1 (no need to differentiate exit codes here)\n---\n support/download/dl-wrapper | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)", "diff": "diff --git a/support/download/dl-wrapper b/support/download/dl-wrapper\nindex 514118c..ef2d872 100755\n--- a/support/download/dl-wrapper\n+++ b/support/download/dl-wrapper\n@@ -45,10 +45,19 @@ main() {\n error \"no output specified, use -o\\n\"\n fi\n \n- # If the output file already exists, do not download it again\n+ # If the output file already exists and:\n+ # - there's no .hash file: do not download it again and exit promptly\n+ # - matches all its hashes: do not download it again and exit promptly\n+ # - fails at least one of its hashes: force a re-download\n+ # - there's no hash (but a .hash file): consider it a hard error\n if [ -e \"${output}\" ]; then\n if support/download/check-hash ${quiet} \"${hfile}\" \"${output}\" \"${output##*/}\"; then\n exit 0\n+ elif [ ${?} -ne 2 ]; then\n+ # Do not remove the file, otherwise it might get re-downloaded\n+ # from a later location (i.e. primary -> upstream -> mirror).\n+ # Do not print a message, check-hash already did.\n+ exit 1\n fi\n rm -f \"${output}\"\n warn \"Re-downloading '%s'...\\n\" \"${output##*/}\"\n", "prefixes": [ "5/7", "v3" ] }