Patchwork [bitbake-devel] bitbake/fetch2/wget: Remove unnecessary use of OVERRIDES

login
register
mail settings
Submitter Richard Purdie
Date May 4, 2012, 5:26 p.m.
Message ID <1336152360.23777.28.camel@ted>
Download mbox | patch
Permalink /patch/27083/
State New
Headers show

Comments

Richard Purdie - May 4, 2012, 5:26 p.m.
This allows some simplifications of the function and is slightly faster.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---

Patch

diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index d3be069..89bf57b 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -55,12 +55,12 @@  class Wget(FetchMethod):
 
         def fetch_uri(uri, ud, d):
             if checkonly:
-                fetchcmd = data.getVar("CHECKCOMMAND", d, True)
+                fetchcmd = data.getVar("CHECKCOMMAND_wget", d, True)
             elif os.path.exists(ud.localpath):
                 # file exists, but we didnt complete it.. trying again..
-                fetchcmd = data.getVar("RESUMECOMMAND", d, True)
+                fetchcmd = data.getVar("RESUMECOMMAND_wget", d, True)
             else:
-                fetchcmd = data.getVar("FETCHCOMMAND", d, True)
+                fetchcmd = data.getVar("FETCHCOMMAND_wget", d, True)
 
             uri = uri.split(";")[0]
             uri_decoded = list(decodeurl(uri))
@@ -80,10 +80,6 @@  class Wget(FetchMethod):
             if not os.path.exists(ud.localpath) and not checkonly:
                 raise FetchError("The fetch command returned success for url %s but %s doesn't exist?!" % (uri, ud.localpath), uri)
 
-        localdata = data.createCopy(d)
-        data.setVar('OVERRIDES', "wget:" + data.getVar('OVERRIDES', localdata), localdata)
-        data.update_data(localdata)
-
         fetch_uri(uri, ud, localdata)
         
         return True