From patchwork Fri Oct 18 20:52:44 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: 21174 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CDEBF202E6 for ; Fri, 18 Oct 2013 20:53:36 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id fa1sf7262952pad.9 for ; Fri, 18 Oct 2013 13:53:36 -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=KO4T6uMh1LCSAmJ0NZ5JFznGJabFV03f37G4qTerUkU=; b=i9/LZTi76RwU+P2NJPlMxRG2/ZbNDZouc7VKzclYd5SbSj0jtEmbEo3qPlbtRiLxWd y+0I70XyXrtlhMQVhUK3fPRSL91i8cd/lBd6GWpnQHneEdU5VuBVJThnFFZxrfnRsxv+ 7TMiohQyT8lnx/G9ORaLi/DqGEg9FnJIv9SRNUixesRas2gxNfosFuXWqay7rnU3l71z wFW7vCp166MI1RzHtPwB7K/71CYZ0NNo5ovAmKyE+wKg0D+hSRbcU4lE0aFt74SvknHW bqk54cI4zX6Z5wRIRpjx9bpeaMad3l7dkGnFMHYGAhuQOxewrSqK1QqRUXFd0c3PCX6v AlLg== X-Received: by 10.66.250.233 with SMTP id zf9mr1995381pac.12.1382129615997; Fri, 18 Oct 2013 13:53:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.132.132 with SMTP id ou4ls1434514qeb.20.gmail; Fri, 18 Oct 2013 13:53:35 -0700 (PDT) X-Received: by 10.220.186.202 with SMTP id ct10mr3508786vcb.14.1382129615784; Fri, 18 Oct 2013 13:53:35 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id uw4si679197vec.1.2013.10.18.13.53.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 13:53:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.171 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.171; Received: by mail-ve0-f171.google.com with SMTP id c14so2348272vea.16 for ; Fri, 18 Oct 2013 13:53:35 -0700 (PDT) X-Gm-Message-State: ALoCoQmOvriwtIADzbirBh/kEMjYiq0v2bGBu+Q71JX++RmiRWpA1we85t5UosP5E0ikxvTuVchC X-Received: by 10.58.208.130 with SMTP id me2mr3438397vec.13.1382129615648; Fri, 18 Oct 2013 13:53:35 -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 u4csp63323vcz; Fri, 18 Oct 2013 13:53:35 -0700 (PDT) X-Received: by 10.50.119.4 with SMTP id kq4mr983900igb.40.1382129615092; Fri, 18 Oct 2013 13:53:35 -0700 (PDT) Received: from mail-ie0-f169.google.com (mail-ie0-f169.google.com [209.85.223.169]) by mx.google.com with ESMTPS id n15si8554078igi.44.2013.10.18.13.53.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 13:53:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.223.169 is neither permitted nor denied by best guess record for domain of ryan.arnold@linaro.org) client-ip=209.85.223.169; Received: by mail-ie0-f169.google.com with SMTP id ar20so7627942iec.0 for ; Fri, 18 Oct 2013 13:53:34 -0700 (PDT) X-Received: by 10.50.16.65 with SMTP id e1mr905220igd.19.1382129614451; Fri, 18 Oct 2013 13:53:34 -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.33 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Fri, 18 Oct 2013 13:53:33 -0700 (PDT) From: "Ryan S. Arnold" To: Rob Savoye Cc: patches@linaro.org, "Ryan S. Arnold" Subject: [PATCH][Cbuildv2/get_source 02/17] lib/checkout.sh: checkout should use get_srcdir to reuse code. Date: Fri, 18 Oct 2013 15:52:44 -0500 Message-Id: <1382129579-5777-3-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.171 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" This also required that get_srcdir knows how to return the srcdir for eglibc before it's installed and once it's installed (since it's actually in the eglibc.git/libc directory. --- config/gcc.conf | 1 + lib/checkout.sh | 3 +-- lib/common.sh | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/config/gcc.conf b/config/gcc.conf index 4cb72f8..0ef697f 100644 --- a/config/gcc.conf +++ b/config/gcc.conf @@ -7,6 +7,7 @@ installs="gcc" # This is a file that gets installed that is used to determine if the toolchain # component is already installed. latest="gcc.git/linaro-4.8-branch" +#latest="gcc.git" # If yes, only static linking will be used static_link=no diff --git a/lib/checkout.sh b/lib/checkout.sh index 9842e69..919f8a1 100644 --- a/lib/checkout.sh +++ b/lib/checkout.sh @@ -32,8 +32,7 @@ checkout() fi fi - local dir="`echo $1 | sed -e "s:^.*/${tool}.git:${tool}.git:" -e 's:/:-:'`" - local srcdir="${local_snapshots}/${dir}" + srcdir="`get_srcdir $1`" notice "Checking out sources for $1 into ${srcdir}" case $1 in diff --git a/lib/common.sh b/lib/common.sh index e4ec97d..e6655a1 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -482,7 +482,15 @@ get_srcdir() eglibc*) # Eglibc has no top level configure script, it's in the libc # subdirectory. - local srcdir="${srcdir}${branch}${revision}/libc" + if test ! -d "${srcdir}${branch}${revision}/libc"; then + # If the directory does not yet exist the caller wants to know + # where to put the eglibc sources. + local srcdir="${srcdir}${branch}${revision}" + else + # If the directory already exists the caller wants to know + # where the sources are. + local srcdir="${srcdir}${branch}${revision}/libc" + fi ;; # binutils*) # local srcdir="${srcdir}${branch}${revision}"