From a083feb8ff4ed8a4312960fd0ce9a83cda7eed63 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 3 Apr 2009 20:30:33 +0200 Subject: [PATCH] Fix 'xbps-src -u fetch' if distfiles already exist. --HG-- extra : convert_revision : 4e85b3f14dc4c8f887d79cc1d3ab2d7813ced637 --- shutils/fetch_funcs.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/shutils/fetch_funcs.sh b/shutils/fetch_funcs.sh index 718fec2382c..519ddfec3f1 100644 --- a/shutils/fetch_funcs.sh +++ b/shutils/fetch_funcs.sh @@ -71,9 +71,15 @@ fetch_distfiles() # [ "$build_style" = "meta-template" ] && return 0 + cd $XBPS_SRCDISTDIR for f in ${distfiles}; do curfile=$(basename $f) if [ -f "$XBPS_SRCDISTDIR/$curfile" ]; then + if [ -n "$upcksum" ]; then + fetch_update_cksum $curfile + run_template $pkgname + fi + for i in ${checksum}; do if [ $dfcount -eq $ckcount -a -n $i ]; then cksum=$i @@ -105,8 +111,7 @@ fetch_distfiles() localurl="$url/$curfile" fi - - cd $XBPS_SRCDISTDIR && $fetch_cmd $localurl + $fetch_cmd $localurl if [ $? -ne 0 ]; then unset localurl if [ ! -f $XBPS_SRCDISTDIR/$curfile ]; then @@ -118,8 +123,8 @@ fetch_distfiles() unset localurl if [ -n "$upcksum" ]; then - fetch_update_cksum $f - break + fetch_update_cksum $curfile + run_template $pkgname fi #