Re: [opkg-devel] [opkg-utils PATCH] update-alternatives: fix the sed pattern in remove_alt

Alejandro del Castillo <alejandro.delcastillo@...>


From: opkg-devel@... <opkg-devel@...> on behalf of jackie.huang@... <jackie.huang@...>
Sent: Thursday, January 18, 2018 8:59 PM
To: yocto@...; opkg-devel@...
Subject: [opkg-devel] [opkg-utils PATCH] update-alternatives: fix the sed pattern in remove_alt

From: Jackie Huang <jackie.huang@...>

'\>' is to matches the end of a word, but the executable is
not always a 'word', e.g. /usr/lib64/busybox/usr/bin/[

then such alternatives can not be removed.

So change to use '\s' in the pattern since the following
character of the $path is whitespace.

Signed-off-by: Jackie Huang <jackie.huang@...>
update-alternatives | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/update-alternatives b/update-alternatives
index ffad853..ce7d66c 100644
--- a/update-alternatives
+++ b/update-alternatives
@@ -80,7 +80,7 @@ remove_alt() {
[ ! -f $ad/$name ] && return 0

path=`echo $path | protect_slashes | protect_special_character`
- sed -ne "/^$path\>.*/!p" $ad/$name > $ad/$
+ sed -ne "/^$path\s.*/!p" $ad/$name > $ad/$
mv $ad/$ $ad/$name


You received this message because you are subscribed to the Google Groups "opkg-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opkg-devel+unsubscribe@....
For more options, visit

Join to automatically receive all group messages.