From patchwork Fri Oct 18 20:52:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ryan S. Arnold" X-Patchwork-Id: 21177 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f71.google.com (mail-pb0-f71.google.com [209.85.160.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0EC1A202E6 for ; Fri, 18 Oct 2013 20:53:39 +0000 (UTC) Received: by mail-pb0-f71.google.com with SMTP id uo15sf4712496pbc.10 for ; Fri, 18 Oct 2013 13:53:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=/eR7858s3LHW6e4T3EvJVrFQM774vUSrcCpJCl9GAk4=; b=OZEG+VYDnccEUwYb1Up4CPFp+EabDg1yWWeY0dBOEm0Z0nvJUzxnnh7Rv68vwZhdvs MNotHdl8gx9It/dl5AAd45lDICE4sGwmP6nfENcbL39IB45cX9yxj40/DZxA3xRqnkRG FXlgYr8m3FFBYMCkbQIWOLFA2zlIDodLF3FAZyx5Pb7JOji08NzI5rWNrgwkP2aI631N RegGWcb3/XOgoObNeOlNlKSIKEgo9blHfrMJgTDXrnntqqWUypAM2+JuxvP/WSBBB/4z Iqb8pENHwQCCkFoJwyYOWKneVK1E+cnQhW+kGFYU+0yZMPqNqBDF8gUu5T9gIHVQ5txf Hi/g== X-Received: by 10.66.248.193 with SMTP id yo1mr1994078pac.6.1382129619361; Fri, 18 Oct 2013 13:53:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.133.100 with SMTP id pb4ls1411951qeb.44.gmail; Fri, 18 Oct 2013 13:53:39 -0700 (PDT) X-Received: by 10.220.183.199 with SMTP id ch7mr575070vcb.27.1382129619112; Fri, 18 Oct 2013 13:53:39 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id o5si668392vdw.89.2013.10.18.13.53.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 13:53:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id cz12so1930656veb.24 for ; Fri, 18 Oct 2013 13:53:39 -0700 (PDT) X-Gm-Message-State: ALoCoQnrh1f/ukn9Gz9XjEx7O8b1m9umjmXnqu1iZjjURq8tevhDkORUcSK/K5YWDcKcomnKkGwu X-Received: by 10.58.207.76 with SMTP id lu12mr209126vec.30.1382129619013; Fri, 18 Oct 2013 13:53:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp63328vcz; Fri, 18 Oct 2013 13:53:38 -0700 (PDT) X-Received: by 10.50.61.35 with SMTP id m3mr936620igr.56.1382129618358; Fri, 18 Oct 2013 13:53:38 -0700 (PDT) Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by mx.google.com with ESMTPS id gy6si3380858icc.34.2013.10.18.13.53.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 13:53:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.223.178 is neither permitted nor denied by best guess record for domain of ryan.arnold@linaro.org) client-ip=209.85.223.178; Received: by mail-ie0-f178.google.com with SMTP id to1so10026990ieb.9 for ; Fri, 18 Oct 2013 13:53:38 -0700 (PDT) X-Received: by 10.50.62.211 with SMTP id a19mr1014162igs.18.1382129617889; Fri, 18 Oct 2013 13:53:37 -0700 (PDT) Received: from badwing.hsd1.mn.comcast.net. (c-71-195-40-9.hsd1.mn.comcast.net. [71.195.40.9]) by mx.google.com with ESMTPSA id cl4sm14877361igc.1.2013.10.18.13.53.36 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 18 Oct 2013 13:53:37 -0700 (PDT) From: "Ryan S. Arnold" To: Rob Savoye Cc: patches@linaro.org, "Ryan S. Arnold" Subject: [PATCH][Cbuildv2/get_source 05/17] lib/common.sh: Invoke find_snapshot as a subshell in get_source. Date: Fri, 18 Oct 2013 15:52:47 -0500 Message-Id: <1382129579-5777-6-git-send-email-ryan.arnold@linaro.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1382129579-5777-1-git-send-email-ryan.arnold@linaro.org> References: <1382129579-5777-1-git-send-email-ryan.arnold@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ryan.arnold@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: "Ryan S. Arnold" The current use of find_snapshot in get_source is erroneously directly invoked and its output isn't properly trapped and pollutes the stdout of get_source, which can make get_source erroneously return output in an error case. Putting this in place regresses the tar.bz2 test case. This will be fixed in a following commit. --- lib/common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/common.sh b/lib/common.sh index 6fb7b7b..1e3bc9f 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -363,8 +363,8 @@ get_source() # If a full URL isn't passed as an argument, assume we want a # tarball snapshot if test `echo $1 | egrep -c "^svn|^git|^http|^bzr|^lp|\.git"` -eq 0; then - find_snapshot $1 - # got an error + local snapshot + snapshot=`find_snapshot $1` if test $? -gt 0; then if test x"${interactive}" = x"yes"; then notice "Pick a unique snapshot name from this list: "