]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb-add-index: quote PKGVERSION
authorSam James <sam@gentoo.org>
Wed, 19 Mar 2025 22:44:10 +0000 (22:44 +0000)
committerSam James <sam@gentoo.org>
Wed, 19 Mar 2025 22:47:14 +0000 (22:47 +0000)
In Gentoo, we configure our gdb with `--with-pkgversion=` with
"Gentoo VERSION XXXX" where XXX depends on patching (not that we patch
gdb really these days) or vanilla.

Since 71f193a5c1cb02dcde6ac160cdab88e9725862bb, this goes wrong, yielding
```
/usr/bin/gdb-add-index: 25: Syntax error: "(" unexpected
```

with lines 25-26 being:
```
PKGVERSION=(Gentoo 9999 vanilla)
VERSION=17.0.50.20250319-git
```

Quote both assignments (PKGVERSION by necessity, VERSION for consistency
or symmetry).

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32325

gdb/contrib/gdb-add-index.sh

index 4db123492f8b6669f379b830c55f2295c36fc48d..b299f830373389395788977d9dc3e70490c9a16b 100755 (executable)
@@ -22,8 +22,8 @@ GDB=${GDB:=gdb}
 OBJCOPY=${OBJCOPY:=objcopy}
 READELF=${READELF:=readelf}
 
-PKGVERSION=@PKGVERSION@
-VERSION=@VERSION@
+PKGVERSION="@PKGVERSION@"
+VERSION="@VERSION@"
 
 myname="${0##*/}"