From 9d7f8e2a206f8266fd0766b6161dbd1bf6b787a7 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 19 Nov 2013 14:32:08 +0000 Subject: 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 --- bitbake/lib/bb/fetch2/wget.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bitbake/lib/bb/fetch2/wget.py') 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 class Wget(FetchMethod): """Class to fetch urls via 'wget'""" - def supports(self, url, ud, d): + def supports(self, ud, d): """ Check to see if a given url can be fetched with wget. """ @@ -58,7 +58,7 @@ class Wget(FetchMethod): ud.localfile = data.expand(urllib.unquote(ud.basename), d) - def download(self, uri, ud, d, checkonly = False): + def download(self, ud, d, checkonly = False): """Fetch urls""" 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): else: fetchcmd = d.getVar("FETCHCOMMAND_wget", True) or d.expand(basecmd + " -P ${DL_DIR} '${URI}'") - uri = uri.split(";")[0] + uri = ud.url.split(";")[0] fetchcmd = fetchcmd.replace("${URI}", uri.split(";")[0]) fetchcmd = fetchcmd.replace("${FILE}", ud.basename) @@ -93,5 +93,5 @@ class Wget(FetchMethod): return True - def checkstatus(self, uri, ud, d): - return self.download(uri, ud, d, True) + def checkstatus(self, ud, d): + return self.download(ud, d, True) -- cgit v1.2.3-54-g00ecf