]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake/fetch2: When encoding a file:// url, drop user and host information
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 3 Feb 2011 18:19:23 +0000 (18:19 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 3 Feb 2011 18:19:23 +0000 (18:19 +0000)
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>
bitbake/lib/bb/fetch2/__init__.py

index 11a813e028e9c5dbc38f44b7b487c8b9e23de94a..43ba772dbf4596acea84a54dd2e5a55040afe44d 100644 (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: