diff options
Diffstat (limited to 'src/pacman/add.c')
-rw-r--r-- | src/pacman/add.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pacman/add.c b/src/pacman/add.c index 20c7fd68..a42d2286 100644 --- a/src/pacman/add.c +++ b/src/pacman/add.c @@ -92,7 +92,7 @@ int pacman_add(alpm_list_t *targets) if(alpm_trans_init(transtype, config->flags, cb_trans_evt, cb_trans_conv, cb_trans_progress) == -1) { /* TODO: error messages should be in the front end, not the back */ - ERR(NL, "%s\n", alpm_strerror(pm_errno)); + fprintf(stderr, _("error: %s\n"), alpm_strerror(pm_errno)); if(pm_errno == PM_ERR_HANDLE_LOCK) { /* TODO this and the 2 other places should probably be on stderr */ printf(_(" if you're sure a package manager is not already\n" @@ -107,9 +107,8 @@ 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) { - /* TODO: glad this output is hacky */ - ERR(NL, _("failed to add target '%s' (%s)"), targ, - alpm_strerror(pm_errno)); + fprintf(stderr, _("error: failed to add target '%s' (%s)"), targ, + alpm_strerror(pm_errno)); retval = 1; goto cleanup; } @@ -121,7 +120,8 @@ int pacman_add(alpm_list_t *targets) if(alpm_trans_prepare(&data) == -1) { long long *pkgsize, *freespace; - ERR(NL, _("failed to prepare transaction (%s)\n"), alpm_strerror(pm_errno)); + fprintf(stderr, _("error: failed to prepare transaction (%s)\n"), + alpm_strerror(pm_errno)); switch(pm_errno) { case PM_ERR_UNSATISFIED_DEPS: for(i = data; i; i = alpm_list_next(i)) { @@ -195,7 +195,7 @@ int pacman_add(alpm_list_t *targets) /* Step 3: perform the installation */ if(alpm_trans_commit(NULL) == -1) { - ERR(NL, _("failed to commit transaction (%s)\n"), alpm_strerror(pm_errno)); + fprintf(stderr, _("error: failed to commit transaction (%s)\n"), alpm_strerror(pm_errno)); retval=1; goto cleanup; } @@ -205,7 +205,7 @@ cleanup: alpm_list_free(data); } if(alpm_trans_release() == -1) { - ERR(NL, _("failed to release transaction (%s)\n"), alpm_strerror(pm_errno)); + fprintf(stderr, _("error: failed to release transaction (%s)\n"), alpm_strerror(pm_errno)); retval=1; } |