Veto apps that have empty OnlyShowIn=
https://bugzilla.redhat.com/show_bug.cgi?id=1568492
This commit is contained in:
parent
52d19efdab
commit
e5c61dc644
34
0001-Veto-apps-that-have-empty-OnlyShowIn.patch
Normal file
34
0001-Veto-apps-that-have-empty-OnlyShowIn.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 5a7d76de734b049192b5b992a1e54117b98de733 Mon Sep 17 00:00:00 2001
|
||||
From: Kalev Lember <klember@redhat.com>
|
||||
Date: Tue, 17 Apr 2018 13:14:19 +0200
|
||||
Subject: [PATCH] Veto apps that have empty OnlyShowIn=
|
||||
|
||||
Apps that have OnlyShowIn= are equivalent to NoDisplay=True (gnome-shell
|
||||
doesn't show them). Veto such apps to avoid them inadvertently showing
|
||||
up in gnome-software and to match gnome-shell behaviour.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1567689
|
||||
https://gitlab.gnome.org/GNOME/gnome-software/issues/367
|
||||
---
|
||||
libappstream-glib/as-app-desktop.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libappstream-glib/as-app-desktop.c b/libappstream-glib/as-app-desktop.c
|
||||
index fadf4ab006ec..ee5742dac663 100644
|
||||
--- a/libappstream-glib/as-app-desktop.c
|
||||
+++ b/libappstream-glib/as-app-desktop.c
|
||||
@@ -324,7 +324,10 @@ as_app_parse_file_key (AsApp *app,
|
||||
G_KEY_FILE_DESKTOP_GROUP,
|
||||
key,
|
||||
NULL, NULL);
|
||||
- if (g_strv_length (list) == 1)
|
||||
+ /* "OnlyShowIn=" is the same as "NoDisplay=True" */
|
||||
+ if (g_strv_length (list) == 0)
|
||||
+ as_app_add_veto (app, "Empty OnlyShowIn");
|
||||
+ else if (g_strv_length (list) == 1)
|
||||
as_app_set_project_group (app, list[0]);
|
||||
|
||||
/* Name */
|
||||
--
|
||||
2.17.0
|
||||
|
||||
@ -6,13 +6,14 @@
|
||||
Summary: Library for AppStream metadata
|
||||
Name: libappstream-glib
|
||||
Version: 0.7.7
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: LGPLv2+
|
||||
URL: http://people.freedesktop.org/~hughsient/appstream-glib/
|
||||
Source0: http://people.freedesktop.org/~hughsient/appstream-glib/releases/appstream-glib-%{version}.tar.xz
|
||||
|
||||
# Backported from upstream
|
||||
Patch0: 0001-Add-as_utils_unique_id_match.patch
|
||||
Patch1: 0001-Veto-apps-that-have-empty-OnlyShowIn.patch
|
||||
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
BuildRequires: docbook-utils
|
||||
@ -148,6 +149,9 @@ GLib headers and libraries for appstream-builder.
|
||||
%{_datadir}/gir-1.0/AppStreamBuilder-1.0.gir
|
||||
|
||||
%changelog
|
||||
* Tue Apr 17 2018 Kalev Lember <klember@redhat.com> 0.7.7-3
|
||||
- Veto apps that have empty OnlyShowIn= (#1568492)
|
||||
|
||||
* Thu Mar 15 2018 Kalev Lember <klember@redhat.com> 0.7.7-2
|
||||
- Backport a patch to add as_utils_unique_id_match()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user