Tiny Core Linux

Tiny Core Base => TCB Bugs => Topic started by: Arslan S. on October 13, 2011, 11:09:06 AM

Title: orphan dep files after a failing extension download
Post by: Arslan S. on October 13, 2011, 11:09:06 AM
tce-load must clean dep file prior to downloading so we don't need to clean these files each time an extension fails to download due to a network problem or an interrupt

by orphan i mean a dep file with no tcz in local extension folder, an orphan dep file causes wget to fail downloading dep file and tce-load operates like the extension has no dep file

here is the fix which removes such a file at the beginning of download process
Quote
--- tce-load.orig
+++ tce-load.new
@@ -209,6 +209,7 @@
    EXTENSION=`basename "$TARGETAPP"`
 
    DEPLIST="$EXTENSION".dep
+   [ -f "$DEPLIST" ] && [ ! -f "$EXTENSION" ] && rm -f "$DEPLIST"
    wget -cq "$MIRROR"/"$DEPLIST" 2>/dev/null
    if [ "$?" == 0 ]; then
       DEPLIST=""
Title: Re: orphan dep files after a failing extension download
Post by: roberts on October 15, 2011, 01:21:46 AM
Accepted. Thanks!