From patchwork Tue Feb 9 17:58:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 12078735 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 964DBC433E9 for ; Tue, 9 Feb 2021 17:59:29 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4808E64EC4 for ; Tue, 9 Feb 2021 17:59:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4808E64EC4 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.83372.154993 (Exim 4.92) (envelope-from ) id 1l9XIB-0007eM-SO; Tue, 09 Feb 2021 17:59:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 83372.154993; Tue, 09 Feb 2021 17:59:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9XIB-0007eF-P6; Tue, 09 Feb 2021 17:59:15 +0000 Received: by outflank-mailman (input) for mailman id 83372; Tue, 09 Feb 2021 17:59:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9XI9-0007dX-S8 for xen-devel@lists.xenproject.org; Tue, 09 Feb 2021 17:59:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9XI9-0003yp-OO for xen-devel@lists.xenproject.org; Tue, 09 Feb 2021 17:59:13 +0000 Received: from iwj (helo=mariner.uk.xensource.com) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1l9XI9-0004cv-MB for xen-devel@lists.xenproject.org; Tue, 09 Feb 2021 17:59:13 +0000 Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by mariner.uk.xensource.com with esmtp (Exim 4.89) (envelope-from ) id 1l9XI7-00065Y-NK; Tue, 09 Feb 2021 17:59:11 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From; bh=DeylNrZYYK3wMWxKS9RPXvprA8fskbcUy3SMB2/3gZ8=; b=YY4Hz0YJpc+VgI5f4qu8w1f9vh 2B9/AgT9Mod3ed28iSgZMackaFGtssgGVMKlehZ8sX7NEuezlyZnEicsF6yaKmpLAXyS+csxe1nbO eNt/TS4wz2TKzqRYuEfTzLc/WWsKkms6edoaGMYIA4/+6eAYXxRKuHy16LmTqTGmPeCs=; From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 1/7] mg-debian-installer-update: Honour redirect for dtbs Date: Tue, 9 Feb 2021 17:58:58 +0000 Message-Id: <20210209175904.28282-1-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 When using snapshots, we can get a redirect and then we don't recurse. There doesn't seem to be a suitable option for wget, so do this by hand before we call wget -m. Signed-off-by: Ian Jackson --- mg-debian-installer-update | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mg-debian-installer-update b/mg-debian-installer-update index fb4fe2ab..5e890d34 100755 --- a/mg-debian-installer-update +++ b/mg-debian-installer-update @@ -89,7 +89,12 @@ if [ "x$dtbs" != "x" ] ; then # Can't seem to get curl to globs. rm -rf dtbs mkdir dtbs - ( cd dtbs && wget -nv -A README,\*.dtb -nd -nH -np -m $dtbs ) + dtbs_redir="$(curl -sSI -o /dev/null -w '%{redirect_url}' $dtbs)" + if [ "x$dtbs_redir" != x ]; then + dtbs=$dtbs_redir + echo "Redirected for dtbs, to $dtbs" + fi + ( cd dtbs && wget -nv -A README,\*.dtb -nd -nH -np -m "$dtbs" ) tar --mtime=./dtbs/README -cf dtbs.tar dtbs gzip -9nf dtbs.tar fi