Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] support/scripts: handle paths with regex characters in per-package
@ 2022-06-04  3:23 ckhardin
  2022-06-04  7:56 ` Yann E. MORIN
  2022-06-07 14:03 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: ckhardin @ 2022-06-04  3:23 UTC (permalink / raw)
  To: buildroot; +Cc: Charles Hardin

From: Charles Hardin <ckhardin@gmail.com>

Some constraints on a setup ended up with a plus sign in the path
for historical reasons and would then fail to match on the comparison
of the host/lib dir match. So, the =~ for bash can be augmented
with a double quote expansion to preserve the literal value of
the characters in the variable.

Example Path: /home/vagrant/test+buildroot/per-package

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
---
 support/scripts/check-host-rpath | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/scripts/check-host-rpath b/support/scripts/check-host-rpath
index 9a3866982b..b27cb883f3 100755
--- a/support/scripts/check-host-rpath
+++ b/support/scripts/check-host-rpath
@@ -98,7 +98,7 @@ check_elf_has_rpath() {
 	    # PER_PACKAGE_DIR and therefore ${perpackagedir} points to
 	    # a non-existent directory, and this check will always be
 	    # false.
-            [[ ${dir} =~ ${perpackagedir}/[^/]+/host/lib ]] && return 0
+            [[ ${dir} =~ "${perpackagedir}/"[^/]+/host/lib ]] && return 0
         done
     done < <( readelf -d "${file}"                                              \
               |sed -r -e '/.* \(R(UN)?PATH\) +Library r(un)?path: \[(.+)\]$/!d' \
-- 
2.30.1 (Apple Git-130)

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] support/scripts: handle paths with regex characters in per-package
  2022-06-04  3:23 [Buildroot] [PATCH 1/1] support/scripts: handle paths with regex characters in per-package ckhardin
@ 2022-06-04  7:56 ` Yann E. MORIN
  2022-06-07 14:03 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2022-06-04  7:56 UTC (permalink / raw)
  To: ckhardin; +Cc: buildroot

Charles, All,

On 2022-06-03 20:23 -0700, ckhardin@gmail.com spake thusly:
> From: Charles Hardin <ckhardin@gmail.com>
> 
> Some constraints on a setup ended up with a plus sign in the path
> for historical reasons and would then fail to match on the comparison
> of the host/lib dir match. So, the =~ for bash can be augmented
> with a double quote expansion to preserve the literal value of
> the characters in the variable.
> 
> Example Path: /home/vagrant/test+buildroot/per-package
> 
> Signed-off-by: Charles Hardin <ckhardin@gmail.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  support/scripts/check-host-rpath | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/support/scripts/check-host-rpath b/support/scripts/check-host-rpath
> index 9a3866982b..b27cb883f3 100755
> --- a/support/scripts/check-host-rpath
> +++ b/support/scripts/check-host-rpath
> @@ -98,7 +98,7 @@ check_elf_has_rpath() {
>  	    # PER_PACKAGE_DIR and therefore ${perpackagedir} points to
>  	    # a non-existent directory, and this check will always be
>  	    # false.
> -            [[ ${dir} =~ ${perpackagedir}/[^/]+/host/lib ]] && return 0
> +            [[ ${dir} =~ "${perpackagedir}/"[^/]+/host/lib ]] && return 0
>          done
>      done < <( readelf -d "${file}"                                              \
>                |sed -r -e '/.* \(R(UN)?PATH\) +Library r(un)?path: \[(.+)\]$/!d' \
> -- 
> 2.30.1 (Apple Git-130)
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] support/scripts: handle paths with regex characters in per-package
  2022-06-04  3:23 [Buildroot] [PATCH 1/1] support/scripts: handle paths with regex characters in per-package ckhardin
  2022-06-04  7:56 ` Yann E. MORIN
@ 2022-06-07 14:03 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2022-06-07 14:03 UTC (permalink / raw)
  To: ckhardin; +Cc: buildroot

>>>>> "ckhardin" == ckhardin  <ckhardin@gmail.com> writes:

 > From: Charles Hardin <ckhardin@gmail.com>
 > Some constraints on a setup ended up with a plus sign in the path
 > for historical reasons and would then fail to match on the comparison
 > of the host/lib dir match. So, the =~ for bash can be augmented
 > with a double quote expansion to preserve the literal value of
 > the characters in the variable.

 > Example Path: /home/vagrant/test+buildroot/per-package

 > Signed-off-by: Charles Hardin <ckhardin@gmail.com>

Committed to 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-07 14:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-04  3:23 [Buildroot] [PATCH 1/1] support/scripts: handle paths with regex characters in per-package ckhardin
2022-06-04  7:56 ` Yann E. MORIN
2022-06-07 14:03 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox