Commit 6a9ff6a
committed
qb: fix config.params.sh parser break from 41dd469 + harden parser
Commit 41dd469 added a three-line '#' comment block above the new
HAVE_RETROARCH_PLAYLIST_MANAGER entry in qb/config.params.sh:
# RetroArchPlaylistManager (iOS/tvOS playlist helper, also fine on
# modern macOS). Auto-disabled on pre-10.11 macOS targets by
# config.libs.sh because the file uses Xcode 7-era Obj-C syntax.
HAVE_RETROARCH_PLAYLIST_MANAGER=auto
which breaks configure with:
qb/qb.params.sh: line 102: USER_#=auto: command not found
qb/config.params.sh is parsed line-by-line by parse_input() using
a plain 'while read -r VAR _' - '#' is not a comment introducer
in that loop, it's just the first whitespace-separated token of a
data line. On each '#' line, VAR becomes '#', TMPVAR becomes '#',
NEWVAR becomes '#', and 'eval "USER_$NEWVAR=auto"' tries to run
'USER_#=auto' as a command. The whole file's convention is inline
comments on HAVE_X=... lines only; no standalone '#' lines existed
before this one.
Two changes:
qb/config.params.sh: fold the multi-line comment into a single
inline '#' comment on the assignment line, matching the rest of
the file.
qb/qb.params.sh: harden parse_input() to skip blank lines and
'#'-starting lines up front. This doesn't change behaviour on
today's well-formed file, but prevents the same foot-gun from
biting anyone else who adds a comment block.1 parent 41dd469 commit 6a9ff6a
2 files changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
| 218 | + | |
222 | 219 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
| |||
0 commit comments