2 from shutil import rmtree
4 builddir = d.getVar("B", True)
5 srcdir = d.getVar("S", True)
7 rmtree(builddir, ignore_errors=True)
12 from bb.data import expand
15 note("Removing stamps")
16 for stamp in glob(expand('${STAMP}.*', d)):
23 from shutil import rmtree
26 workdir = d.getVar("WORKDIR", 1)
27 note("Removing %s" % workdir)
28 rmtree(workdir, ignore_errors=True)
31 from subprocess import call
33 call(["git", "clean", "-d", "-f", "-X"], cwd=d.getVar("S", True))
38 bb.note("Running make clean")
40 bb.build.exec_func("__do_clean_make", d)
41 except bb.build.FuncFailed:
49 if bb.data.getVar("PSTAGING_ACTIVE", d, 1) == "1":
50 removepkg = bb.data.expand("${PSTAGE_PKGPN}", d)
51 pstage_cleanpackage(removepkg, d)
53 stagepkg = bb.data.expand("${PSTAGE_PKG}", d)
54 bb.note("Removing staging package %s" % base_path_out(stagepkg, d))
55 os.system('rm -rf ' + stagepkg)