summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-03 18:19:23 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-10 23:36:51 +0000
commit2217e9af98d5cd7755b84b5961298efa845910f8 (patch)
treebbf643f5a68560dfbc2757bd56cafa3fa671aa4a
parentb987a08a030cbd2528e1824b7716a43592881bf8 (diff)
downloadbitbake-2217e9af98d5cd7755b84b5961298efa845910f8.tar.gz
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. (From Poky rev: 7f99605562119a13a2510a3c990e3cf577ad764e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 11a813e02..43ba772db 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/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: