diff mbox series

wpa-supplicant: Split .config generation into its own function

Message ID 20260902130131.2001728-2-alex.kiernan@gmail.com
State Under Review
Headers show
Series wpa-supplicant: Split .config generation into its own function | expand

Commit Message

Alex Kiernan Sept. 2, 2026, 1:01 p.m. UTC
Adding entries to wpa_supplicant's .config which aren't covered by a
PACKAGECONFIG currently means overriding the whole of do_configure from a
bbappend, as the config generation is embedded in it.

Move the .config generation into a standalone wpa_supplicant_write_config
function which do_configure calls, so a bbappend can extend it, or replace it
entirely, without having to replicate the rest of do_configure.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
 .../wpa-supplicant/wpa-supplicant_2.12.bb                | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.12.bb b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.12.bb
index df0585f1f3c4..516699df46d4 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.12.bb
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.12.bb
@@ -34,8 +34,7 @@  CVE_STATUS[CVE-2024-5290] = "not-applicable-platform: this only affects Ubuntu a
 
 EXTRA_OEMAKE = "'LIBDIR=${libdir}' 'INCDIR=${includedir}' 'BINDIR=${sbindir}'"
 
-do_configure () {
-	${MAKE} -C wpa_supplicant clean
+wpa_supplicant_write_config () {
 	sed -e '/^CONFIG_TLS=/d' <wpa_supplicant/defconfig >wpa_supplicant/.config
 
 	if ${@ bb.utils.contains('PACKAGECONFIG', 'openssl', 'true', 'false', d) }; then
@@ -60,6 +59,12 @@  do_configure () {
 	if ${@ bb.utils.contains('PACKAGECONFIG', 'mbo', 'true', 'false', d) }; then
 		echo 'CONFIG_MBO=y' >>wpa_supplicant/.config
 	fi
+}
+
+do_configure () {
+	${MAKE} -C wpa_supplicant clean
+
+	wpa_supplicant_write_config
 
 	# For rebuild
 	rm -f wpa_supplicant/*.d wpa_supplicant/dbus/*.d