From 9f23654722b849b76ec15f6513ecb9265540ea59 Mon Sep 17 00:00:00 2001 From: "Oskar Roesler (bionade24) via pacman-dev" Date: Thu, 3 Jun 2021 11:16:30 +0200 Subject: [PATCH] pacman: print additional error information to stderr Prints extra information provided by file conflict or corrupt package messages to stderr instead of stdout Signed-off-by: Oskar Roesler (bionade24) Signed-off-by: Allan McRae --- src/pacman/sync.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 25b08866..37e4732c 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -836,15 +836,15 @@ int sync_prepare_execute(void) alpm_fileconflict_t *conflict = i->data; switch(conflict->type) { case ALPM_FILECONFLICT_TARGET: - printf(_("%s exists in both '%s' and '%s'\n"), + fprintf(stderr, _("%s exists in both '%s' and '%s'\n"), conflict->file, conflict->target, conflict->ctarget); break; case ALPM_FILECONFLICT_FILESYSTEM: if(conflict->ctarget[0]) { - printf(_("%s: %s exists in filesystem (owned by %s)\n"), + fprintf(stderr, _("%s: %s exists in filesystem (owned by %s)\n"), conflict->target, conflict->file, conflict->ctarget); } else { - printf(_("%s: %s exists in filesystem\n"), + fprintf(stderr, _("%s: %s exists in filesystem\n"), conflict->target, conflict->file); } break; @@ -857,7 +857,7 @@ int sync_prepare_execute(void) case ALPM_ERR_PKG_INVALID_SIG: for(i = data; i; i = alpm_list_next(i)) { char *filename = i->data; - printf(_("%s is invalid or corrupted\n"), filename); + fprintf(stderr, _("%s is invalid or corrupted\n"), filename); free(filename); } break;