pacman: add AllowPartialUpgrades option

This commit is contained in:
morganamilo 2024-03-16 05:33:29 +00:00
parent e13d6d805e
commit 0a7ecd3990
No known key found for this signature in database
GPG key ID: E48D0A8326DE47C5
2 changed files with 4 additions and 0 deletions

View file

@ -813,6 +813,7 @@ static int register_repo(config_repo_t *repo)
pm_printf(ALPM_LOG_DEBUG, "setting usage of %d for %s repository\n", pm_printf(ALPM_LOG_DEBUG, "setting usage of %d for %s repository\n",
repo->usage, repo->name); repo->usage, repo->name);
alpm_db_set_usage(db, repo->usage); alpm_db_set_usage(db, repo->usage);
alpm_db_set_allow_partial_upgrades(db, repo->allow_partial);
for(i = repo->cache_servers; i; i = alpm_list_next(i)) { for(i = repo->cache_servers; i; i = alpm_list_next(i)) {
const char *value = i->data; const char *value = i->data;
@ -1034,6 +1035,8 @@ static int _parse_repo(const char *key, char *value, const char *file,
} }
FREELIST(values); FREELIST(values);
} }
} else if(strcmp(key, "AllowPartialUpgrades") == 0) {
repo->allow_partial = 1;
} else { } else {
pm_printf(ALPM_LOG_WARNING, pm_printf(ALPM_LOG_WARNING,
_("config file %s, line %d: directive '%s' in section '%s' not recognized.\n"), _("config file %s, line %d: directive '%s' in section '%s' not recognized.\n"),

View file

@ -40,6 +40,7 @@ typedef struct __config_repo_t {
alpm_list_t *cache_servers; alpm_list_t *cache_servers;
alpm_list_t *servers; alpm_list_t *servers;
int usage; int usage;
int allow_partial;
int siglevel; int siglevel;
int siglevel_mask; int siglevel_mask;
} config_repo_t; } config_repo_t;