summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/wget.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index b784afb2e4..9affa0da5f 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -50,7 +50,11 @@ class Wget(FetchMethod):
50 50
51 def urldata_init(self, ud, d): 51 def urldata_init(self, ud, d):
52 52
53 ud.basename = os.path.basename(ud.path) 53 if 'downloadfilename' in ud.parm:
54 ud.basename = ud.parm['downloadfilename']
55 else:
56 ud.basename = os.path.basename(ud.path)
57
54 ud.localfile = data.expand(urllib.unquote(ud.basename), d) 58 ud.localfile = data.expand(urllib.unquote(ud.basename), d)
55 59
56 def download(self, uri, ud, d, checkonly = False): 60 def download(self, uri, ud, d, checkonly = False):
@@ -58,6 +62,9 @@ class Wget(FetchMethod):
58 62
59 basecmd = d.getVar("FETCHCMD_wget", True) or "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate" 63 basecmd = d.getVar("FETCHCMD_wget", True) or "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate"
60 64
65 if 'downloadfilename' in ud.parm:
66 basecmd += " -O ${DL_DIR}/" + ud.localfile
67
61 if checkonly: 68 if checkonly:
62 fetchcmd = d.getVar("CHECKCOMMAND_wget", True) or d.expand(basecmd + " -c -P ${DL_DIR} '${URI}'") 69 fetchcmd = d.getVar("CHECKCOMMAND_wget", True) or d.expand(basecmd + " -c -P ${DL_DIR} '${URI}'")
63 elif os.path.exists(ud.localpath): 70 elif os.path.exists(ud.localpath):