From 836a986b365eb9798563ec08d90b346596de7791 Mon Sep 17 00:00:00 2001 From: Roxana Date: Thu, 31 Jul 2014 13:29:24 +0300 Subject: 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. Signed-off-by: Roxana Ciobanu Signed-off-by: Richard Purdie --- lib/bb/fetch2/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index df2f2b056..68c8329e2 100644 --- a/lib/bb/fetch2/__init__.py +++ b/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) -- cgit 1.2.3-korg