summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Schuster <r.schuster@tarent.de>2009-01-15 17:55:32 +0100
committerMarcin Juszkiewicz <marcin@buglabs.net>2009-03-11 12:04:03 +0100
commitabf40bb82c514e4b1ef39f28c32aa006484504f7 (patch)
treeb776e0456ffbccab2fa6cf4a00f024c9062b4fa4
parenta4dd5f68db1ad6eee64d8331b5fd96c2c905cca0 (diff)
downloadpoky-abf40bb82c514e4b1ef39f28c32aa006484504f7.tar.gz
poky-abf40bb82c514e4b1ef39f28c32aa006484504f7.tar.bz2
poky-abf40bb82c514e4b1ef39f28c32aa006484504f7.zip
base.bbclass: Add subdir feature to SRC_URI entries (from OE)
-rw-r--r--meta/classes/base.bbclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index fd1308295e..af9da505cf 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -583,9 +583,20 @@ def oe_unpack_file(file, data, url = None):
if os.path.samefile(file, dest):
return True
+ # Change to subdir before executing command
+ save_cwd = os.getcwd();
+ parm = bb.decodeurl(url)[5]
+ if 'subdir' in parm:
+ newdir = ("%s/%s" % (os.getcwd(), parm['subdir']))
+ bb.mkdirhier(newdir)
+ os.chdir(newdir)
+
cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', data, 1), cmd)
bb.note("Unpacking %s to %s/" % (file, os.getcwd()))
ret = os.system(cmd)
+
+ os.chdir(save_cwd)
+
return ret == 0
addtask unpack after do_fetch