From 7f99605562119a13a2510a3c990e3cf577ad764e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 3 Feb 2011 18:19:23 +0000 Subject: bitbake/fetch2: When encoding a file:// url, drop user and host information When processing a cvs SRC_URI to a file:// mirror, the user and host information will break the mirror processing. This patch addresses it by only constructing valid urls. Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 11a813e02..43ba772db 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -108,12 +108,12 @@ def encodeurl(decoded): if not type or not path: raise MissingParameterError("Type or path url components missing when encoding %s" % decoded) url = '%s://' % type - if user: + if user and type != "file": url += "%s" % user if pswd: url += ":%s" % pswd url += "@" - if host: + if host and type != "file": url += "%s" % host url += "%s" % path if p: -- cgit v1.2.3