Skip to contentSkip to conversation

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

PATCH New Alex Kiernan 1 participant 1 message Sep 2

lore
Share & tools
lore
#0 lore raw

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

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.

---
 .../wpa-supplicant/wpa-supplicant_2.12.bb                | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.12.bb +7 -2
index df0585f1f3c4..516699df46d4 100644
@@ -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