From patchwork Thu Oct 10 16:40:16 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: 20949 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 629B525C9D for ; Thu, 10 Oct 2013 16:41:02 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id w8sf705983qac.6 for ; Thu, 10 Oct 2013 09:41:02 -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=Bv9L7tihfLkSRRiSbsNpMajgK9UC4r3xK0DEfAcORQ4=; b=cf53T2JN+uNOC2/Kv1sb+a7Qf5Dr91brD/B3hc9KJHyc3TQPp9zMlPFiGzR0DenJhc S9PXuFVxncRcBqdhpbkNx/MBYUO42DLlXQE4Rwr/ToREl31DstimKZq1d+V1Iu5pV19v z9XlcmBQPnHCfao25D6mjrxA7RVtRDJL7+frdT7zuzIrc7bJ7r3PaD8jwZjQKqw8Gyg8 oLTaO1sw6LAaRytP9wIJrhz9XDUx3056ar4tX0UGIxJfNmx3I0ps5nB55TqzBh9gMcaw Jpxq1BB6BQZh2iZZN+X5CqiNvfCr2Sx6+oOLkDw0fl6Ir6dmIeLGjtuWBdtnYxOE/GVW gJuw== X-Received: by 10.236.135.79 with SMTP id t55mr14066570yhi.39.1381423262200; Thu, 10 Oct 2013 09:41:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.16.200 with SMTP id i8ls1222127qed.65.gmail; Thu, 10 Oct 2013 09:41:02 -0700 (PDT) X-Received: by 10.52.111.10 with SMTP id ie10mr7459100vdb.56.1381423261990; Thu, 10 Oct 2013 09:41:01 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id fx4si14576694vdc.65.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 09:41:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 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.169; Received: by mail-vc0-f169.google.com with SMTP id ib11so1886936vcb.28 for ; Thu, 10 Oct 2013 09:41:01 -0700 (PDT) X-Gm-Message-State: ALoCoQk7a6VbcODqvDZeZmpl7YOxw3M3jRAiHybwuzxWohNzi+I5wxoWN3TlybH9tErj+kI90PaU X-Received: by 10.52.37.69 with SMTP id w5mr9350204vdj.32.1381423261859; Thu, 10 Oct 2013 09:41:01 -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 u4csp391037vcz; Thu, 10 Oct 2013 09:41:01 -0700 (PDT) X-Received: by 10.43.132.137 with SMTP id hu9mr1256933icc.72.1381423261180; Thu, 10 Oct 2013 09:41:01 -0700 (PDT) Received: from mail-ie0-f172.google.com (mail-ie0-f172.google.com [209.85.223.172]) by mx.google.com with ESMTPS id hg13si8108661igb.52.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 09:41:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.223.172 is neither permitted nor denied by best guess record for domain of ryan.arnold@linaro.org) client-ip=209.85.223.172; Received: by mail-ie0-f172.google.com with SMTP id x13so5832580ief.3 for ; Thu, 10 Oct 2013 09:40:59 -0700 (PDT) X-Received: by 10.43.93.5 with SMTP id bs5mr8485705icc.32.1381423259799; Thu, 10 Oct 2013 09:40:59 -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 ka5sm14021465igb.2.1969.12.31.16.00.00 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Thu, 10 Oct 2013 09:40:59 -0700 (PDT) From: "Ryan S. Arnold" To: Rob Savoye Cc: patches@linaro.org, "Ryan S. Arnold" Subject: [PATCH][cbuild2 4/4] Remove ${dir} specific md5sums files. Date: Thu, 10 Oct 2013 11:40:16 -0500 Message-Id: <1381423216-21180-5-git-send-email-ryan.arnold@linaro.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1381423216-21180-1-git-send-email-ryan.arnold@linaro.org> References: <1381423216-21180-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.220.169 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 ${dir}/ specific md5sums files are redundant with the snapshots/md5sums file and should be removed. This includes the testcode/md5sums files. --- lib/common.sh | 2 +- lib/fetch.sh | 14 +++++++------- lib/testcode.sh | 12 ++++-------- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/lib/common.sh b/lib/common.sh index ae2bd6b..01d35dc 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -322,7 +322,7 @@ find_snapshot() #fetch_rsync ${remote_snapshots}/md5sums # Search for the snapshot in the md5sum file, and filter out anything we don't want. - snapshot="`grep $1 ${local_snapshots}/${dir}md5sums | egrep -v "\.asc|\.diff|\.txt|xdelta" | cut -d ' ' -f 3`" + snapshot="`grep $1 ${local_snapshots}/md5sums | egrep -v "\.asc|\.diff|\.txt|xdelta" | cut -d ' ' -f 3`" if test x"${snapshot}" != x; then if test `echo "${snapshot}" | grep -c $1` -gt 1; then error "Too many results for $1!" diff --git a/lib/fetch.sh b/lib/fetch.sh index 70dcd64..d2e5d72 100755 --- a/lib/fetch.sh +++ b/lib/fetch.sh @@ -33,12 +33,12 @@ fetch() if test x"$1" = x"md5sums"; then # Move the existing file to force a fresh copy to be downloaded. # Otherwise this file can get stale, and new tarballs not found. - if test -f ${local_snapshots}/${dir}md5sums; then - cp -f ${local_snapshots}/${dir}md5sums ${local_snapshots}/${dir}md5sums.bak + if test -f ${local_snapshots}/md5sums; then + cp -f ${local_snapshots}/md5sums ${local_snapshots}/md5sums.bak fi - fetch_http ${dir}md5sums - if test ! -s ${dir}md5sums; then - cp -f ${local_snapshots}/${dir}md5sums.bak ${local_snapshots}/${dir}md5sums + fetch_http md5sums + if test ! -s md5sums; then + cp -f ${local_snapshots}/md5sums.bak ${local_snapshots}/md5sums fi return $? fi @@ -175,7 +175,7 @@ check_md5sum() local getfile=`echo ${1}` newsum="`md5sum ${local_snapshots}/$1 | cut -d ' ' -f 1`" - oldsum="`grep ${getfile} ${local_snapshots}/${dir}md5sums | cut -d ' ' -f 1`" + oldsum="`grep ${getfile} ${local_snapshots}/md5sums | cut -d ' ' -f 1`" # if there isn't an entry in the md5sum file, we're probably downloading # something else that's less critical. if test x"${oldsum}" = x; then @@ -215,7 +215,7 @@ extract() fi if test `echo $1 | egrep -c "\.gz|\.bz2|\.xz"` -eq 0; then - local file="`grep $1 ${local_snapshots}/${dir}md5sums | egrep -v "\.asc|\.txt" | cut -d ' ' -f 3 | cut -d '/' -f 2`" + local file="`grep $1 ${local_snapshots}/md5sums | egrep -v "\.asc|\.txt" | cut -d ' ' -f 3 | cut -d '/' -f 2`" else local file="`echo $1 | cut -d '/' -f 2`" fi diff --git a/lib/testcode.sh b/lib/testcode.sh index 1605f01..3d56b90 100644 --- a/lib/testcode.sh +++ b/lib/testcode.sh @@ -4,19 +4,15 @@ testcode() { - # force downloading the md5sum file, as it changes frequently - rm -f ${local_snapshots}/testcode/md5sums - fetch_http testcode/md5sums - rm -f ${local_snapshots}/testcode/ChangeLog fetch_http testcode/ChangeLog - if test -f ${local_snapshots}/testcode/md5sums; then - files="`cat ${local_snapshots}/testcode/md5sums | cut -d ' ' -f3`" + if test -f ${local_snapshots}/md5sums; then + files="`grep testcode ${local_snapshots}/md5sums | cut -d ' ' -f3`" for i in ${files}; do - build testcode/$i + build $i if test $? -gt 0; then - error "Couldn't build testcode/$i!" + error "Couldn't build $i!" return 1 fi done