[gnome-software/gnome-40: 1/3] rpm-ostree: Extract package details from the local .rpm file
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-40: 1/3] rpm-ostree: Extract package details from the local .rpm file
- Date: Mon, 19 Apr 2021 10:50:36 +0000 (UTC)
commit 09d8ec1e4a4d7b9c4f61d430eff9d2e9908ba180
Author: Milan Crha <mcrha redhat com>
Date: Fri Apr 16 14:11:07 2021 +0200
rpm-ostree: Extract package details from the local .rpm file
...when converting a file into an application instance.
plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
---
diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
index f21108d22..9e7da81ef 100644
--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
@@ -1927,6 +1927,21 @@ gs_plugin_file_to_app (GsPlugin *plugin,
app = gs_app_new (NULL);
gs_app_set_metadata (app, "GnomeSoftware::Creator", gs_plugin_get_name (plugin));
gs_app_set_management_plugin (app, gs_plugin_get_name (plugin));
+ if (h) {
+ const gchar *str;
+
+ str = headerGetString (h, RPMTAG_NAME);
+ if (str && *str)
+ gs_app_set_name (app, GS_APP_QUALITY_HIGHEST, str);
+
+ str = headerGetString (h, RPMTAG_SUMMARY);
+ if (str && *str)
+ gs_app_set_summary (app, GS_APP_QUALITY_HIGHEST, str);
+
+ str = headerGetString (h, RPMTAG_DESCRIPTION);
+ if (str && *str)
+ gs_app_set_description (app, GS_APP_QUALITY_HIGHEST, str);
+ }
gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT);
app_set_rpm_ostree_packaging_format (app);
gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]