diff mbox series

[meta-oe,1/4] gphoto2: Use :space: to identify space characters

Message ID 20250419073327.2468160-1-raj.khem@gmail.com
State Accepted, archived
Headers show
Series [meta-oe,1/4] gphoto2: Use :space: to identify space characters | expand

Commit Message

Khem Raj April 19, 2025, 7:33 a.m. UTC
Sometimes current sed expression does not work so use POSIX
compliant expression

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gyorgy Sarvari April 19, 2025, 1:24 p.m. UTC | #1
>  
>  do_configure:append() {
> -	sed -i 's/--sysroot[^ "]*//g' ${B}/config.h
> +	sed -i -E 's/--sysroot=[^"'"'"' ]+//g' ${B}/config.h
>  }
The summary claims to use :space: characters, but in the change there is
no [:space:] here.

That regex isn't too easy to parse with those quote-marks. Isn't it
equivalent to
sed -i -E "s/--sysroot=[^'\" ]+//g" ${B}/config.h
?
Khem Raj April 19, 2025, 9:33 p.m. UTC | #2
On Sat, Apr 19, 2025 at 6:24 AM Gyorgy Sarvari <skandigraun@gmail.com>
wrote:

> >
> >  do_configure:append() {
> > -     sed -i 's/--sysroot[^ "]*//g' ${B}/config.h
> > +     sed -i -E 's/--sysroot=[^"'"'"' ]+//g' ${B}/config.h
> >  }
> The summary claims to use :space: characters, but in the change there is
> no [:space:] here.
>
> That regex isn't too easy to parse with those quote-marks. Isn't it
> equivalent to
> sed -i -E "s/--sysroot=[^'\" ]+//g" ${B}/config.h
> ?


Seems that way

>
>
>
diff mbox series

Patch

diff --git a/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb b/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb
index 6a2f7164b5..d46ed2b07a 100644
--- a/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb
+++ b/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb
@@ -20,5 +20,5 @@  EXTRA_OECONF += "--with-jpeg-prefix=${STAGING_INCDIR} \
 "
 
 do_configure:append() {
-	sed -i 's/--sysroot[^ "]*//g' ${B}/config.h
+	sed -i -E 's/--sysroot=[^"'"'"' ]+//g' ${B}/config.h
 }