summaryrefslogtreecommitdiffstats
path: root/src/pacman/pacman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r--src/pacman/pacman.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 6bc284a3..7240e0fa 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -692,6 +692,16 @@ static int _parseconfig(const char *file, const char *givensection,
} else if (strcmp(key, "XferCommand") == 0) {
alpm_option_set_xfercommand(ptr);
pm_printf(PM_LOG_DEBUG, "config: xfercommand: %s\n", ptr);
+ } else if (strcmp(key, "CleanMethod") == 0) {
+ if (strcmp(ptr, "KeepInstalled") == 0) {
+ config->cleanmethod = PM_CLEAN_KEEPINST;
+ } else if (strcmp(ptr, "KeepCurrent") == 0) {
+ config->cleanmethod = PM_CLEAN_KEEPCUR;
+ } else {
+ pm_printf(PM_LOG_ERROR, _("invalid value for 'CleanMethod' : '%s'\n"), ptr);
+ return(1);
+ }
+ pm_printf(PM_LOG_DEBUG, "config: cleanmethod: %s\n", ptr);
} else {
pm_printf(PM_LOG_ERROR, _("config file %s, line %d: directive '%s' not recognized.\n"),
file, linenum, key);