From 8febf64b1da1e163051df448402b3056b1ef99f3 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 25 Jul 2012 19:04:45 +0000 Subject: 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 --- bitbake/lib/bb/fetch2/local.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bitbake') 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): 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): -- cgit v1.2.3-54-g00ecf