alpm: ignore new options...

... instead of crashing. Also increase required libalpm version to >=15.0.0.
This commit is contained in:
Christian Hesse 2024-09-10 14:48:07 +02:00 committed by Martin Valba
parent 0eae057629
commit e2dbf59246
2 changed files with 12 additions and 6 deletions

View File

@ -1,4 +1,4 @@
alpm_dep = dependency('libalpm', version: '>=14.0.0')
alpm_dep = dependency('libalpm', version: '>=15.0.0')
shared_module(
'pk_backend_alpm',

View File

@ -605,18 +605,24 @@ pk_alpm_config_parse (PkAlpmConfig *config, const gchar *filename,
continue;
}
if (g_strcmp0 (key, "Usage") == 0 && str != NULL) {
/* Ignore "Usage" key instead of crashing */
/* ignore these instead of crashing */
if (g_strcmp0 (key, "CacheServer") == 0 && str != NULL) {
continue;
}
if (g_strcmp0 (key, "DisableSandbox") == 0) {
continue;
}
if (g_strcmp0 (key, "DownloadUser") == 0 && str != NULL) {
continue;
}
if (g_strcmp0 (key, "ParallelDownloads") == 0 && str != NULL) {
/* Ignore "ParallelDownloads" key instead of crashing */
continue;
}
if (g_strcmp0 (key, "CacheServer") == 0 && str != NULL) {
/* Ignore "CacheServer" key instead of crashing */
if (g_strcmp0 (key, "Usage") == 0 && str != NULL) {
continue;
}