From patchwork Tue Apr 27 19:45:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 1470857 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=odOMbNpB; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FVC1v6WrYz9sXh for ; Wed, 28 Apr 2021 05:46:27 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C32C0608E3; Tue, 27 Apr 2021 19:45:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 65A6pmNaZ7P7; Tue, 27 Apr 2021 19:45:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 3198560631; Tue, 27 Apr 2021 19:45:54 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A683E1BF25B for ; Tue, 27 Apr 2021 19:45:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 966DB83D40 for ; Tue, 27 Apr 2021 19:45:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aYCJksWtXKwJ for ; Tue, 27 Apr 2021 19:45:52 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by smtp1.osuosl.org (Postfix) with ESMTPS id D66A183D39 for ; Tue, 27 Apr 2021 19:45:51 +0000 (UTC) Received: by mail-ed1-x52e.google.com with SMTP id z5so34888294edr.11 for ; Tue, 27 Apr 2021 12:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1DeOt0nLWOUdkzGEHQpYbQArZhna0R3kphJ77s3P3no=; b=odOMbNpBsE4kq1T/SUyOgWcNh8Yrmj/5CX1xgQpYe49GIkqeYtX20JQ31uVHuxrW84 Bmlgfpm7DM+3SP6WuPvqCWm2Zu8S32iAd6Bz/AHv6P7iQ7H4BIyiblxLetaRHuyJh51M 5y42C+tBtx67+fQXOCFEiNholYZi1FCZv+04svASnFZgx/RGesrXbavzHKn3KAYjs2s3 dhRt7Uf1HFclRYZr5yhzPgBagj0it9eGdMk+A/QxIN8dPc5h0tuLtVkjSoxHfjhRxhsV 5mwiVUORJtEU1IwVm6Vpv3wIY0+DRuuDkQOxiz7SwJ0BsSRjA1uW3wiO0KrMkA96Z9bL dW2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1DeOt0nLWOUdkzGEHQpYbQArZhna0R3kphJ77s3P3no=; b=jqUHwyZ9S2vDepIY21lQbN2OQirrTr3pRFR0Acnzr4WVuBagV5Dx5bhscsPXTBj2GL wO5S4MZPQu2TL+vqL9f7GsiKi3Xm+ur/mEKhddh5U0mQlMoQ5qAfbO4/f44ntO4HlCGz omZ7rGetyWv95Nu/NuLY+V74qH5xekOlPsIN2BbhIMaz7PG/ZjTEIECtxYI8dTv4E0xe aRF8etP9kETB3VyAo0PfKHI/S/eALIZYxoFjyffP2/1PHVG6JyeUFwOQzPl3FFr3NSF5 Rr4t5BEW+oRSere2HiXu1z8nDLslxOIDHs2Lrnpbh60n3SQEFZSdvqtTbZS6p7OFoG6K spyg== X-Gm-Message-State: AOAM530tMf/AkB+jvTGRFDIaXvyQX9oczS3hkDanEzym6/sI7Y5n7aK3 DrB4angowbnW0xIV2KjQyBAmNhDfdpT/KhWD X-Google-Smtp-Source: ABdhPJyL+rGvHO7ueA+WwrvWSAWafn1oQ70wYUWyY8sKYYIoBpfAx3FBxhUmmu8i4c6JP+HcDGfpMg== X-Received: by 2002:aa7:c393:: with SMTP id k19mr6427654edq.160.1619552750129; Tue, 27 Apr 2021 12:45:50 -0700 (PDT) Received: from localhost (ptr-5gw9tx0z7f066xyxzn.18120a2.ip6.access.telenet.be. [2a02:1810:510:3800:124:6af2:167b:d993]) by smtp.gmail.com with ESMTPSA id e11sm1835047edq.76.2021.04.27.12.45.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 12:45:49 -0700 (PDT) From: Thomas De Schampheleire To: buildroot@buildroot.org Date: Tue, 27 Apr 2021 21:45:44 +0200 Message-Id: <20210427194544.15861-1-patrickdepinguin@gmail.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] support/download/hg: fix broken method X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas De Schampheleire Commit 54d3d94b6e3846447b5796ef8587b08b537cd348 broke the 'hg' download method, in a similar way as it broke the 'git' download method (later fixed with commit b70ce5665126246bd6b6bf804c6d9eea1fc599cf), by introducing extra output on stdout in a case where the output is redirected. In the case of 'hg', the 'hg archive' step uses shell redirection rather than directly letting hg write the output file, since commit 76b51f90c0e393349dd0c71d7e6cf82fbc094282. As a result, the extra print added by the _hg function is prepended to the actual archive, causing an invalid archive. Fix by using the _plain_hg function instead. The disadvantage is that the command for 'hg archive' is no longer printed. Signed-off-by: Thomas De Schampheleire --- support/download/hg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/download/hg b/support/download/hg index a7542e5c84..768a27e06f 100755 --- a/support/download/hg +++ b/support/download/hg @@ -45,6 +45,6 @@ _plain_hg() { _hg clone ${quiet} "${@}" --noupdate "'${uri}'" "'${basename}'" -_hg archive ${quiet} --repository "'${basename}'" --type tgz \ +_plain_hg archive ${quiet} --repository "'${basename}'" --type tgz \ --prefix "'${basename}'" --rev "'${cset}'" \ - >"${output}"