[gnome-software] rpm-ostree: Set HIDE_FROM_SEARCH quirk for apps we don't want to show
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] rpm-ostree: Set HIDE_FROM_SEARCH quirk for apps we don't want to show
- Date: Thu, 2 May 2019 11:23:20 +0000 (UTC)
commit 8ff12e84acc6f2e0723d908b9c0968cfc6d57b03
Author: Kalev Lember <klember redhat com>
Date: Fri Apr 19 07:31:56 2019 +0200
rpm-ostree: Set HIDE_FROM_SEARCH quirk for apps we don't want to show
The plan for Fedora Silverblue is to use rpm-ostree layering for things
that are non-apps (e.g. hardware support, codecs, fonts etc that
supplement the base system), and only offer apps through flatpak.
This commit makes it so that available apps don't show up in search, but
anything already installed still gets correctly shown (so that they are
removable / launchable /updatable etc).
plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
index ae2f2435..a0509926 100644
--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
@@ -1229,6 +1229,19 @@ resolve_available_packages_app (GsPlugin *plugin,
gs_app_set_name (app, GS_APP_QUALITY_LOWEST, dnf_package_get_name (pkg));
gs_app_set_summary (app, GS_APP_QUALITY_LOWEST, dnf_package_get_summary (pkg));
+ /* set hide-from-search quirk for available apps we don't want to show */
+ if (!gs_app_is_installed (app)) {
+ switch (gs_app_get_kind (app)) {
+ case AS_APP_KIND_DESKTOP:
+ case AS_APP_KIND_WEB_APP:
+ case AS_APP_KIND_CONSOLE:
+ gs_app_add_quirk (app, GS_APP_QUIRK_HIDE_FROM_SEARCH);
+ break;
+ default:
+ break;
+ }
+ }
+
return TRUE /* found */;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]