]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: Take a shared lock when reading to improve do_package parallelism
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 19 Jan 2011 11:04:15 +0000 (11:04 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 19 Jan 2011 11:04:15 +0000 (11:04 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index d39c694de5d2314d4c282e21c5c6572d8b851c6e..8e7fa26f72521d78df5d24e5bcd155add8c81748 100644 (file)
@@ -497,7 +497,8 @@ python emit_pkgdata() {
        pkgdest = bb.data.getVar('PKGDEST', d, 1)
        pkgdatadir = bb.data.getVar('PKGDESTWORK', d, True)
 
-       lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d))
+       # Take shared lock since we're only reading, not writing
+       lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d), True)
 
        data_file = pkgdatadir + bb.data.expand("/${PN}" , d)
        f = open(data_file, 'w')
@@ -649,6 +650,7 @@ python package_do_shlibs() {
        shlibs_dir = bb.data.getVar('SHLIBSDIR', d, True)
        shlibswork_dir = bb.data.getVar('SHLIBSWORKDIR', d, True)
 
+       # Take shared lock since we're only reading, not writing
        lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d))
 
        def linux_so(root, path, file):
@@ -878,6 +880,7 @@ python package_do_pkgconfig () {
                                                        if hdr == 'Requires':
                                                                pkgconfig_needed[pkg] += exp.replace(',', ' ').split()
 
+       # Take shared lock since we're only reading, not writing
        lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d))
 
        for pkg in packages.split():