From e7bb0f8824a916c1537dd83735cd8aeccdcd0f3f Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 2 Mar 2019 18:40:19 +1000 Subject: Make pacman forget deltas exist Dummy callbacks are still present to prevent compiler warnings until libalpm is delta free. Also remove Delta parsing from pacman.conf. Signed-off-by: Allan McRae --- src/pacman/conf.c | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'src/pacman/conf.c') diff --git a/src/pacman/conf.c b/src/pacman/conf.c index cca3657e..3b79fbc7 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -103,7 +103,6 @@ config_t *config_new(void) newconfig->op = PM_OP_MAIN; newconfig->logmask = ALPM_LOG_ERROR | ALPM_LOG_WARNING; newconfig->configfile = strdup(CONFFILE); - newconfig->deltaratio = 0.0; if(alpm_capabilities() & ALPM_CAPABILITY_SIGNATURES) { newconfig->siglevel = ALPM_SIG_PACKAGE | ALPM_SIG_PACKAGE_OPTIONAL | ALPM_SIG_DATABASE | ALPM_SIG_DATABASE_OPTIONAL; @@ -485,9 +484,6 @@ static int _parse_options(const char *key, char *value, } else if(strcmp(key, "VerbosePkgLists") == 0) { config->verbosepkglists = 1; pm_printf(ALPM_LOG_DEBUG, "config: verbosepkglists\n"); - } else if(strcmp(key, "UseDelta") == 0) { - config->deltaratio = 0.7; - pm_printf(ALPM_LOG_DEBUG, "config: usedelta (default 0.7)\n"); } else if(strcmp(key, "TotalDownload") == 0) { config->totaldownload = 1; pm_printf(ALPM_LOG_DEBUG, "config: totaldownload\n"); @@ -525,26 +521,6 @@ static int _parse_options(const char *key, char *value, if(!config->arch) { config_set_arch(value); } - } else if(strcmp(key, "UseDelta") == 0) { - double ratio; - char *endptr; - const char *oldlocale; - - /* set the locale to 'C' for consistent decimal parsing (0.7 and never - * 0,7) from config files, then restore old setting when we are done */ - oldlocale = setlocale(LC_NUMERIC, NULL); - setlocale(LC_NUMERIC, "C"); - ratio = strtod(value, &endptr); - setlocale(LC_NUMERIC, oldlocale); - - if(*endptr != '\0' || ratio < 0.0 || ratio > 2.0) { - pm_printf(ALPM_LOG_ERROR, - _("config file %s, line %d: invalid value for '%s' : '%s'\n"), - file, linenum, "UseDelta", value); - return 1; - } - config->deltaratio = ratio; - pm_printf(ALPM_LOG_DEBUG, "config: usedelta = %f\n", ratio); } else if(strcmp(key, "DBPath") == 0) { /* don't overwrite a path specified on the command line */ if(!config->dbpath) { @@ -766,7 +742,6 @@ static int setup_libalpm(void) alpm_option_set_arch(handle, config->arch); alpm_option_set_checkspace(handle, config->checkspace); alpm_option_set_usesyslog(handle, config->usesyslog); - alpm_option_set_deltaratio(handle, config->deltaratio); alpm_option_set_ignorepkgs(handle, config->ignorepkg); alpm_option_set_ignoregroups(handle, config->ignoregrp); -- cgit v1.2.3-54-g00ecf