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 <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-02-03 18:19:23 +00:00
parent 9ee3c77f4e
commit 7f99605562
1 changed files with 2 additions and 2 deletions

View File

@ -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: