Accepting request 292065 from GNOME:Next
retry OBS-URL: https://build.opensuse.org/request/show/292065 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/appstream-glib?expand=0&rev=25
This commit is contained in:
parent
1312f66845
commit
b36b862159
@ -0,0 +1,32 @@
|
|||||||
|
From 81d941cb916a07988fa382617402ccd2b359c7bb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
Date: Tue, 17 Mar 2015 15:05:34 +0100
|
||||||
|
Subject: [PATCH] Add yast2-branding-openSUSE if an app depends on yast2
|
||||||
|
|
||||||
|
---
|
||||||
|
libappstream-builder/asb-task.c | 9 +++++++++
|
||||||
|
1 file changed, 9 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/libappstream-builder/asb-task.c b/libappstream-builder/asb-task.c
|
||||||
|
index cc681e2..411af5a 100644
|
||||||
|
--- a/libappstream-builder/asb-task.c
|
||||||
|
+++ b/libappstream-builder/asb-task.c
|
||||||
|
@@ -196,6 +196,15 @@ asb_task_explode_extra_packages (AsbTask *task, GError **error)
|
||||||
|
GINT_TO_POINTER (1));
|
||||||
|
g_ptr_array_add (icon_themes,
|
||||||
|
g_strdup ("oxygen-icon-theme"));
|
||||||
|
+ /* Applications depending on yast2 have an implicit dependency
|
||||||
|
+ * on yast2-branding-openSUSE, which brings required icons in this case.
|
||||||
|
+ */
|
||||||
|
+ } else if (g_strcmp0 (tmp, "yast2-branding-openSUSE") == 0 ||
|
||||||
|
+ g_strcmp0 (tmp, "yast2") == 0) {
|
||||||
|
+ g_hash_table_insert (hash, g_strdup ("yast2-branding-openSUSE"),
|
||||||
|
+ GINT_TO_POINTER (1));
|
||||||
|
+ g_ptr_array_add (icon_themes,
|
||||||
|
+ g_strdup ("yast2-branding-openSUSE"));
|
||||||
|
} else {
|
||||||
|
g_ptr_array_add (array, g_strdup (tmp));
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.3.1
|
||||||
|
|
78
appstream-glib-uninstall-var-cache.patch
Normal file
78
appstream-glib-uninstall-var-cache.patch
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
From 23e46811a6277f53f76c1cccff883ba8cc6db6cc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Richard Hughes <richard@hughsie.com>
|
||||||
|
Date: Thu, 19 Mar 2015 20:02:21 +0000
|
||||||
|
Subject: [PATCH] Allow uninstalling AppStream files from /var/cache
|
||||||
|
|
||||||
|
---
|
||||||
|
client/as-util.c | 44 ++++++++++++++++++++++----------------------
|
||||||
|
1 file changed, 22 insertions(+), 22 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/client/as-util.c b/client/as-util.c
|
||||||
|
index 5b35349..bc61edf 100644
|
||||||
|
--- a/client/as-util.c
|
||||||
|
+++ b/client/as-util.c
|
||||||
|
@@ -1473,9 +1473,8 @@ static gboolean
|
||||||
|
as_util_uninstall (AsUtilPrivate *priv, gchar **values, GError **error)
|
||||||
|
{
|
||||||
|
const gchar *destdir;
|
||||||
|
- _cleanup_free_ gchar *path_icons = NULL;
|
||||||
|
- _cleanup_free_ gchar *path_xml = NULL;
|
||||||
|
- _cleanup_object_unref_ GFile *file_xml = NULL;
|
||||||
|
+ guint i;
|
||||||
|
+ const gchar *locations[] = { "/usr/share", "/var/cache", NULL };
|
||||||
|
|
||||||
|
/* check args */
|
||||||
|
if (g_strv_length (values) != 1) {
|
||||||
|
@@ -1489,28 +1488,29 @@ as_util_uninstall (AsUtilPrivate *priv, gchar **values, GError **error)
|
||||||
|
|
||||||
|
/* remove XML file */
|
||||||
|
destdir = g_getenv ("DESTDIR");
|
||||||
|
- path_xml = g_strdup_printf ("%s/usr/share/app-info/xmls/%s.xml.gz",
|
||||||
|
- destdir != NULL ? destdir : "", values[0]);
|
||||||
|
- if (!g_file_test (path_xml, G_FILE_TEST_EXISTS)) {
|
||||||
|
- g_set_error (error,
|
||||||
|
- AS_ERROR,
|
||||||
|
- AS_ERROR_INVALID_ARGUMENTS,
|
||||||
|
- "AppStream file with that ID not found: %s",
|
||||||
|
- path_xml);
|
||||||
|
- return FALSE;
|
||||||
|
- }
|
||||||
|
- file_xml = g_file_new_for_path (path_xml);
|
||||||
|
- if (!g_file_delete (file_xml, NULL, error)) {
|
||||||
|
- g_prefix_error (error, "Failed to remove %s: ", path_xml);
|
||||||
|
- return FALSE;
|
||||||
|
+ for (i = 0; locations[i] != NULL; i++) {
|
||||||
|
+ _cleanup_free_ gchar *path_xml = NULL;
|
||||||
|
+ path_xml = g_strdup_printf ("%s%s/app-info/xmls/%s.xml.gz",
|
||||||
|
+ destdir != NULL ? destdir : "",
|
||||||
|
+ locations[i], values[0]);
|
||||||
|
+ if (g_file_test (path_xml, G_FILE_TEST_EXISTS)) {
|
||||||
|
+ _cleanup_object_unref_ GFile *file = NULL;
|
||||||
|
+ file = g_file_new_for_path (path_xml);
|
||||||
|
+ if (!g_file_delete (file, NULL, error))
|
||||||
|
+ return FALSE;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* remove icons */
|
||||||
|
- path_icons = g_strdup_printf ("%s/usr/share/app-info/icons/%s",
|
||||||
|
- destdir != NULL ? destdir : "", values[0]);
|
||||||
|
- if (g_file_test (path_icons, G_FILE_TEST_EXISTS)) {
|
||||||
|
- if (!as_util_rmtree (path_icons, error))
|
||||||
|
- return FALSE;
|
||||||
|
+ for (i = 0; locations[i] != NULL; i++) {
|
||||||
|
+ _cleanup_free_ gchar *path_icons = NULL;
|
||||||
|
+ path_icons = g_strdup_printf ("%s%s/app-info/icons/%s",
|
||||||
|
+ destdir != NULL ? destdir : "",
|
||||||
|
+ locations[i], values[0]);
|
||||||
|
+ if (g_file_test (path_icons, G_FILE_TEST_EXISTS)) {
|
||||||
|
+ if (!as_util_rmtree (path_icons, error))
|
||||||
|
+ return FALSE;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.1.0
|
||||||
|
|
||||||
|
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 20 12:30:54 UTC 2015 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
- Add appstream-glib-uninstall-var-cache.patch: also remove
|
||||||
|
appstream metainfo installed to /var/cache.
|
||||||
|
- Add
|
||||||
|
0001-Add-yast2-branding-openSUSE-if-an-app-depends-on-yas.patch:
|
||||||
|
Mark yast2 as a meta-package bringing a set of icons for other
|
||||||
|
packages to depend on.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 17 13:00:59 UTC 2015 - dimstar@opensuse.org
|
Tue Mar 17 13:00:59 UTC 2015 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
@ -28,6 +28,9 @@ Group: System/Libraries
|
|||||||
Url: http://people.freedesktop.org/~hughsient/appstream-glib/
|
Url: http://people.freedesktop.org/~hughsient/appstream-glib/
|
||||||
#Source: http://people.freedesktop.org/~hughsient/appstream-glib/releases/%{name}-%{version}.tar.xz
|
#Source: http://people.freedesktop.org/~hughsient/appstream-glib/releases/%{name}-%{version}.tar.xz
|
||||||
Source: %{name}-%{version}.tar.xz
|
Source: %{name}-%{version}.tar.xz
|
||||||
|
Patch0: 0001-Add-yast2-branding-openSUSE-if-an-app-depends-on-yas.patch
|
||||||
|
# PATCH-FIX-UPSTREAM appstream-glib-uninstall-var-cache.patch gh#hughsie/appstream-glib#42 dimstar@opensuse.org -- Also uninstall appdata from /var/cache
|
||||||
|
Patch1: appstream-glib-uninstall-var-cache.patch
|
||||||
%if %{_build_from_vcs}
|
%if %{_build_from_vcs}
|
||||||
BuildRequires: gnome-common
|
BuildRequires: gnome-common
|
||||||
%else
|
%else
|
||||||
@ -149,6 +152,8 @@ What this library allows you to do:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{_build_from_vcs}
|
%if %{_build_from_vcs}
|
||||||
|
Loading…
Reference in New Issue
Block a user