mirror of
https://git.yoctoproject.org/poky
synced 2026-09-15 06:49:33 +02:00
base.bbclass: Add subdir feature to SRC_URI entries (from OE)
This commit is contained in:
committed by
Marcin Juszkiewicz
parent
130ccf8b72
commit
947e8d5fd6
@@ -681,9 +681,20 @@ def oe_unpack_file(file, data, url = None):
|
|||||||
if os.path.samefile(file, dest):
|
if os.path.samefile(file, dest):
|
||||||
return True
|
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)
|
cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', data, 1), cmd)
|
||||||
bb.note("Unpacking %s to %s/" % (file, os.getcwd()))
|
bb.note("Unpacking %s to %s/" % (file, os.getcwd()))
|
||||||
ret = os.system(cmd)
|
ret = os.system(cmd)
|
||||||
|
|
||||||
|
os.chdir(save_cwd)
|
||||||
|
|
||||||
return ret == 0
|
return ret == 0
|
||||||
|
|
||||||
addtask unpack after do_fetch
|
addtask unpack after do_fetch
|
||||||
|
|||||||
Reference in New Issue
Block a user