--- Begin Message ---
Subject: |
[PATCH] vala: Improper parsing of valac arguments leads to garbage in DIST_COMMON |
Date: |
Wed, 15 Oct 2014 17:17:00 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.1.2 |
Hi,
The parsing of valac flags is too permissive and incorrectly matches
some input, possibly leading to garbage in DIST_COMMON -- and then,
build failures.
The problem is that parsing of valac flags uses a non-anchored pattern
and so any argument happening to be a subset of a parsed argument will
match it, e.g. `vapi` will match against `--vapi` or `--internal-vapi`.
E.g. when using the following:
something_VALAFLAGS = --vapidir vapi --pkg foo
`--pkg` is recognized as an interesting argument (and so, added to
`DIST_COMMON`) because `vapi` (the argument for `--vapidir`) matched
against `--vapi`.
Please find attached a patch fixing the issue.
Regards,
Colomban
0001-vala-Fix-parsing-valac-flags.patch
Description: Text Data
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#18734: [PATCH] vala: Improper parsing of valac arguments leads to garbage in DIST_COMMON |
Date: |
Sun, 5 Apr 2020 18:39:01 -0600 |
- if (grep (/$lastflag/, ('-H', '-h', '--header', '--internal-header',
- '--vapi', '--internal-vapi', '--gir')))
+ if (grep (/^$lastflag$/, ('-H', '-h', '--header', '--internal-header',
+ '--vapi', '--internal-vapi', '--gir')))
{
I installed this change and am closing the bug. Thanks. --karl
--- End Message ---