diff options
author | Robert Schuster <r.schuster@tarent.de> | 2009-01-15 17:55:32 +0100 |
---|---|---|
committer | Marcin Juszkiewicz <marcin@buglabs.net> | 2009-03-11 12:03:25 +0100 |
commit | 58ffd5a0ed288f9225cb82fd8cf1af30a4700bda (patch) | |
tree | f86f746afad3d2555956845d0f96f5d68448f7db /meta/classes | |
parent | 9b6df990709ea0e4501234f9bd2575127f48894e (diff) | |
download | openembedded-core-58ffd5a0ed288f9225cb82fd8cf1af30a4700bda.tar.gz openembedded-core-58ffd5a0ed288f9225cb82fd8cf1af30a4700bda.tar.bz2 openembedded-core-58ffd5a0ed288f9225cb82fd8cf1af30a4700bda.zip |
base.bbclass: Add subdir feature to SRC_URI entries (from OE)
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/base.bbclass | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 5f83af1fa3..b7eb62c01a 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -681,9 +681,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 |