support/scripts: handle paths with regex characters in per-package
PATCH 1/1 support/scripts: handle paths with regex characters in per-package
From: Charles Hardin <[email protected]>
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
--- support/scripts/check-host-rpath | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
support/scripts/check-host-rpath +1 -1
@@ -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' \
Signature · 6 lines
2.30.1 (Apple Git-130) _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedCharles, All,
On 2022-06-03 20:23 -0700, [email protected] spake thusly:
Quoted 11 lines
From: Charles Hardin <[email protected]>
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-packageSigned-off-by Charles Hardin <[email protected]>
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 24 lines
--- support/scripts/check-host-rpath | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)support/scripts/check-host-rpath +1
-1@@ -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' \Signature · 6 lines
2.30.1 (Apple Git-130) _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | 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 [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"ckhardin" == ckhardin <[email protected]> writes:
From: Charles Hardin <[email protected]>
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.
Quoted 3 lines
Example Path:
/home/vagrant/test+buildroot/per-packageSigned-off-by Charles Hardin <[email protected]>
Committed to 2022.02.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot