summaryrefslogtreecommitdiff
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard@ted.(none)>2009-04-28 08:24:11 +0100
committerRichard Purdie <richard@ted.(none)>2009-04-28 08:24:11 +0100
commit3927e38eba96a172c7df2c7270c31728b83612eb (patch)
tree48b0a30d721af9e2f25e03bea8e41035e9ff40bb /meta/classes/base.bbclass
parent49ca46f588425c88e37a85df00b1fd4591a01ab6 (diff)
parentd65be3dd2aaa643b5596c8470caf7f291513efee (diff)
downloadopenembedded-core-3927e38eba96a172c7df2c7270c31728b83612eb.tar.gz
openembedded-core-3927e38eba96a172c7df2c7270c31728b83612eb.tar.bz2
openembedded-core-3927e38eba96a172c7df2c7270c31728b83612eb.tar.xz
openembedded-core-3927e38eba96a172c7df2c7270c31728b83612eb.zip
Merge ssh://gitserver@git.pokylinux.org/poky
Diffstat (limited to 'meta/classes/base.bbclass')
-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 1f280a0dc..e801fd12a 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