summaryrefslogtreecommitdiffstats
path: root/src/pacman/add.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-04-26 22:23:59 +0200
committerDan McGee <dan@archlinux.org>2007-04-26 22:23:59 +0200
commit8d46cf6651e4593786621be62216c6ef9f03a172 (patch)
tree0055ed9889b5b6d6e02869d46179fd60f3cc8d2e /src/pacman/add.c
parentf2dabeb19f79544775e8f369710f267a6d087b24 (diff)
downloadpacman-8d46cf6651e4593786621be62216c6ef9f03a172.tar.gz
pacman-8d46cf6651e4593786621be62216c6ef9f03a172.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'src/pacman/add.c')
-rw-r--r--src/pacman/add.c14
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;
}