From patchwork Tue Oct 22 18:50:43 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: 21221 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f71.google.com (mail-vb0-f71.google.com [209.85.212.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 284A7244B2 for ; Tue, 22 Oct 2013 18:50:55 +0000 (UTC) Received: by mail-vb0-f71.google.com with SMTP id x16sf16686014vbf.6 for ; Tue, 22 Oct 2013 11:50:55 -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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=yGW7WsQ3+HwxHyOWGwP5aSlmCDK6sOBtCrzJ6WVQDRA=; b=B2XOMK2T3XFrq/ez1hJImfQbV+HnYmIYA+DHSgmuo0rcj/NQWtvz3HgFYfyZ1iBL5j 6jOQ/XLDOPce80+ov313DgGJ0Vd9dH9X37cBCBeiZnqQvkc7zkyRm0PHAj+AtjFEAL61 XOmQ0FIxB94h+2EjwtmxHBnN8HvIOBIgJPk0L3VEHhd8Ak+sk+UDJJDFtxyeR+7pjFer H/STOmmAwcDa4OsHxShCLessPcH4+CghcltcoV86audGzqGajWB1Mk54krlflU/k32D6 xqFb1L1cYKxRpCJVunc8iyUnHxaTNXENw0eJUUpcfZ7Pfib0AQswzu04IqrTlMup1HFI HUGQ== X-Received: by 10.236.90.67 with SMTP id d43mr24693209yhf.36.1382467855139; Tue, 22 Oct 2013 11:50:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.94.114 with SMTP id db18ls184087qeb.66.gmail; Tue, 22 Oct 2013 11:50:55 -0700 (PDT) X-Received: by 10.58.178.239 with SMTP id db15mr9080570vec.9.1382467855014; Tue, 22 Oct 2013 11:50:55 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id ks3si2998389vec.127.2013.10.22.11.50.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Oct 2013 11:50:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.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.220.179; Received: by mail-vc0-f179.google.com with SMTP id hz11so1536417vcb.38 for ; Tue, 22 Oct 2013 11:50:54 -0700 (PDT) X-Gm-Message-State: ALoCoQkfa+IJTjGfYRGy1kka1/+nGdBtFiCD807k69tNfPv7o3rsC18XgMZSaX3JklgxEIsLidD6 X-Received: by 10.220.10.70 with SMTP id o6mr55104vco.45.1382467854836; Tue, 22 Oct 2013 11:50:54 -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 u4csp252474vcz; Tue, 22 Oct 2013 11:50:54 -0700 (PDT) X-Received: by 10.50.66.101 with SMTP id e5mr14786145igt.26.1382467853374; Tue, 22 Oct 2013 11:50:53 -0700 (PDT) Received: from mail-ie0-f171.google.com (mail-ie0-f171.google.com [209.85.223.171]) by mx.google.com with ESMTPS id t5si2530196igz.8.2013.10.22.11.50.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Oct 2013 11:50:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.223.171 is neither permitted nor denied by best guess record for domain of ryan.arnold@linaro.org) client-ip=209.85.223.171; Received: by mail-ie0-f171.google.com with SMTP id tp5so2555362ieb.30 for ; Tue, 22 Oct 2013 11:50:52 -0700 (PDT) X-Received: by 10.50.97.7 with SMTP id dw7mr14853554igb.2.1382467852287; Tue, 22 Oct 2013 11:50:52 -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 q6sm4973024igi.0.2013.10.22.11.50.50 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Tue, 22 Oct 2013 11:50:51 -0700 (PDT) From: "Ryan S. Arnold" To: Rob Savoye Cc: patches@linaro.org, "Ryan S. Arnold" Subject: [PATCH][Cbuildv2/symlinks] lib/fetch.sh: Move tar unpacking to before symlink creation. Date: Tue, 22 Oct 2013 13:50:43 -0500 Message-Id: <1382467843-26810-1-git-send-email-ryan.arnold@linaro.org> X-Mailer: git-send-email 1.8.3.1 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.220.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 build system is erroneously adding symlinks for packages that don't need it. Moving the symlink creation to after the untar fixes the problem. I tested this using binutils-linaro-2.23.2-2013.06.tar.bz2 which erroneously unpacks to binutils-2.23, i.e., the unpacked named doesn't match the tar name. I also tested with binutils-linaro-2.23.2-2013.10-4.tar.bz2, which is known to unpack correctly. In both cases the symlinks to binutils (if necessary) were created correctly, and the spurious symlinks in infrastructure/ were NOT created. Note, this patch is in the symlinks branch. --- lib/fetch.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/fetch.sh b/lib/fetch.sh index 4a9da8b..bad5a3d 100755 --- a/lib/fetch.sh +++ b/lib/fetch.sh @@ -249,6 +249,14 @@ extract() *) ;; esac + if test -d `echo ${local_snapshots}/${dir}${file} | sed -e 's:.tar.*::'` -a x"${force}" = xno; then + notice "${local_snapshots}/${file} is already extracted!" + return 0 + else + local taropts="${taropt}xf" + tar ${taropts} ${local_snapshots}/${dir}${file} -C ${local_snapshots}/${dir} + fi + # FIXME: this is hopefully is temporary hack for tarballs where the directory # name versions doesn't match the tarball version. This means it's missing the # -linaro-VERSION.YYYY.MM part. @@ -264,14 +272,6 @@ extract() fi fi - if test -d `echo ${local_snapshots}/${dir}${file} | sed -e 's:.tar.*::'` -a x"${force}" = xno; then - notice "${local_snapshots}/${file} is already extracted!" - return 0 - else - local taropts="${taropt}xf" - tar ${taropts} ${local_snapshots}/${dir}${file} -C ${local_snapshots}/${dir} - fi - touch ${local_builds}/stamp-extract-${file} return 0