From patchwork Sat Jun 10 02:08:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent McIntyre X-Patchwork-Id: 9779599 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5DA04601EA for ; Sat, 10 Jun 2017 02:08:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D93128749 for ; Sat, 10 Jun 2017 02:08:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4072C2874C; Sat, 10 Jun 2017 02:08:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6FB928749 for ; Sat, 10 Jun 2017 02:08:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751660AbdFJCI3 (ORCPT ); Fri, 9 Jun 2017 22:08:29 -0400 Received: from mail-pg0-f50.google.com ([74.125.83.50]:36755 "EHLO mail-pg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751641AbdFJCI2 (ORCPT ); Fri, 9 Jun 2017 22:08:28 -0400 Received: by mail-pg0-f50.google.com with SMTP id a70so31346875pge.3 for ; Fri, 09 Jun 2017 19:08:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=fiwpnBh6GVfKmPNcnSvRRLOBHug0TIG/T00SZcLJ6r4=; b=CrF3tKURBPr0AtcKW0VwgSzbQ6hc3qvXpf9Cznfto6QpkuLlp7D3mQDr5BklC+54kd 1ShLqjy2tz51KkIgMYQ653SLZldy2nghjh0fmAzKJ0gFRnS1YoInZ6sirOtp9TpHDDpS Mqfdyd8EEkRXnpxRr8m7G35nBTuRNa5OaD/wtQcGVWBcV7FgTmKPZ65I2kbHuwuqEi7o liH+K9U/gRWmnjwfwqpvPuoTvfAQg9nxGakxiiJAryYysYhE8oPdDbL7pP6gpU54KWCP pGVfKoGtH6g5bp2gN1eFPjwFh4u0YtycbKcNv25cU2tVt2Rjr7aVSG/TNNXVGjj+P6wD Wbeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=fiwpnBh6GVfKmPNcnSvRRLOBHug0TIG/T00SZcLJ6r4=; b=STtqLfIFS3GeMWcmIjenYRZ6yV/BoyvN8BKnZhhDRUc9y9uR7pb/fbXsFXNzoDeF9e +NR1UPXg1gnktpLrIEMVc81BcjAzFHcz+6A5FUJ7ji3QUijHPF6EV2XFRioOzfsrXl/j ELs2PeWhp85XkWqtMGUr+qtrw8pn08qy+oXJJG9OKq9N1KCufGIvN026oKDEkN/eVCp+ zCObrUc39pJ7jl+NcM3n9NUoUOG1cHSxDzuap5Ls+vWRQBsDEBgJlBWVi8onSAyOAVNg 8I3YbF2zqE35ta6isXkfmCz3lD7tbI+CPH7uJzFic7S0jEoupPPHQTWKIFYflhoDQoSD pruw== X-Gm-Message-State: AODbwcDYJnmuwsab/xLRekuuAIe8SPeKd2MG+gjtRu1gKcMw8Y5KT3X+ X3cX6oRhyuFfULXq X-Received: by 10.84.194.165 with SMTP id h34mr42796371pld.65.1497060507227; Fri, 09 Jun 2017 19:08:27 -0700 (PDT) Received: from ubuntu.windy (c122-106-153-7.carlnfd1.nsw.optusnet.com.au. [122.106.153.7]) by smtp.gmail.com with ESMTPSA id a28sm5232845pfl.25.2017.06.09.19.08.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Jun 2017 19:08:26 -0700 (PDT) Date: Sat, 10 Jun 2017 12:08:40 +1000 From: Vincent McIntyre To: linux-media@vger.kernel.org Subject: [patch] [media_build] Small fix to build script (resend) Message-ID: <20170610020838.GA12764@ubuntu.windy> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This seems to have fallen on the floor... Original send date: Thu, 1 Jun 2017 19:43:43 +1000 Avoid going splat if --depth is not given Commit 6b4a9c5 indroduced the --depth parameter to limit the commit history pulled by when cloning, giving a nice speedup. But in the process it broke running without the --depth parameter. The first invocation of './build --main-git' works fine, but the second falls over like so: fatal: No such remote or remote group: media_tree/master Can't update from the upstream tree at ./build line 430. The fix is to check whether that remote has been defined before trying to update from it. Signed-off-by: Vincent McIntyre --- build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build b/build index a4cd38e..d7f51c2 100755 --- a/build +++ b/build @@ -427,8 +427,13 @@ if (@git == 2) { } } } elsif ($workdir eq "") { - system("git --git-dir media/.git remote update '$rname/$git[1]'") == 0 - or die "Can't update from the upstream tree"; + if (check_git("remote", "$rname/$git[1]")) { + system("git --git-dir media/.git remote update '$rname/$git[1]'") == 0 + or die "Can't update from the upstream tree"; + } else { + system("git --git-dir media/.git remote update origin") == 0 + or die "Can't update from the upstream tree"; + } } if ($workdir eq "") {