mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
build.py: Add support for cleaning directories before a task in the form: do_taskname[cleandirs] = 'dir'
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2693 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -74,10 +74,13 @@ def exec_func(func, d, dirs = None):
|
||||
if not body:
|
||||
return
|
||||
|
||||
cleandirs = (data.expand(data.getVarFlag(func, 'cleandirs', d), d) or "").split()
|
||||
for cdir in cleandirs:
|
||||
os.system("rm -rf %s" % cdir)
|
||||
|
||||
if not dirs:
|
||||
dirs = (data.getVarFlag(func, 'dirs', d) or "").split()
|
||||
dirs = (data.expand(data.getVarFlag(func, 'dirs', d), d) or "").split()
|
||||
for adir in dirs:
|
||||
adir = data.expand(adir, d)
|
||||
mkdirhier(adir)
|
||||
|
||||
if len(dirs) > 0:
|
||||
|
||||
Reference in New Issue
Block a user