summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2010-06-03 21:50:02 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-06-07 16:05:00 +0100
commitc3682bf89bdf236a4b4d834069d947b6a1456791 (patch)
treefa8e6715c6176faeb4a0740d29b2c5faabf240d3 /bitbake
parent807e983632088ee8cb8eb51b432aef3cab7dbbd7 (diff)
downloadpoky-c3682bf89bdf236a4b4d834069d947b6a1456791.tar.gz
bitbake decodeurl: fix the file:// url handling
Without this patch decoding a url of this kind file://dir/filename gives path=/filename host=dir. With the patch it decodes as path=/dir/filename host="" Probably nobody stumbled on this issue yet because nobody used file:// urls with directory names in the path. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index e6cc1c535b..b566da4311 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -57,6 +57,9 @@ def decodeurl(url):
57 >>> decodeurl("http://www.google.com/index.html") 57 >>> decodeurl("http://www.google.com/index.html")
58 ('http', 'www.google.com', '/index.html', '', '', {}) 58 ('http', 'www.google.com', '/index.html', '', '', {})
59 59
60 >>> decodeurl("file://gas/COPYING")
61 ('file', '', 'gas/COPYING', '', '', {})
62
60 CVS url with username, host and cvsroot. The cvs module to check out is in the 63 CVS url with username, host and cvsroot. The cvs module to check out is in the
61 parameters: 64 parameters:
62 65
@@ -82,7 +85,7 @@ def decodeurl(url):
82 parm = m.group('parm') 85 parm = m.group('parm')
83 86
84 locidx = location.find('/') 87 locidx = location.find('/')
85 if locidx != -1: 88 if locidx != -1 and type.lower() != 'file':
86 host = location[:locidx] 89 host = location[:locidx]
87 path = location[locidx:] 90 path = location[locidx:]
88 else: 91 else: