From ba2fcb968e43bce93a7beb1c5fd9d671460f9fca Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 11 Oct 2024 11:58:48 +0100 Subject: [PATCH] bitbake: utils: Improve multiple lock handling We should release locks in the opposite order to the order we locked them in to avoid potentially problematic behaviour. This hasn't been observed with our current usage and is just a preventative improvement. (Bitbake rev: 4fbef87adaca2df8c1e877aec5588c2e5466f252) Signed-off-by: Richard Purdie --- bitbake/lib/bb/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index ebee65d3dd..e722f9113d 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py @@ -446,6 +446,7 @@ def fileslocked(files, *args, **kwargs): try: yield finally: + locks.reverse() for lock in locks: bb.utils.unlockfile(lock)