summaryrefslogtreecommitdiffstats
path: root/src/pacman/remove.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-10-21 17:44:19 +0200
committerDan McGee <dan@archlinux.org>2011-10-21 17:45:18 +0200
commit9e9ecf218344cea86d6b8c6cf7cd246bcfcca98b (patch)
tree88ed783b6008148b670bb17f691aaf9d95f3bacb /src/pacman/remove.c
parent45f86ca1ca712857e6f84288cf818ce5707fc345 (diff)
downloadpacman-9e9ecf218344cea86d6b8c6cf7cd246bcfcca98b.tar.gz
pacman-9e9ecf218344cea86d6b8c6cf7cd246bcfcca98b.tar.xz
Remove pm_fprintf() in favor of pm_printf()
Now that pm_printf() always prints to stderr, we don't need this second function that was always used with stderr as the first argument. Thus, this patch removes the function and makes the following sed replacement: sed -i -e 's#pm_fprintf(stderr, #pm_printf(#g' src/pacman/*.c Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/remove.c')
-rw-r--r--src/pacman/remove.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 3fc8279c..1cdf5d36 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -39,7 +39,7 @@ static int remove_target(const char *target)
if((pkg = alpm_db_get_pkg(db_local, target)) != NULL) {
if(alpm_remove_pkg(config->handle, pkg) == -1) {
- pm_fprintf(stderr, ALPM_LOG_ERROR, "'%s': %s\n", target,
+ pm_printf(ALPM_LOG_ERROR, "'%s': %s\n", target,
alpm_strerror(alpm_errno(config->handle)));
return -1;
}
@@ -50,13 +50,13 @@ static int remove_target(const char *target)
/* fallback to group */
alpm_group_t *grp = alpm_db_readgroup(db_local, target);
if(grp == NULL) {
- pm_fprintf(stderr, ALPM_LOG_ERROR, "'%s': target not found\n", target);
+ pm_printf(ALPM_LOG_ERROR, "'%s': target not found\n", target);
return -1;
}
for(p = grp->packages; p; p = alpm_list_next(p)) {
pkg = alpm_list_getdata(p);
if(alpm_remove_pkg(config->handle, pkg) == -1) {
- pm_fprintf(stderr, ALPM_LOG_ERROR, "'%s': %s\n", target,
+ pm_printf(ALPM_LOG_ERROR, "'%s': %s\n", target,
alpm_strerror(alpm_errno(config->handle)));
return -1;
}
@@ -105,7 +105,7 @@ int pacman_remove(alpm_list_t *targets)
/* Step 2: prepare the transaction based on its type, targets and flags */
if(alpm_trans_prepare(config->handle, &data) == -1) {
enum _alpm_errno_t err = alpm_errno(config->handle);
- pm_fprintf(stderr, ALPM_LOG_ERROR, _("failed to prepare transaction (%s)\n"),
+ pm_printf(ALPM_LOG_ERROR, _("failed to prepare transaction (%s)\n"),
alpm_strerror(err));
switch(err) {
case ALPM_ERR_PKG_INVALID_ARCH:
@@ -166,7 +166,7 @@ int pacman_remove(alpm_list_t *targets)
}
if(alpm_trans_commit(config->handle, &data) == -1) {
- pm_fprintf(stderr, ALPM_LOG_ERROR, _("failed to commit transaction (%s)\n"),
+ pm_printf(ALPM_LOG_ERROR, _("failed to commit transaction (%s)\n"),
alpm_strerror(alpm_errno(config->handle)));
retval = 1;
}