bitbake: fetch2/wget: Fix for mixed-up wget commands
authorCristian Iorga <cristian.iorga@intel.com>
Mon, 26 Nov 2012 17:54:22 +0000 (19:54 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 26 Nov 2012 20:57:30 +0000 (20:57 +0000)
wget commands for check and resume were
mixed-up, leading to the following issues:

1. long running "NOTE: Preparing runqueue"
reason: objects were downloaded, not spidered on the mirror
2. Failing network test in Build Appliance, because wget 1.14
(in use in BA) will fail if a file already exists.
During the network connectivity test, index.php file was
actually downloaded, not spidered (checked for existence on
yoctoproject.org website), leading to wget failure.

(Bitbake rev: d7a5185cae975eaca50a9785c6605e895dc7bb51)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/fetch2/wget.py

index ea99198..2808df6 100644 (file)
@@ -69,10 +69,10 @@ class Wget(FetchMethod):
             basecmd += " -O ${DL_DIR}/" + ud.localfile
 
         if checkonly:
-            fetchcmd = d.getVar("CHECKCOMMAND_wget", True) or d.expand(basecmd + " -c -P ${DL_DIR} '${URI}'")
+            fetchcmd = d.getVar("CHECKCOMMAND_wget", True) or d.expand(basecmd + " --spider '${URI}'")
         elif os.path.exists(ud.localpath):
             # file exists, but we didnt complete it.. trying again..
-            fetchcmd = d.getVar("RESUMECOMMAND_wget", True) or d.expand(basecmd + " --spider -P ${DL_DIR} '${URI}'")
+            fetchcmd = d.getVar("RESUMECOMMAND_wget", True) or d.expand(basecmd + " -c -P ${DL_DIR} '${URI}'")
         else:
             fetchcmd = d.getVar("FETCHCOMMAND_wget", True) or d.expand(basecmd + " -P ${DL_DIR} '${URI}'")