summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-30 11:42:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-29 15:12:33 +0100
commit32a249cf33f79b579a2cf6224c7d23cdb20d376f (patch)
tree890d5df75fdb8d7161e45facafd38d64a0aa08dc
parent887ea6d25cee5114365dfbf1130603599e13ee80 (diff)
downloadbitbake-32a249cf33f79b579a2cf6224c7d23cdb20d376f.tar.gz
wget: Fix handling of urls with user/password
URL decoding was improved in the core a while ago and this looks like a leftover from those times which caused urls needing a user/password to fail. Use the parameters from the core instead of the broken split implementation. [YOCTO #11262] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/wget.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py
index ecb946aa8..23d48acb0 100644
--- a/lib/bb/fetch2/wget.py
+++ b/lib/bb/fetch2/wget.py
@@ -108,9 +108,8 @@ class Wget(FetchMethod):
bb.utils.mkdirhier(os.path.dirname(dldir + os.sep + ud.localfile))
fetchcmd += " -O " + dldir + os.sep + ud.localfile
- if ud.user:
- up = ud.user.split(":")
- fetchcmd += " --user=%s --password=%s --auth-no-challenge" % (up[0],up[1])
+ if ud.user and ud.pswd:
+ fetchcmd += " --user=%s --password=%s --auth-no-challenge" % (ud.user, ud.pswd)
uri = ud.url.split(";")[0]
if os.path.exists(ud.localpath):