From 8d46cf6651e4593786621be62216c6ef9f03a172 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 26 Apr 2007 16:23:59 -0400 Subject: Remove ERR calls from the code All ERR() calls have been replaced with fprintf(stderr, ...). Still to be done- fix all the newline issues that are sure to pop up. What fun! Signed-off-by: Dan McGee --- src/pacman/remove.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/pacman/remove.c') diff --git a/src/pacman/remove.c b/src/pacman/remove.c index 32570927..aef30144 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -83,7 +83,8 @@ int pacman_remove(alpm_list_t *targets) /* Step 1: create a new transaction */ if(alpm_trans_init(PM_TRANS_TYPE_REMOVE, config->flags, cb_trans_evt, cb_trans_conv, cb_trans_progress) == -1) { - ERR(NL, _("failed to init transaction (%s)\n"), alpm_strerror(pm_errno)); + fprintf(stderr, _("error: failed to init transaction (%s)\n"), + alpm_strerror(pm_errno)); if(pm_errno == PM_ERR_HANDLE_LOCK) { printf(_(" if you're sure a package manager is not already\n" " running, you can remove %s%s.\n"), @@ -99,8 +100,8 @@ int pacman_remove(alpm_list_t *targets) char *targ = alpm_list_getdata(i); if(alpm_trans_addtarget(targ) == -1) { printf("failed.\n"); - ERR(NL, _("failed to add target '%s' (%s)\n"), targ, - alpm_strerror(pm_errno)); + fprintf(stderr, _("error: failed to add target '%s' (%s)\n"), targ, + alpm_strerror(pm_errno)); retval = 1; goto cleanup; } @@ -108,7 +109,8 @@ int pacman_remove(alpm_list_t *targets) /* Step 2: prepare the transaction based on its type, targets and flags */ if(alpm_trans_prepare(&data) == -1) { - 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)) { @@ -148,7 +150,8 @@ int pacman_remove(alpm_list_t *targets) /* Step 3: actually perform the removal */ 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; } @@ -157,7 +160,8 @@ int pacman_remove(alpm_list_t *targets) cleanup: FREELIST(finaltargs); 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; } -- cgit v1.2.3