[gnome-software: 1/3] hardcoded-popular: Drop plugin in favour of an appstream file
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 1/3] hardcoded-popular: Drop plugin in favour of an appstream file
- Date: Thu, 10 Feb 2022 15:56:40 +0000 (UTC)
commit dc41ee54e8348c84a5b0adc353d524927ac391ff
Author: Philip Withnall <pwithnall endlessos org>
Date: Wed Feb 9 15:37:05 2022 +0000
hardcoded-popular: Drop plugin in favour of an appstream file
It seems simpler to implement this as an appstream file, the same way
the default featured apps list is implemented, given that many
distributions:
a) are going to disable the plugin anyway; and
b) need an example of the appstream needed to mark their own list of
applications as popular.
‘Popular’ applications are what’s shown in the “Editor’s Pick” section
of the overview page.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
contrib/gnome-software.spec.in | 1 -
data/assets/meson.build | 6 +++
data/assets/org.gnome.Software.Popular.xml | 52 ++++++++++++++++++
meson_options.txt | 2 +-
plugins/core/gs-plugin-hardcoded-popular.c | 86 ------------------------------
plugins/core/gs-plugin-hardcoded-popular.h | 22 --------
plugins/core/meson.build | 15 ------
plugins/snap/gs-plugin-snap.c | 3 --
8 files changed, 59 insertions(+), 128 deletions(-)
---
diff --git a/contrib/gnome-software.spec.in b/contrib/gnome-software.spec.in
index f3b35578b..497f7b08f 100644
--- a/contrib/gnome-software.spec.in
+++ b/contrib/gnome-software.spec.in
@@ -155,7 +155,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{gs_plugin_dir}/libgs_plugin_fwupd.so
%{gs_plugin_dir}/libgs_plugin_generic-updates.so
%{gs_plugin_dir}/libgs_plugin_hardcoded-blocklist.so
-%{gs_plugin_dir}/libgs_plugin_hardcoded-popular.so
%{gs_plugin_dir}/libgs_plugin_icons.so
%{gs_plugin_dir}/libgs_plugin_modalias.so
%{gs_plugin_dir}/libgs_plugin_os-release.so
diff --git a/data/assets/meson.build b/data/assets/meson.build
index 7eed5cd65..2f0ed4b51 100644
--- a/data/assets/meson.build
+++ b/data/assets/meson.build
@@ -3,3 +3,9 @@ if get_option('default_featured_apps')
install_dir : join_paths(get_option('datadir'), 'app-info', 'xmls'),
)
endif
+
+if get_option('hardcoded_popular')
+ install_data('org.gnome.Software.Popular.xml',
+ install_dir : join_paths(get_option('datadir'), 'app-info', 'xmls'),
+ )
+endif
diff --git a/data/assets/org.gnome.Software.Popular.xml b/data/assets/org.gnome.Software.Popular.xml
new file mode 100644
index 000000000..6b0afeb08
--- /dev/null
+++ b/data/assets/org.gnome.Software.Popular.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components>
+ <!-- Arbitrary list of popular GNOME apps -->
+ <component merge="append">
+ <id>org.gnome.Builder</id>
+ <kudos>
+ <kudo>GnomeSoftware::popular</kudo>
+ </kudos>
+ </component>
+ <component merge="append">
+ <id>org.gnome.clocks</id>
+ <kudos>
+ <kudo>GnomeSoftware::popular</kudo>
+ </kudos>
+ </component>
+ <component merge="append">
+ <id>org.gnome.Dictionary</id>
+ <kudos>
+ <kudo>GnomeSoftware::popular</kudo>
+ </kudos>
+ </component>
+ <component merge="append">
+ <id>org.gnome.Documents</id>
+ <kudos>
+ <kudo>GnomeSoftware::popular</kudo>
+ </kudos>
+ </component>
+ <component merge="append">
+ <id>org.gnome.Evince</id>
+ <kudos>
+ <kudo>GnomeSoftware::popular</kudo>
+ </kudos>
+ </component>
+ <component merge="append">
+ <id>org.gnome.gedit</id>
+ <kudos>
+ <kudo>GnomeSoftware::popular</kudo>
+ </kudos>
+ </component>
+ <component merge="append">
+ <id>org.gnome.Maps</id>
+ <kudos>
+ <kudo>GnomeSoftware::popular</kudo>
+ </kudos>
+ </component>
+ <component merge="append">
+ <id>org.gnome.Weather</id>
+ <kudos>
+ <kudo>GnomeSoftware::popular</kudo>
+ </kudos>
+ </component>
+</components>
diff --git a/meson_options.txt b/meson_options.txt
index 70f62c52b..57658e2fe 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -15,7 +15,7 @@ option('snap', type : 'boolean', value : false, description : 'enable Snap suppo
option('external_appstream', type : 'boolean', value : false, description : 'enable external AppStream
support')
option('valgrind', type : 'boolean', value : true, description : 'enable Valgrind debugging integration')
option('gtk_doc', type : 'boolean', value : true, description : 'enable API reference')
-option('hardcoded_popular', type : 'boolean', value : true, description : 'enable hardcoded-popular apps
plugin')
+option('hardcoded_popular', type : 'boolean', value : true, description : 'enable installation of default
popular apps list')
option('default_featured_apps', type : 'boolean', value : true, description : 'enable installation of
default featured apps list')
option('mogwai', type : 'boolean', value : false, description : 'enable metered data support using Mogwai')
option('sysprof', type : 'feature', value : 'auto', description : 'enable sysprof-capture support for
profiling')
diff --git a/plugins/core/meson.build b/plugins/core/meson.build
index 70e0b766c..ca11ade2c 100644
--- a/plugins/core/meson.build
+++ b/plugins/core/meson.build
@@ -84,21 +84,6 @@ shared_module(
dependencies : plugin_libs,
)
-if get_option('hardcoded_popular')
- shared_module(
- 'gs_plugin_hardcoded-popular',
- sources : 'gs-plugin-hardcoded-popular.c',
- include_directories : [
- include_directories('../..'),
- include_directories('../../lib'),
- ],
- install : true,
- install_dir: plugin_dir,
- c_args : cargs,
- dependencies : plugin_libs,
- )
-endif
-
shared_module(
'gs_plugin_rewrite-resource',
sources : 'gs-plugin-rewrite-resource.c',
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index dbd96bce1..d0953275f 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -148,9 +148,6 @@ gs_plugin_snap_init (GsPluginSnap *self)
gs_plugin_add_rule (GS_PLUGIN (self), GS_PLUGIN_RULE_BETTER_THAN, "packagekit");
gs_plugin_add_rule (GS_PLUGIN (self), GS_PLUGIN_RULE_RUN_BEFORE, "icons");
- /* Override hardcoded popular apps */
- gs_plugin_add_rule (GS_PLUGIN (self), GS_PLUGIN_RULE_RUN_BEFORE, "hardcoded-popular");
-
/* set name of MetaInfo file */
gs_plugin_set_appstream_id (GS_PLUGIN (self), "org.gnome.Software.Plugin.Snap");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]