Skip to contentSkip to conversation

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

PATCH New Mathieu Dubois-Briand 1 participant 1 message Dec 19, 2025

lore
Share & tools
lore
#0 lore raw

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

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

---
 bin/bitbake          | 1 +
 bin/bitbake-diffsigs | 1 +
 bin/bitbake-getvar   | 1 +
 3 files changed, 3 insertions(+)
bin/bitbake +1 -0
index a995bd665352..2eb5f9103d31 100755
@@ -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'))
bin/bitbake-diffsigs +1 -0
index 9d6cb8c944bc..0974e8d4aed0 100755
@@ -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
bin/bitbake-getvar +1 -0
index 378fb1357247..1c4283779e88 100755
@@ -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)

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

Best regards,

Signature · 1 line
Mathieu Dubois-Briand <[email protected]>