wget.py: Change the wget fetcher failure handling to avoid lockfile problems
authorRichard Purdie <rpurdie@linux.intel.com>
Sat, 12 Jan 2008 18:40:48 +0000 (18:40 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Sat, 12 Jan 2008 18:40:48 +0000 (18:40 +0000)
ChangeLog
lib/bb/fetch/wget.py

index 963d685..1b1a9f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,7 @@ Changes in BitBake 1.8.x:
        - Fix shell showdata command (#3259)
        - Fix shell data updating problems (#1880)
        - Properly raise errors for invalid source URI protocols
+       - Change the wget fetcher failure handling to avoid lockfile problems
 
 Changes in Bitbake 1.8.8:
        - Rewrite svn fetcher to make adding extra operations easier 
index 2d590ad..f8ade45 100644 (file)
@@ -66,10 +66,10 @@ class Wget(Fetch):
             if ret != 0:
                 return False
 
-            # check if sourceforge did send us to the mirror page
+            # Sanity check since wget can pretend it succeed when it didn't
+            # Also, this used to happen if sourceforge sent us to the mirror page
             if not os.path.exists(ud.localpath):
-                os.system("rm %s*" % ud.localpath) # FIXME shell quote it
-                bb.msg.debug(2, bb.msg.domain.Fetcher, "sourceforge.net send us to the mirror on %s" % ud.basename)
+                bb.msg.debug(2, bb.msg.domain.Fetcher, "The fetch command for %s returned success but %s doesn't exist?..." % (uri, ud.localpath))
                 return False
 
             return True