[gnome-software] trivial: Fix PackageKit related warning in gs-update-monitor
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Fix PackageKit related warning in gs-update-monitor
- Date: Tue, 22 Mar 2016 16:24:15 +0000 (UTC)
commit 725f2d4790095ee8866c51fe0732df458539390f
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 a37c13c..0397c7a 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -753,8 +753,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]