Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: ckhardin@gmail.com
To: buildroot@buildroot.org
Cc: Charles Hardin <ckhardin@gmail.com>
Subject: [Buildroot] [PATCH 1/1] support/scripts: handle paths with regex characters in per-package
Date: Fri,  3 Jun 2022 20:23:45 -0700	[thread overview]
Message-ID: <20220604032345.89818-1-ckhardin@gmail.com> (raw)

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

             reply	other threads:[~2022-06-04  3:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-04  3:23 ckhardin [this message]
2022-06-04  7:56 ` [Buildroot] [PATCH 1/1] support/scripts: handle paths with regex characters in per-package Yann E. MORIN
2022-06-07 14:03 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220604032345.89818-1-ckhardin@gmail.com \
    --to=ckhardin@gmail.com \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox