diff mbox series

bin: Hide os.fork() deprecation warning in all bitbake scripts

Message ID 20251219-mathieu-fork-warning2-v1-1-31144864ea85@bootlin.com
State New
Headers show
Series bin: Hide os.fork() deprecation warning in all bitbake scripts | expand

Commit Message

Mathieu Dubois-Briand Dec. 19, 2025, 8:11 a.m. UTC
As the previous patch [1] was missing some occurrences, make sure to
mask the deprecation warning in all scripts that might fork, i.e. all
scripts using a BitBakeServer instance at some point.

Justification is still the same, we are being fairly careful here
and believe this code is safe.

Fixes [YOCTO #16080]

[1] https://git.openembedded.org/bitbake/commit/?id=8b02d65a6439b21d8bd5590dc0009f2cf29c1de8

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
 bin/bitbake          | 1 +
 bin/bitbake-diffsigs | 1 +
 bin/bitbake-getvar   | 1 +
 3 files changed, 3 insertions(+)


---
base-commit: 6e511d035a3d1e4129dab7b0dfbf216bd8e99b47
change-id: 20251219-mathieu-fork-warning2-176a98d9cff0

Best regards,
diff mbox series

Patch

diff --git a/bin/bitbake b/bin/bitbake
index a995bd665352..2eb5f9103d31 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -14,6 +14,7 @@  import os
 import sys
 import warnings
 warnings.simplefilter("default")
+warnings.filterwarnings("ignore", category=DeprecationWarning, message=".*use.of.fork.*may.lead.to.deadlocks.in.the.child.*")
 
 sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)),
                                 'lib'))
diff --git a/bin/bitbake-diffsigs b/bin/bitbake-diffsigs
index 9d6cb8c944bc..0974e8d4aed0 100755
--- a/bin/bitbake-diffsigs
+++ b/bin/bitbake-diffsigs
@@ -13,6 +13,7 @@  import sys
 import warnings
 
 warnings.simplefilter("default")
+warnings.filterwarnings("ignore", category=DeprecationWarning, message=".*use.of.fork.*may.lead.to.deadlocks.in.the.child.*")
 import argparse
 import logging
 import pickle
diff --git a/bin/bitbake-getvar b/bin/bitbake-getvar
index 378fb1357247..1c4283779e88 100755
--- a/bin/bitbake-getvar
+++ b/bin/bitbake-getvar
@@ -12,6 +12,7 @@  import sys
 import warnings
 import logging
 warnings.simplefilter("default")
+warnings.filterwarnings("ignore", category=DeprecationWarning, message=".*use.of.fork.*may.lead.to.deadlocks.in.the.child.*")
 
 bindir = os.path.dirname(__file__)
 topdir = os.path.dirname(bindir)