diff options
author | Roxana <roxana.ciobanu@intel.com> | 2014-07-31 13:29:24 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-29 12:08:48 +0100 |
commit | 1f4e75143a961665cf3010e9b0c6d480bbbe022a (patch) | |
tree | 159dc01729348ab40ee2531814daf492c81e7e53 /bitbake | |
parent | 249a0e937d554152ab9ade6ab1f8f7e78288d402 (diff) | |
download | ast2050-yocto-poky-1f4e75143a961665cf3010e9b0c6d480bbbe022a.zip ast2050-yocto-poky-1f4e75143a961665cf3010e9b0c6d480bbbe022a.tar.gz |
bitbake: fetch: SRC_URI parameter "subdir" does not work for local files
Check if the 'subdir' parameter exists and assign it to 'destdir' so that
files are copied in ${WORKDIR}/destdir. This fixes urls that are of the form
file://a;subdir=b.
(Bitbake rev: 836a986b365eb9798563ec08d90b346596de7791)
Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index df2f2b0..68c8329 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -1265,7 +1265,10 @@ class FetchMethod(object): if urldata.type == "file" and urldata.path.find("/") != -1: destdir = urldata.path.rsplit("/", 1)[0] else: - destdir = "." + if urldata.parm.get('subdir') != None: + destdir = urldata.parm.get('subdir') + else: + destdir = "." bb.utils.mkdirhier("%s/%s" % (rootdir, destdir)) cmd = 'cp -f %s %s/%s/' % (file, rootdir, destdir) |