[gnome-software/gnome-3-20] trivial: Fix PackageKit related warning in gs-update-monitor
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-20] trivial: Fix PackageKit related warning in gs-update-monitor
- Date: Fri, 15 Apr 2016 11:26:04 +0000 (UTC)
commit afaad892df813400451846f4f15a863453daf3c1
Author: Joaquim Rocha <jrocha endlessm com>
Date: Thu Mar 17 14:17:47 2016 +0100
trivial: Fix PackageKit related warning in gs-update-monitor
The function gs_update_monitor_permission_get tries to get permissions
a PackageKit DBus service which, when PackageKit is not installed,
results in a warning.
This patch changes it so the call is only performed if PackageKit is
available.
src/gs-update-monitor.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c
index 2ff2e1f..032a96f 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -754,8 +754,10 @@ GPermission *
gs_update_monitor_permission_get (void)
{
static GPermission *permission = NULL;
+#ifdef HAVE_PACKAGEKIT
if (permission == NULL)
permission = gs_utils_get_permission ("org.freedesktop.packagekit.trigger-offline-update");
+#endif
return permission;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]