[bitbake-devel] [PATCH 3/3] fetch2/wget: Fix authentication in checkstatus() of the wget fetcher

Stefan Klug stefan.klug at baslerweb.com
Mon Mar 18 13:58:20 UTC 2019


I wonder how this used to work for anybody.

Signed-off-by: Stefan Klug <stefan.klug at baslerweb.com>
---
 lib/bb/fetch2/wget.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py
index e2037511..3addb219 100644
--- a/lib/bb/fetch2/wget.py
+++ b/lib/bb/fetch2/wget.py
@@ -322,8 +322,8 @@ class Wget(FetchMethod):
                 authheader =  "Basic %s" % encodeuser
                 r.add_header("Authorization", authheader)
 
-            if ud.user:
-                add_basic_auth(ud.user, r)
+            if ud.user and ud.pswd:
+                add_basic_auth(ud.user + ':' + ud.pswd, r)
 
             try:
                 import netrc, urllib.parse
-- 




More information about the bitbake-devel mailing list