[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] [PATCH 1/1] SRC_URI parameter: "subdir" does not work for local files
From:       roxana.ciobanu () intel ! com (Roxana Ciobanu)
Date:       2014-07-31 10:29:24
Message-ID: a6a9bbd35ef333407ed5ea297effba0ae596450a.1406802531.git.roxana.ciobanu () intel ! com
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic