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: 41761 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJVpJ-0005wo-7m; Sat, 10 Jun 2017 02:08:33 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.89/mailfrontend-5) with esmtp id 1dJVpH-0001iZ-7j; Sat, 10 Jun 2017 04:08:33 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751660AbdFJCI3 (ORCPT + 1 other); 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-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.6.10.20316 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' FORGED_FROM_GMAIL 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1300_1399 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DKIM_SIGNATURE 0, NO_URI_HTTPS 0, __ANY_URI 0, __CD 0, __CT 0, __CT_TEXT_PLAIN 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_FROM 0, __HAS_LIST_ID 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __NO_HTML_TAG_RAW 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0, __YOUTUBE_RCVD 0' 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 "") {