Fix 'xbps-src -u fetch' if distfiles already exist.
--HG-- extra : convert_revision : 4e85b3f14dc4c8f887d79cc1d3ab2d7813ced637
This commit is contained in:
parent
dfeb2f4143
commit
a083feb8ff
1 changed files with 9 additions and 4 deletions
|
@ -71,9 +71,15 @@ fetch_distfiles()
|
||||||
#
|
#
|
||||||
[ "$build_style" = "meta-template" ] && return 0
|
[ "$build_style" = "meta-template" ] && return 0
|
||||||
|
|
||||||
|
cd $XBPS_SRCDISTDIR
|
||||||
for f in ${distfiles}; do
|
for f in ${distfiles}; do
|
||||||
curfile=$(basename $f)
|
curfile=$(basename $f)
|
||||||
if [ -f "$XBPS_SRCDISTDIR/$curfile" ]; then
|
if [ -f "$XBPS_SRCDISTDIR/$curfile" ]; then
|
||||||
|
if [ -n "$upcksum" ]; then
|
||||||
|
fetch_update_cksum $curfile
|
||||||
|
run_template $pkgname
|
||||||
|
fi
|
||||||
|
|
||||||
for i in ${checksum}; do
|
for i in ${checksum}; do
|
||||||
if [ $dfcount -eq $ckcount -a -n $i ]; then
|
if [ $dfcount -eq $ckcount -a -n $i ]; then
|
||||||
cksum=$i
|
cksum=$i
|
||||||
|
@ -105,8 +111,7 @@ fetch_distfiles()
|
||||||
localurl="$url/$curfile"
|
localurl="$url/$curfile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
$fetch_cmd $localurl
|
||||||
cd $XBPS_SRCDISTDIR && $fetch_cmd $localurl
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
unset localurl
|
unset localurl
|
||||||
if [ ! -f $XBPS_SRCDISTDIR/$curfile ]; then
|
if [ ! -f $XBPS_SRCDISTDIR/$curfile ]; then
|
||||||
|
@ -118,8 +123,8 @@ fetch_distfiles()
|
||||||
unset localurl
|
unset localurl
|
||||||
|
|
||||||
if [ -n "$upcksum" ]; then
|
if [ -n "$upcksum" ]; then
|
||||||
fetch_update_cksum $f
|
fetch_update_cksum $curfile
|
||||||
break
|
run_template $pkgname
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue