clean.bbclass: add pstage bits, for use with srctree
authorChris Larson <chris_larson@mentor.com>
Tue, 6 Apr 2010 21:27:59 +0000 (14:27 -0700)
committerChris Larson <chris_larson@mentor.com>
Tue, 6 Apr 2010 21:28:16 +0000 (14:28 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
classes/clean.bbclass

index 65c1ab5..fc53a63 100644 (file)
@@ -46,6 +46,13 @@ __do_clean_make () {
 }
 
 python do_clean () {
+       if bb.data.getVar("PSTAGING_ACTIVE", d, 1) == "1":
+               removepkg = bb.data.expand("${PSTAGE_PKGPN}", d)
+               pstage_cleanpackage(removepkg, d)
+
+               stagepkg = bb.data.expand("${PSTAGE_PKG}", d)
+               bb.note("Removing staging package %s" % base_path_out(stagepkg, d))
+               os.system('rm -rf ' + stagepkg)
        clean_stamps(d)
        clean_workdir(d)
        clean_builddir(d)