[pacman-dev] [PATCH] Print callback messages to stderr

Allan McRae allan at archlinux.org
Sat Aug 20 01:15:34 EDT 2011


On 20/08/11 12:42, Allan McRae wrote:
> Fixes FS#25099.
>
> Signed-off-by: Allan McRae<allan at archlinux.org>
> ---
>   src/pacman/callback.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/pacman/callback.c b/src/pacman/callback.c
> index 873e3fc..5ee4e5a 100644
> --- a/src/pacman/callback.c
> +++ b/src/pacman/callback.c
> @@ -690,7 +690,7 @@ void cb_log(alpm_loglevel_t level, const char *fmt, va_list args)
>   			output = alpm_list_add(output, string);
>   		}
>   	} else {
> -		pm_vfprintf(stdout, level, fmt, args);
> +		pm_vfprintf(stderr, level, fmt, args);
>   	}
>   }
>


This breaks some pactests because stdout/stderr output is not being kept 
in sync so timestamps with --debug get printed all over the place. e.g.

 > ./src/pacman/pacman -T glibc --debug
<snip>
debug: unregistering database 'local'
debug: freeing package cache for repository 'local'
debug: unregistering database 'allanbrokeit'
debug: unregistering database 'kernel64'
debug: unregistering database 'testing'
debug: unregistering database 'core'
debug: unregistering database 'extra'
debug: unregistering database 'community-testing'
debug: unregistering database 'community'
[15:11:34] [15:11:34] [15:11:34] [15:11:34] [15:11:34] [15:11:34] 
[15:11:34] [15:11:34] [15:11:34]



More information about the pacman-dev mailing list