]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate: Avoid contention between sstate packages
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 7 Sep 2011 17:34:47 +0000 (18:34 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 7 Sep 2011 22:39:50 +0000 (23:39 +0100)
If several sstate packages are decompressing at the same time, they can
conflict over the "fixmepath". If two packages try to write to this at
the same time it results in an error. To avoid this we remove the file
once we've finished processing it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass

index d7631cac5ce72d687c11861144ea8dd2f33d299c..91f209a9cff158de42836fa546c8f1852dba0889 100644 (file)
@@ -183,6 +183,9 @@ def sstate_installpkg(ss, d):
             os.system("sed -i -e s:FIXMESTAGINGDIRTARGET:%s:g %s" % (staging_target, sstateinst + file))
             os.system("sed -i -e s:FIXMESTAGINGDIRHOST:%s:g %s" % (staging_host, sstateinst + file))
             os.system("sed -i -e s:FIXMESTAGINGDIR:%s:g %s" % (staging, sstateinst + file))
+        # Need to remove this or we'd copy it into the target directory and may 
+        # conflict with another writer
+        os.remove(fixmefn)
 
     for state in ss['dirs']:
         prepdir(state[1])