[gnome-software] rpm-ostree: Override COMPULSORY quirk for layered packages
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] rpm-ostree: Override COMPULSORY quirk for layered packages
- Date: Thu, 14 Feb 2019 11:11:37 +0000 (UTC)
commit 67642bce5b94973dac2e507dc833c0aa98e430e3
Author: Kalev Lember <klember redhat com>
Date: Thu Feb 14 11:59:21 2019 +0100
rpm-ostree: Override COMPULSORY quirk for layered packages
Remove the COMPULSORY quirk set in appstream data for layered packages
as these are always supposed to be removable.
plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
index 4848aa66..61acdc53 100644
--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
@@ -925,9 +925,12 @@ resolve_packages_app (GsPlugin *plugin,
if (g_strcmp0 (rpm_ostree_package_get_name (pkg), gs_app_get_source_default (app)) == 0) {
gs_app_set_version (app, rpm_ostree_package_get_evr (pkg));
gs_app_set_state (app, AS_APP_STATE_INSTALLED);
- if (!g_strv_contains ((const gchar * const *) layered_packages,
- rpm_ostree_package_get_name (pkg))) {
- /* on rpm-ostree this package cannot be removed 'live' */
+ if (g_strv_contains ((const gchar * const *) layered_packages,
+ rpm_ostree_package_get_name (pkg))) {
+ /* layered packages can always be removed */
+ gs_app_remove_quirk (app, GS_APP_QUIRK_COMPULSORY);
+ } else {
+ /* can't remove packages that are part of the base system */
gs_app_add_quirk (app, GS_APP_QUIRK_COMPULSORY);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]