From c3682bf89bdf236a4b4d834069d947b6a1456791 Mon Sep 17 00:00:00 2001 From: Nitin A Kamble Date: Thu, 3 Jun 2010 21:50:02 -0700 Subject: 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 --- bitbake/lib/bb/fetch/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bitbake') 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): >>> decodeurl("http://www.google.com/index.html") ('http', 'www.google.com', '/index.html', '', '', {}) + >>> decodeurl("file://gas/COPYING") + ('file', '', 'gas/COPYING', '', '', {}) + CVS url with username, host and cvsroot. The cvs module to check out is in the parameters: @@ -82,7 +85,7 @@ def decodeurl(url): parm = m.group('parm') locidx = location.find('/') - if locidx != -1: + if locidx != -1 and type.lower() != 'file': host = location[:locidx] path = location[locidx:] else: -- cgit v1.2.3-54-g00ecf