From patchwork Fri Oct 18 20:52:57 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: 21187 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6CBEC202E6 for ; Fri, 18 Oct 2013 20:53:51 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id wm4sf11128071obc.4 for ; Fri, 18 Oct 2013 13:53:50 -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=r03xH8eKS2fXQxBJSFPvGNeolFUKhQ+RJCex7JZgBvI=; b=GRhX9WETUsAMQqRwL3mNShdLQ9nXZN95ZzkCKzvZ7OF48bn8kzbIa/7vwr8KL5tVBj nabtAtDyhoug0OieOZGFfL0jhL34/H97KiJR7E0InzwhKjL8fd4zl3FXbuwCTOigTZie FPMto9EPnp8yzfS+yWJuBX6QKdcyq9XUzWCv+lZ++tQM7lHB8ntJvY3ZbbN57vWgjqLF KatAn3jQYS5kk49j2j8J1jyAf8i7ZwoSydsG+6T5biKUXpfaMa9enHPz66yeiBtCW1nU vXtVanS3xFyeoOwk8z0hXNVPqWlijM9IL3wVQZPlr5anhcO49uNcsBnkP4AQo9y/4dkS l12A== X-Received: by 10.182.87.2 with SMTP id t2mr1929773obz.2.1382129630883; Fri, 18 Oct 2013 13:53:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.63.37 with SMTP id d5ls1392055qes.17.gmail; Fri, 18 Oct 2013 13:53:50 -0700 (PDT) X-Received: by 10.58.66.233 with SMTP id i9mr209226vet.29.1382129630742; Fri, 18 Oct 2013 13:53:50 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id dt10si663239vdb.138.2013.10.18.13.53.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 13:53:50 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.52; Received: by mail-vb0-f52.google.com with SMTP id f12so2091702vbg.39 for ; Fri, 18 Oct 2013 13:53:50 -0700 (PDT) X-Gm-Message-State: ALoCoQkcfcBMM5eU7ff09NKIx4TbHKwgdhZVjzHaLy0nww7AzerCB3BAkKGGsoBAg1Q7XrnXg8fZ X-Received: by 10.58.168.205 with SMTP id zy13mr2783194veb.19.1382129630638; Fri, 18 Oct 2013 13:53:50 -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 u4csp63344vcz; Fri, 18 Oct 2013 13:53:50 -0700 (PDT) X-Received: by 10.43.48.7 with SMTP id uu7mr293864icb.68.1382129630043; Fri, 18 Oct 2013 13:53:50 -0700 (PDT) Received: from mail-ie0-f170.google.com (mail-ie0-f170.google.com [209.85.223.170]) by mx.google.com with ESMTPS id o1si3368997icn.58.2013.10.18.13.53.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 13:53:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.223.170 is neither permitted nor denied by best guess record for domain of ryan.arnold@linaro.org) client-ip=209.85.223.170; Received: by mail-ie0-f170.google.com with SMTP id at1so7571798iec.1 for ; Fri, 18 Oct 2013 13:53:49 -0700 (PDT) X-Received: by 10.50.109.132 with SMTP id hs4mr985727igb.34.1382129629610; Fri, 18 Oct 2013 13:53:49 -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.48 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 18 Oct 2013 13:53:49 -0700 (PDT) From: "Ryan S. Arnold" To: Rob Savoye Cc: patches@linaro.org, "Ryan S. Arnold" Subject: [PATCH][Cbuildv2/get_source 15/17] lib/common.sh: Fix so that get_URL works for .git@revision. Date: Fri, 18 Oct 2013 15:52:57 -0500 Message-Id: <1382129579-5777-16-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.212.52 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 get_URL function was only working properly for .git/ and .git/branch@revision. --- lib/common.sh | 4 +++- testsuite/test.sh | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/common.sh b/lib/common.sh index f681d28..0cbc532 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -104,7 +104,9 @@ get_URL() # trace "$*" local srcs="${sources_conf}" - local node="`echo $1 | cut -d '/' -f 1`" + # account for .git/@ and + # account for .git@ + local node="`echo $1 | cut -d '/' -f 1 | cut -d '@' -f 1`" local branch="`echo $1 | cut -d '/' -f 2 | cut -d '@' -f 1`" if test x"${branch}" = x"${node}"; then local branch= diff --git a/testsuite/test.sh b/testsuite/test.sh index e570c50..2cd79d5 100755 --- a/testsuite/test.sh +++ b/testsuite/test.sh @@ -363,11 +363,10 @@ fi in="newlib.git@e9a210b" out="`get_source ${in}`" if test x"${out}" = x"git://git.linaro.org/toolchain/newlib.git e9a210b"; then - pass "get_source: git repository with commit" + pass "get_source: .git@commit" else - fail "get_source: git repository with commit" + fail "get_source: .git@commit" fixme "get_source returned ${out}" - fixme "should return git://git.linaro.org/toolchain/newlib.git e9a210b" fi in="gcc-linaro-4.8-2013.05.tar.bz2"