summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-25 19:04:45 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-26 14:55:22 +0100
commit8febf64b1da1e163051df448402b3056b1ef99f3 (patch)
tree2fd200e44308f20fbda70a34b10843bff61cfb25 /bitbake/lib/bb/fetch2
parentc74f3d44c6f7815fad87736763807c96263c2eed (diff)
downloadpoky-8febf64b1da1e163051df448402b3056b1ef99f3.tar.gz
bitbake: fetch/local: Allow preservation of path components in relative file:// urls
This enhances the fetcher to allow preservation of the path component in urls like: file://xxx/yyy/somefile.patch. (Bitbake rev: e49a656a499355a5c6e7eb00bf5b8f1795e8dddb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/local.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/local.py b/bitbake/lib/bb/fetch2/local.py
index 1f4ec371a4..bfef0791a5 100644
--- a/bitbake/lib/bb/fetch2/local.py
+++ b/bitbake/lib/bb/fetch2/local.py
@@ -60,9 +60,10 @@ class Local(FetchMethod):
60 filesdir = data.getVar('FILESDIR', d, True) 60 filesdir = data.getVar('FILESDIR', d, True)
61 if filesdir: 61 if filesdir:
62 newpath = os.path.join(filesdir, path) 62 newpath = os.path.join(filesdir, path)
63 if not os.path.exists(newpath) and path.find("*") == -1: 63 if not os.path.exists(newpath) and path.find("*") == -1:
64 dldirfile = os.path.join(data.getVar("DL_DIR", d, True), os.path.basename(path)) 64 dldirfile = os.path.join(d.getVar("DL_DIR", True), path)
65 return dldirfile 65 bb.utils.mkdirhier(os.path.dirname(dldirfile))
66 return dldirfile
66 return newpath 67 return newpath
67 68
68 def need_update(self, url, ud, d): 69 def need_update(self, url, ud, d):