Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/pacman/upgrade.c
diff options
context:
space:
mode:
authorAllan McRae <mcrae_allan@hotmail.com>2008-05-11 13:30:27 +1000
committerDan McGee <dan@archlinux.org>2008-05-11 20:05:28 -0500
commit3c3cb001a441656c2afba62f0361b83d4987339c (patch)
tree93434e85ea3ea40e6aa45009b9c11b67e4555e87 /src/pacman/upgrade.c
parent3175faace439158f5c18b20bb2358e845c4167e0 (diff)
Make all error messages use pm_fprintf
Tested using many easily generated error conditions. Also added "malloc failure" (conf.c) and "segmentation fault" (pacman.c) error messages for translation. Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> [Dan: fix trailing whitespace errors, other compilation issues] Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/upgrade.c')
-rw-r--r--src/pacman/upgrade.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c
index 589970ed..c54b3ed7 100644
--- a/src/pacman/upgrade.c
+++ b/src/pacman/upgrade.c
@@ -73,7 +73,7 @@ int pacman_upgrade(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: '%s': %s\n"),
+ pm_fprintf(stderr, PM_LOG_ERROR, "'%s': %s\n",
targ, alpm_strerrorlast());
trans_release();
return(1);
@@ -83,7 +83,7 @@ int pacman_upgrade(alpm_list_t *targets)
/* Step 2: "compute" the transaction based on targets and flags */
/* TODO: No, compute nothing. This is stupid. */
if(alpm_trans_prepare(&data) == -1) {
- fprintf(stderr, _("error: failed to prepare transaction (%s)\n"),
+ pm_fprintf(stderr, PM_LOG_ERROR, _("failed to prepare transaction (%s)\n"),
alpm_strerrorlast());
switch(pm_errno) {
case PM_ERR_UNSATISFIED_DEPS:
@@ -137,7 +137,8 @@ int pacman_upgrade(alpm_list_t *targets)
/* Step 3: perform the installation */
if(alpm_trans_commit(NULL) == -1) {
- fprintf(stderr, _("error: failed to commit transaction (%s)\n"), alpm_strerrorlast());
+ pm_fprintf(stderr, PM_LOG_ERROR, _("failed to commit transaction (%s)\n"),
+ alpm_strerrorlast());
trans_release();
return(1);
}