From 03983dc2b0b4a95ae53b715ac7c05181be5ce25d Mon Sep 17 00:00:00 2001
From: Chris Larson <chris_larson@mentor.com>
Date: Tue, 6 Apr 2010 14:27:59 -0700
Subject: clean.bbclass: add pstage bits, for use with srctree

Signed-off-by: Chris Larson <chris_larson@mentor.com>
---
 classes/clean.bbclass | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'classes')

diff --git a/classes/clean.bbclass b/classes/clean.bbclass
index 65c1ab5d76..fc53a63f97 100644
--- a/classes/clean.bbclass
+++ b/classes/clean.bbclass
@@ -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)
-- 
cgit v1.2.3