mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 00:32:12 +02:00
bitbake: main: Attempt to gain bitbake.lock rather than just waiting
Rather than just waiting for 5s, try and get the lockfile. If we gain the lock, we know we're ready to retry and can skip any remaining timeout. (Bitbake rev: 8a60106c6f7d586c793b965c5e9460b6016fab15) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -446,7 +446,15 @@ def setup_bitbake(configParams, configuration, extrafeatures=None):
|
||||
logger.info("Reconnecting to bitbake server...")
|
||||
if not os.path.exists(sockname):
|
||||
print("Previous bitbake instance shutting down?, waiting to retry...")
|
||||
time.sleep(5)
|
||||
i = 0
|
||||
lock = None
|
||||
# Wait for 5s or until we can get the lock
|
||||
while not lock and i < 50:
|
||||
time.sleep(0.1)
|
||||
_, lock = lockBitbake()
|
||||
i += 1
|
||||
if lock:
|
||||
bb.utils.unlockfile(lock)
|
||||
raise bb.server.process.ProcessTimeout("Bitbake still shutting down as socket exists but no lock?")
|
||||
if not configParams.server_only:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user