]> code.ossystems Code Review - openembedded-core.git/commitdiff
packaged-staging.bbclass: Avoid removing the staging.lock lock file.
authorRobert Bradford <rob@openedhand.com>
Mon, 20 Oct 2008 14:58:47 +0000 (14:58 +0000)
committerRobert Bradford <rob@openedhand.com>
Mon, 20 Oct 2008 14:58:47 +0000 (14:58 +0000)
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

index a7dd1f80c138556b203ecca6bfaf1b2ee2041417..690e41e1e208cab330556c2bcb13c80ac9994dcc 100644 (file)
@@ -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)