[pacman-dev] [PATCH v2 2/2] libmakepkg: fix regression in sending plain() output to stderr

Allan McRae allan at archlinux.org
Thu Jun 11 00:53:13 UTC 2020


On 3/6/20 8:16 am, Eli Schwartz wrote:
> In commit 882e707e40bbade0111cf3bdedbdac4d4b70453b we changed message
> output to go to stdout by default, unless it was an error. The plain()
> function doesn't *look* like an error function, but in practice it was
> -- it's used to continue multiline messages, and all in-tree uses were
> for warning/error.
> 
> This is a problem both because we're sending output to the wrong place,
> and because in some cases, we were performing error logging from a
> function which would otherwise return a value to be captured in a
> variable using command substution.
> 
> Fix this and straighten out the API by providing two functions: one for
> continuing msg output, and one which wraps this by sending output to
> stderr, for continuing error output.
> 
> Change all callers to use the second function.
> 
> Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
> ---

I did not see this patch before reviewing v1.  This approach also looks
fine to me.  Pulling this version.

Allan


More information about the pacman-dev mailing list