* [PATCH] build: defer processing of cleandirs until after lockfiles are acquired
@ 2020-09-29 15:14 Chris Laplante
0 siblings, 0 replies; 2+ messages in thread
From: Chris Laplante @ 2020-09-29 15:14 UTC (permalink / raw)
To: bitbake-devel; +Cc: Chris Laplante
This is to avoid potential races for tasks that use both [cleandirs] and
[lockfiles].
It is currently believed that normal [dirs] handling is fine as-is.
Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
---
lib/bb/build.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 974d2ff0..51bcad96 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -188,11 +188,6 @@ def exec_func(func, d, dirs = None):
oldcwd = None
flags = d.getVarFlags(func)
- cleandirs = flags.get('cleandirs') if flags else None
- if cleandirs:
- for cdir in d.expand(cleandirs).split():
- bb.utils.remove(cdir, True)
- bb.utils.mkdirhier(cdir)
if flags and dirs is None:
dirs = flags.get('dirs')
@@ -250,6 +245,12 @@ def exec_func(func, d, dirs = None):
pass
with bb.utils.fileslocked(lockfiles):
+ cleandirs = flags.get('cleandirs') if flags else None
+ if cleandirs:
+ for cdir in d.expand(cleandirs).split():
+ bb.utils.remove(cdir, True)
+ bb.utils.mkdirhier(cdir)
+
if ispython:
exec_func_python(func, d, runfile, cwd=adir)
else:
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] build: defer processing of cleandirs until after lockfiles are acquired
@ 2020-11-03 15:15 Chris Laplante
0 siblings, 0 replies; 2+ messages in thread
From: Chris Laplante @ 2020-11-03 15:15 UTC (permalink / raw)
To: bitbake-devel; +Cc: Chris Laplante
This is to avoid potential races for tasks that use both [cleandirs] and
[lockfiles].
It is currently believed that normal [dirs] handling is fine as-is.
Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
---
lib/bb/build.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 974d2ff0..51bcad96 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -188,11 +188,6 @@ def exec_func(func, d, dirs = None):
oldcwd = None
flags = d.getVarFlags(func)
- cleandirs = flags.get('cleandirs') if flags else None
- if cleandirs:
- for cdir in d.expand(cleandirs).split():
- bb.utils.remove(cdir, True)
- bb.utils.mkdirhier(cdir)
if flags and dirs is None:
dirs = flags.get('dirs')
@@ -250,6 +245,12 @@ def exec_func(func, d, dirs = None):
pass
with bb.utils.fileslocked(lockfiles):
+ cleandirs = flags.get('cleandirs') if flags else None
+ if cleandirs:
+ for cdir in d.expand(cleandirs).split():
+ bb.utils.remove(cdir, True)
+ bb.utils.mkdirhier(cdir)
+
if ispython:
exec_func_python(func, d, runfile, cwd=adir)
else:
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-03 15:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 15:14 [PATCH] build: defer processing of cleandirs until after lockfiles are acquired Chris Laplante
2020-11-03 15:15 Chris Laplante
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.