summaryrefslogtreecommitdiffstats
path: root/src/pacman/add.c
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2008-02-03 01:12:33 +0100
committerDan McGee <dan@archlinux.org>2008-02-03 01:55:24 +0100
commit96ee1bca2473ea32d647db0464653424e34b1e91 (patch)
tree2ce664c5aeb149218fce40a0c752e233a09e976a /src/pacman/add.c
parent37bb99abfa5672e101e34579882e22c7a1016a9b (diff)
downloadpacman-96ee1bca2473ea32d647db0464653424e34b1e91.tar.gz
pacman-96ee1bca2473ea32d647db0464653424e34b1e91.tar.xz
Clarify the "failed to add target" errors.
Make the error message printed when addtarget fails consistent between add.c, remove.c and sync.c. The main problem was that the "failed to add target" in case of a removal operation could sound confusing. There was also a little output problem with -U ("failed" was missing). Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/add.c')
-rw-r--r--src/pacman/add.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pacman/add.c b/src/pacman/add.c
index 975d26be..debe5c47 100644
--- a/src/pacman/add.c
+++ b/src/pacman/add.c
@@ -115,8 +115,9 @@ int pacman_add(alpm_list_t *targets)
for(i = targets; i; i = alpm_list_next(i)) {
char *targ = alpm_list_getdata(i);
if(alpm_trans_addtarget(targ) == -1) {
- fprintf(stderr, _("error: failed to add target '%s' (%s)"), targ,
- alpm_strerrorlast());
+ printf("failed.\n");
+ fprintf(stderr, _("error: '%s': %s\n"),
+ targ, alpm_strerrorlast());
add_cleanup();
return(1);
}