summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/wget.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-19 14:32:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-22 12:03:02 +0000
commit9d7f8e2a206f8266fd0766b6161dbd1bf6b787a7 (patch)
tree2002648fd17558c7d895d672aa65fa46f4b82250 /bitbake/lib/bb/fetch2/wget.py
parent4acc7322a2ada941b803e1aee23d84351888eef0 (diff)
downloadpoky-9d7f8e2a206f8266fd0766b6161dbd1bf6b787a7.tar.gz
bitbake: fetch2: Stop passing around the pointless url parameter
There is no good reason to keep passing around the url parameter when its contained within urldata (ud). This is left around due to legacy reasons, some functions take it, some don't and its time to cleanup. This is fetcher internal API, there are a tiny number of external users of the internal API (buildhistory and distrodata) which can be fixed up after this change. (Bitbake rev: 6a48474de9505a3700863f31839a7c53c5e18a8d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/wget.py')
-rw-r--r--bitbake/lib/bb/fetch2/wget.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 131016ce89..00732019ed 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -37,7 +37,7 @@ from bb.fetch2 import runfetchcmd
37 37
38class Wget(FetchMethod): 38class Wget(FetchMethod):
39 """Class to fetch urls via 'wget'""" 39 """Class to fetch urls via 'wget'"""
40 def supports(self, url, ud, d): 40 def supports(self, ud, d):
41 """ 41 """
42 Check to see if a given url can be fetched with wget. 42 Check to see if a given url can be fetched with wget.
43 """ 43 """
@@ -58,7 +58,7 @@ class Wget(FetchMethod):
58 58
59 ud.localfile = data.expand(urllib.unquote(ud.basename), d) 59 ud.localfile = data.expand(urllib.unquote(ud.basename), d)
60 60
61 def download(self, uri, ud, d, checkonly = False): 61 def download(self, ud, d, checkonly = False):
62 """Fetch urls""" 62 """Fetch urls"""
63 63
64 basecmd = d.getVar("FETCHCMD_wget", True) or "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate" 64 basecmd = d.getVar("FETCHCMD_wget", True) or "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate"
@@ -76,7 +76,7 @@ class Wget(FetchMethod):
76 else: 76 else:
77 fetchcmd = d.getVar("FETCHCOMMAND_wget", True) or d.expand(basecmd + " -P ${DL_DIR} '${URI}'") 77 fetchcmd = d.getVar("FETCHCOMMAND_wget", True) or d.expand(basecmd + " -P ${DL_DIR} '${URI}'")
78 78
79 uri = uri.split(";")[0] 79 uri = ud.url.split(";")[0]
80 80
81 fetchcmd = fetchcmd.replace("${URI}", uri.split(";")[0]) 81 fetchcmd = fetchcmd.replace("${URI}", uri.split(";")[0])
82 fetchcmd = fetchcmd.replace("${FILE}", ud.basename) 82 fetchcmd = fetchcmd.replace("${FILE}", ud.basename)
@@ -93,5 +93,5 @@ class Wget(FetchMethod):
93 93
94 return True 94 return True
95 95
96 def checkstatus(self, uri, ud, d): 96 def checkstatus(self, ud, d):
97 return self.download(uri, ud, d, True) 97 return self.download(ud, d, True)