Bug#820359: init-system-helpers: Handle \ escape in systemd unit names
nicholson at endlessm.com
Fri Apr 8 17:32:46 BST 2016
On Thu, Apr 7, 2016 at 12:27 PM, Dan Nicholson <nicholson at endlessm.com> wrote:
> On Thu, Apr 7, 2016 at 11:56 AM, Felipe Sateler <fsateler at debian.org> wrote:
>> AFAICT, the only difference between quotewords and split is that
>> quotewords takes into account quotes to allow "multiple words" to be
>> parsed as a single token. I don't think we have use for such a feature
>> (there are no such files in the archive).
>> So, unless I'm missing something, this could be further simplified to
>> just use split.
> Yeah, that does seem possible. The only fields parsed are WantedBy,
> RequiredBy, Also and Alias. Since the values here are unit names,
> there shouldn't be any instances where there's valid whitespace in the
> words. So, I think you could do split followed by quote stripping and
> everything would be fine. I'll try that out.
> Of course, if init-system-helpers ever does parse any fields might
> contain contain multiple quoted words, then you'd need to go back to
> using quotewords or something like that.
The attached patch seems to work in my testing.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5184 bytes
Desc: not available
More information about the Pkg-systemd-maintainers