[COMMITTED] gcore: quote PKGVERSION

Message ID d19d6bc17e0a160ce27fc572079f11a587c0e168.1742424869.git.sam@gentoo.org
State New
Headers
Series [COMMITTED] gcore: quote PKGVERSION |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply

Commit Message

Sam James March 19, 2025, 10:54 p.m. UTC
  Same as 3bed686102cb14552d2ed1b83336453d7ce0dd47. I didn't hit an issue
here -- I think because my /bin/sh is dash and gdb-add-index has a /bin/sh
shebang, while gcore uses bash, but it's still worth fixing (we certainly
do NOT want this to be an array).

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32325
---
Committed as obvious.

 gdb/gcore-1.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: d1da7bb43ecab2425a1135f09d6f62c9a7f63ae7
prerequisite-patch-id: 150770719d3d2da9482d99062bdbc7bcf82b3633
  

Comments

Simon Marchi March 20, 2025, 12:34 a.m. UTC | #1
On 2025-03-19 18:54, Sam James wrote:
> Same as 3bed686102cb14552d2ed1b83336453d7ce0dd47. I didn't hit an issue
> here -- I think because my /bin/sh is dash and gdb-add-index has a /bin/sh
> shebang, while gcore uses bash, but it's still worth fixing (we certainly
> do NOT want this to be an array).
> 
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32325
> ---
> Committed as obvious.

If you feel like it, could you fix the other problems shown by
shellcheck in these two files?  There seems to be more problems like
this lurking.

Thanks,

Simon
  
Sam James March 20, 2025, 12:53 a.m. UTC | #2
Simon Marchi <simark@simark.ca> writes:

> On 2025-03-19 18:54, Sam James wrote:
>> Same as 3bed686102cb14552d2ed1b83336453d7ce0dd47. I didn't hit an issue
>> here -- I think because my /bin/sh is dash and gdb-add-index has a /bin/sh
>> shebang, while gcore uses bash, but it's still worth fixing (we certainly
>> do NOT want this to be an array).
>> 
>> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32325
>> ---
>> Committed as obvious.
>
> If you feel like it, could you fix the other problems shown by
> shellcheck in these two files?  There seems to be more problems like
> this lurking.

I'll take a look if you promise to review ;)

>
> Thanks,
>
> Simon
  

Patch

diff --git a/gdb/gcore-1.in b/gdb/gcore-1.in
index 129e3697fb7..c0979a51db3 100644
--- a/gdb/gcore-1.in
+++ b/gdb/gcore-1.in
@@ -20,8 +20,8 @@ 
 # It starts up gdb, attaches to the given PID and invokes the gcore command.
 #
 
-PKGVERSION=@PKGVERSION@
-VERSION=@VERSION@
+PKGVERSION="@PKGVERSION@"
+VERSION="@VERSION@"
 
 # Need to check for -o option, but set default basename to "core".
 prefix=core