[OE-core] [PATCH 1/1] SRC_URI parameter: "subdir" does not work for local files
Roxana Ciobanu
roxana.ciobanu at intel.com
Thu Jul 31 10:29:24 UTC 2014
Check if the 'subdir' parameter exists and assign it to 'destdir' so that
files are copied in ${WORKDIR}/destdir.
Signed-off-by: Roxana Ciobanu <roxana.ciobanu at intel.com>
---
bitbake/lib/bb/fetch2/__init__.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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)
--
1.9.1
More information about the Openembedded-core
mailing list