Commit 9f236547 authored by Oskar Roesler (bionade24) via pacman-dev's avatar Oskar Roesler (bionade24) via pacman-dev Committed by Allan McRae
Browse files

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: default avatarOskar Roesler (bionade24) <o.roesler@oscloud.info>
Signed-off-by: Allan McRae's avatarAllan McRae <allan@archlinux.org>
parent 58c81fa2
Pipeline #14158 passed with stage
in 1 minute and 59 seconds
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment