From 2c655522c1c063f95e1e0ae12fe5e90933d7064e Mon Sep 17 00:00:00 2001 From: Rick Farina Date: Fri, 2 Sep 2022 13:40:57 -0400 Subject: net-wireless/wpa_supplicant: improve Kconfig_style_config() As-is, this macro can have imprecise results. Specifically, 'Kconfig_style_config TLS openssl' is converting lines like 'CONFIG_TLSV11=y' into 'CONFIG_TLSV11=openssl'. If we match to the end-of-word '\>', this doesn't happen. Closes: https://github.com/gentoo/gentoo/pull/16307 Author: Brian Norris Signed-off-by: Brian Norris Signed-off-by: Rick Farina --- net-wireless/wpa_supplicant/wpa_supplicant-2.10-r1.ebuild | 4 ++-- net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'net-wireless/wpa_supplicant') diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-2.10-r1.ebuild b/net-wireless/wpa_supplicant/wpa_supplicant-2.10-r1.ebuild index cb80b33748c2..dbd441303c31 100644 --- a/net-wireless/wpa_supplicant/wpa_supplicant-2.10-r1.ebuild +++ b/net-wireless/wpa_supplicant/wpa_supplicant-2.10-r1.ebuild @@ -77,13 +77,13 @@ Kconfig_style_config() { #first remove any leading "# " if $2 is not n sed -i "/^# *$CONFIG_PARAM=/s/^# *//" .config || echo "Kconfig_style_config error uncommenting $CONFIG_PARAM" #set item = $setting (defaulting to y) - sed -i "/^$CONFIG_PARAM/s/=.*/=$setting/" .config || echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting" + sed -i "/^$CONFIG_PARAM\>/s/=.*/=$setting/" .config || echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting" if [ -z "$( grep ^$CONFIG_PARAM= .config )" ] ; then echo "$CONFIG_PARAM=$setting" >>.config fi else #ensure item commented out - sed -i "/^$CONFIG_PARAM/s/$CONFIG_PARAM/# $CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting $CONFIG_PARAM" + sed -i "/^$CONFIG_PARAM\>/s/$CONFIG_PARAM/# $CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting $CONFIG_PARAM" fi } diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild b/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild index 276c74b2dc41..aee70bb7bc41 100644 --- a/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild +++ b/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild @@ -77,13 +77,13 @@ Kconfig_style_config() { #first remove any leading "# " if $2 is not n sed -i "/^# *$CONFIG_PARAM=/s/^# *//" .config || echo "Kconfig_style_config error uncommenting $CONFIG_PARAM" #set item = $setting (defaulting to y) - sed -i "/^$CONFIG_PARAM/s/=.*/=$setting/" .config || echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting" + sed -i "/^$CONFIG_PARAM\>/s/=.*/=$setting/" .config || echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting" if [ -z "$( grep ^$CONFIG_PARAM= .config )" ] ; then echo "$CONFIG_PARAM=$setting" >>.config fi else #ensure item commented out - sed -i "/^$CONFIG_PARAM/s/$CONFIG_PARAM/# $CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting $CONFIG_PARAM" + sed -i "/^$CONFIG_PARAM\>/s/$CONFIG_PARAM/# $CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting $CONFIG_PARAM" fi } -- cgit v1.2.3-65-gdbad