[oe] [meta-oe][PATCH v2 6/6] net-snmp: Simplify sed expressions

Douglas Royds douglas.royds at taitradio.com
Wed Nov 21 00:52:20 UTC 2018


Readability.
The existing patterns allowed each pattern to be matched multiple times (with no
intevening spaces), but the "g" modifier achieves this anyway.

Signed-off-by: Douglas Royds <douglas.royds at taitradio.com>
---
 .../recipes-protocols/net-snmp/net-snmp_5.8.bb       | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb
index 2a0d88ab2..7794f3880 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb
@@ -119,12 +119,12 @@ do_install_append() {
     sed    -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=. at g" \
         -i ${D}${bindir}/net-snmp-create-v3-user
     sed -e 's@^NSC_SRCDIR=.*@NSC_SRCDIR=. at g' \
-        -e 's@\([^ ]*-fdebug-prefix-map=[^ "]*\)\1*@@g' \
-        -e 's@\([^ ]*--sysroot=[^ "]*\)\1*@@g' \
-        -e 's@\([^ ]*--with-libtool-sysroot=[^ "]*\)\1*@@g' \
-        -e 's@\([^ ]*--with-install-prefix=[^ "]*\)\1*@@g' \
-        -e 's@\([^ ]*PKG_CONFIG_PATH=[^ "]*\)\1*@@g' \
-        -e 's@\([^ ]*PKG_CONFIG_LIBDIR=[^ "]*\)\1*@@g' \
+        -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \
+        -e 's@[^ ]*--sysroot=[^ "]*@@g' \
+        -e 's@[^ ]*--with-libtool-sysroot=[^ "]*@@g' \
+        -e 's@[^ ]*--with-install-prefix=[^ "]*@@g' \
+        -e 's@[^ ]*PKG_CONFIG_PATH=[^ "]*@@g' \
+        -e 's@[^ ]*PKG_CONFIG_LIBDIR=[^ "]*@@g' \
         -i ${D}${bindir}/net-snmp-config
 
     if [ "${HAS_PERL}" = "1" ]; then
-- 
2.17.1



More information about the Openembedded-devel mailing list