summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoxana <roxana.ciobanu@intel.com>2014-07-31 13:29:24 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-29 12:08:48 +0100
commit1f4e75143a961665cf3010e9b0c6d480bbbe022a (patch)
tree159dc01729348ab40ee2531814daf492c81e7e53
parent249a0e937d554152ab9ade6ab1f8f7e78288d402 (diff)
downloadpoky-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>
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index df2f2b056b..68c8329e2b 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1265,7 +1265,10 @@ class FetchMethod(object):
1265 if urldata.type == "file" and urldata.path.find("/") != -1: 1265 if urldata.type == "file" and urldata.path.find("/") != -1:
1266 destdir = urldata.path.rsplit("/", 1)[0] 1266 destdir = urldata.path.rsplit("/", 1)[0]
1267 else: 1267 else:
1268 destdir = "." 1268 if urldata.parm.get('subdir') != None:
1269 destdir = urldata.parm.get('subdir')
1270 else:
1271 destdir = "."
1269 bb.utils.mkdirhier("%s/%s" % (rootdir, destdir)) 1272 bb.utils.mkdirhier("%s/%s" % (rootdir, destdir))
1270 cmd = 'cp -f %s %s/%s/' % (file, rootdir, destdir) 1273 cmd = 'cp -f %s %s/%s/' % (file, rootdir, destdir)
1271 1274