WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: orphan dep files after a failing extension download  (Read 2197 times)

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
orphan dep files after a failing extension download
« 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=""

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: orphan dep files after a failing extension download
« Reply #1 on: October 15, 2011, 01:21:46 AM »
Accepted. Thanks!
10+ Years Contributing to Linux Open Source Projects.