[oe-commits] Tom Rini : insane.bbclas: Add locking in package_qa_check_staged

git version control git at git.openembedded.org
Fri Feb 25 21:02:07 UTC 2011


Module: openembedded.git
Branch: testing-release-2011.03
Commit: b5d9ac7e30e95ae4e29aad997707d500047325ab
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=b5d9ac7e30e95ae4e29aad997707d500047325ab

Author: Tom Rini <tom_rini at mentor.com>
Date:   Fri Feb 25 13:22:46 2011 -0700

insane.bbclas: Add locking in package_qa_check_staged

Signed-off-by: Tom Rini <tom_rini at mentor.com>

---

 classes/insane.bbclass |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/classes/insane.bbclass b/classes/insane.bbclass
index 11e671c..f2da284 100644
--- a/classes/insane.bbclass
+++ b/classes/insane.bbclass
@@ -342,9 +342,9 @@ def package_qa_check_staged(path,d):
             pkgconfigcheck = workdir
             iscrossnative = True
 
-    # find all .la and .pc files
-    # read the content
-    # and check for stuff that looks wrong
+    # Grab the lock, find all .la and .pc files, read the content and check for
+    # stuff that looks wrong
+    lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d))
     for root, dirs, files in os.walk(path):
         for file in files:
             path = os.path.join(root,file)
@@ -363,6 +363,7 @@ def package_qa_check_staged(path,d):
                 if pkgconfigcheck in file_content:
                     error_msg = "%s failed sanity test (tmpdir) in path %s" % (file,root)
                     sane = package_qa_handle_error(6, error_msg, "staging", path, d)
+    bb.utils.unlockfile(lf)
 
     return sane
 





More information about the Openembedded-commits mailing list