| Message ID | 20251219124928.1474117-1-vishal.gupta_1@bbl.philips.com |
|---|---|
| State | New |
| Headers | show |
| Series | [1/1] wpa-supplicant: fix sed expression | expand |
On Fri, 19 Dec 2025 at 14:18, Vishal Gupta via lists.openembedded.org <vishal.gupta_1=bbl.philips.com@lists.openembedded.org> wrote: > The current expression does not remove CONFIG_TLS > because the line begins with '#'. Updated the > expression to make the leading '#' optional so > that CONFIG_TLS is deleted whether or not the > line starts with '#'. But if the line starts with then it's perhaps unneeded to remove it as its only a comment? What is the use case for doing it? Alex
Hi Alexander,
In the do_configure function current intention of implementation is to first delete it when we copying and then depending on the PACKAGECONFIG assign it with correct value.
As delete is failed because the line start with "#" we will have two CONFIG_TLS value in final ".config" file
one, at some where middle of the file
#CONFIG_TLS=openssl
second, depending on package config, at the end of file as it's an append operation.
CONFIG_TLS=openssl / gnutls
do_configure () {
${MAKE} -C wpa_supplicant clean
sed -e '/^#\?CONFIG_TLS=/d' <wpa_supplicant/defconfig >wpa_supplicant/.config
if ${@ bb.utils.contains('PACKAGECONFIG', 'openssl', 'true', 'false', d) }; then
echo 'CONFIG_TLS=openssl' >>wpa_supplicant/.config
elif ${@ bb.utils.contains('PACKAGECONFIG', 'gnutls', 'true', 'false', d) }; then
echo 'CONFIG_TLS=gnutls' >>wpa_supplicant/.config
sed -i -e 's/\(^CONFIG_DPP=\)/#\1/' \
-e 's/\(^CONFIG_EAP_PWD=\)/#\1/' \
-e 's/\(^CONFIG_SAE=\)/#\1/' wpa_supplicant/.config
fi
So with this change there will be only one "CONFIG_TLS=<value>" option.
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.11.bb b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.11.bb index 6ba10a8ca9..e2a522dd85 100644 --- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.11.bb +++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.11.bb @@ -37,7 +37,7 @@ EXTRA_OEMAKE = "'LIBDIR=${libdir}' 'INCDIR=${includedir}' 'BINDIR=${sbindir}'" do_configure () { ${MAKE} -C wpa_supplicant clean - sed -e '/^CONFIG_TLS=/d' <wpa_supplicant/defconfig >wpa_supplicant/.config + sed -e '/^#\?CONFIG_TLS=/d' <wpa_supplicant/defconfig >wpa_supplicant/.config if ${@ bb.utils.contains('PACKAGECONFIG', 'openssl', 'true', 'false', d) }; then echo 'CONFIG_TLS=openssl' >>wpa_supplicant/.config