From 7ddbeb29315ccc93cebf10c3f52663110f5b8168 Mon Sep 17 00:00:00 2001
From: Robert Bradford <rob@openedhand.com>
Date: Mon, 20 Oct 2008 14:58:47 +0000
Subject: packaged-staging.bbclass: Avoid removing the staging.lock lock file.

The pstage_manualclean function can be called on a directory containing an
actively held lock on staging. Removing the lock file whilst the lock is held
results in a failure when the lock is released.

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5553 311d38ba-8fff-0310-9ca6-ca027cbcb966
---
 meta/classes/packaged-staging.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/packaged-staging.bbclass b/meta/classes/packaged-staging.bbclass
index a7dd1f80c..690e41e1e 100644
--- a/meta/classes/packaged-staging.bbclass
+++ b/meta/classes/packaged-staging.bbclass
@@ -88,6 +88,9 @@ def pstage_manualclean(srcname, destvarname, d):
 
 	for walkroot, dirs, files in os.walk(src):
 		for file in files:
+			# Avoid breaking the held lock
+			if (file == "staging.lock"):
+				continue
 			filepath = os.path.join(walkroot, file).replace(src, dest)
 			bb.note("rm %s" % filepath)
 			os.system("rm %s" % filepath)
-- 
cgit v1.2.3