From 98df67cd183bf75065d3e7a0f892427c4de21143 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Fri, 28 Oct 2005 12:20:40 +0000 Subject: added pmconfig_t structure to hold all the configuration (patch from VMiklos ) --- src/pacman/remove.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/pacman/remove.c') diff --git a/src/pacman/remove.c b/src/pacman/remove.c index fd292151..100e22f3 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -29,8 +29,9 @@ #include "log.h" #include "list.h" #include "trans.h" +#include "conf.h" -extern unsigned char pmo_flags; +extern pmconfig_t *config; extern PM_DB *db_local; @@ -73,7 +74,7 @@ int pacman_remove(list_t *targets) /* Step 1: create a new transaction */ - if(alpm_trans_init(PM_TRANS_TYPE_REMOVE, pmo_flags, cb_trans_evt, cb_trans_conv) == -1) { + if(alpm_trans_init(PM_TRANS_TYPE_REMOVE, config->flags, cb_trans_evt, cb_trans_conv) == -1) { ERR(NL, "failed to init transaction (%s)\n", alpm_strerror(pm_errno)); goto error; } @@ -106,7 +107,7 @@ int pacman_remove(list_t *targets) /* Warn user in case of dangerous operation */ - if(pmo_flags & PM_TRANS_FLAG_RECURSE || pmo_flags & PM_TRANS_FLAG_CASCADE) { + if(config->flags & PM_TRANS_FLAG_RECURSE || config->flags & PM_TRANS_FLAG_CASCADE) { PM_LIST *lp; /* list transaction targets */ for(lp = alpm_list_first(alpm_trans_getinfo(PM_TRANS_PACKAGES)); lp; lp = alpm_list_next(lp)) { -- cgit v1.2.3