[pacman-dev] [PATCH] makepkg: Don't interpret format specifiers in msg

Allan McRae allan at archlinux.org
Fri Feb 23 13:03:51 UTC 2018

On 23/02/18 21:55, Eli Schwartz wrote:
> On 02/23/2018 05:42 AM, Niklas Holm wrote:
>> Message string containing for example windows paths would have
>> unexpected behaviour. For example the message "Check C:\foo\bar" would
>> be printed as "Check C:<newline>  oar".
> I think you're missing the purpose of these functions. They are wrappers
> for printf, so that you can use them the same way you would use printf.
> That means that Windows paths and other things containing escape codes
> are meant to be interjected into msg the same way you would interject
> them into printf...
> msg "Check %s" "C:\foo\bar"
> This is working *exactly* as intended. You patch breaks that, because
> now we cannot provide gettext'ized $mesg arguments that contain %s
> format strings.

My question is, is the example purely hypothetical, or do we pass a path
not using a %s variable somewhere in the code base.


More information about the pacman-dev mailing list