bitbake: cooker: wait seconds to unlock bitbake.lock
RFC PATCH 1/1 bitbake: cooker: wait seconds to unlock bitbake.lock
In reply to a message not in the archiveSometimes, we get following error when bitbake command is executed continuously
"ERROR: Only one copy of bitbake should be run against a build directory"
For example, "bitbake -p m4 && bitbake -e".
Add seconds to wait unlock after first bitbake command exit.
Signed-off-by Chong Lu <[email protected]>
--- bitbake/lib/bb/cooker.py | 8 ++++++++ 1 file changed, 8 insertions(+)
bitbake/lib/bb/cooker.py +8 -0
@@ -140,6 +140,14 @@ class BBCooker: # directory at a time lockfile = self.data.expand("${TOPDIR}/bitbake.lock") self.lock = bb.utils.lockfile(lockfile, False, False) + n = 0 + while n < 3: + if not self.lock: + time.sleep(0.5) + self.lock = bb.utils.lockfile(lockfile, False, False) + n += 1 + else: + break if not self.lock: bb.fatal("Only one copy of bitbake should be run against a build directory") try:
Signature · 1 line
1.9.1