summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
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
parentc74f3d44c6f7815fad87736763807c96263c2eed (diff)
downloadast2050-yocto-poky-8febf64b1da1e163051df448402b3056b1ef99f3.zip
ast2050-yocto-poky-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')
-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 1f4ec37..bfef079 100644
--- a/bitbake/lib/bb/fetch2/local.py
+++ b/bitbake/lib/bb/fetch2/local.py
@@ -60,9 +60,10 @@ class Local(FetchMethod):
filesdir = data.getVar('FILESDIR', d, True)
if filesdir:
newpath = os.path.join(filesdir, path)
- if not os.path.exists(newpath) and path.find("*") == -1:
- dldirfile = os.path.join(data.getVar("DL_DIR", d, True), os.path.basename(path))
- return dldirfile
+ if not os.path.exists(newpath) and path.find("*") == -1:
+ dldirfile = os.path.join(d.getVar("DL_DIR", True), path)
+ bb.utils.mkdirhier(os.path.dirname(dldirfile))
+ return dldirfile
return newpath
def need_update(self, url, ud, d):
OpenPOWER on IntegriCloud