From 610b53fcb9888496826ba96fa68d50c41a444c13 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 5 Nov 2008 10:31:40 +0000 Subject: bitbake: Optionally take username/password options from url parameters --- bitbake-dev/lib/bb/fetch/__init__.py | 4 ++++ bitbake/lib/bb/fetch/__init__.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/bitbake-dev/lib/bb/fetch/__init__.py b/bitbake-dev/lib/bb/fetch/__init__.py index e6b2851b91..9ca5556089 100644 --- a/bitbake-dev/lib/bb/fetch/__init__.py +++ b/bitbake-dev/lib/bb/fetch/__init__.py @@ -315,6 +315,10 @@ class FetchData(object): (self.type, self.host, self.path, self.user, self.pswd, self.parm) = bb.decodeurl(data.expand(url, d)) self.date = Fetch.getSRCDate(self, d) self.url = url + if not self.user and "user" in self.parm: + self.user = self.parm["user"] + if not self.pswd and "pswd" in self.parm: + self.pswd = self.parm["pswd"] self.setup = False for m in methods: if m.supports(url, self, d): diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index e6b2851b91..9ca5556089 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py @@ -315,6 +315,10 @@ class FetchData(object): (self.type, self.host, self.path, self.user, self.pswd, self.parm) = bb.decodeurl(data.expand(url, d)) self.date = Fetch.getSRCDate(self, d) self.url = url + if not self.user and "user" in self.parm: + self.user = self.parm["user"] + if not self.pswd and "pswd" in self.parm: + self.pswd = self.parm["pswd"] self.setup = False for m in methods: if m.supports(url, self, d): -- cgit 1.2.3-korg