Gentoo Archives: gentoo-commits

From: "Samuli Suominen (ssuominen)" <ssuominen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-power/upower/files: upower-0.99.0-fix-typing-error.patch upower-0.99.0-create-dir-runtime.patch upower-0.99.0-fix-shutdown-on-boot.patch upower-0.99.0-fix-segfault.patch
Date: Wed, 04 Jun 2014 21:25:59
Message-Id: 20140604212555.013D72004F@flycatcher.gentoo.org
1 ssuominen 14/06/04 21:25:54
2
3 Added: upower-0.99.0-fix-typing-error.patch
4 upower-0.99.0-create-dir-runtime.patch
5 upower-0.99.0-fix-shutdown-on-boot.patch
6 upower-0.99.0-fix-segfault.patch
7 Log:
8 backport upstream fixes
9
10 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
11
12 Revision Changes Path
13 1.1 sys-power/upower/files/upower-0.99.0-fix-typing-error.patch
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/upower/files/upower-0.99.0-fix-typing-error.patch?rev=1.1&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/upower/files/upower-0.99.0-fix-typing-error.patch?rev=1.1&content-type=text/plain
17
18 Index: upower-0.99.0-fix-typing-error.patch
19 ===================================================================
20 From d650df8af80b734f6c44a0acb2080493330b8836 Mon Sep 17 00:00:00 2001
21 From: Bastien Nocera <hadess@××××××.net>
22 Date: Wed, 23 Apr 2014 13:20:37 +0000
23 Subject: lib: Fix typo in g-i annotation
24
25 Missing colon.
26 ---
27 diff --git a/libupower-glib/up-client.c b/libupower-glib/up-client.c
28 index 17fb02d..582fac9 100644
29 --- a/libupower-glib/up-client.c
30 +++ b/libupower-glib/up-client.c
31 @@ -131,7 +131,7 @@ up_client_get_devices (UpClient *client)
32 * @client: a #UpClient instance.
33 *
34 * Get the composite display device.
35 - * Return value: (transfer full) a #UpClient object, or %NULL on error.
36 + * Return value: (transfer full): a #UpClient object, or %NULL on error.
37 *
38 * Since: 1.0
39 **/
40 --
41 cgit v0.9.0.2-2-gbebe
42
43
44
45 1.1 sys-power/upower/files/upower-0.99.0-create-dir-runtime.patch
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/upower/files/upower-0.99.0-create-dir-runtime.patch?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/upower/files/upower-0.99.0-create-dir-runtime.patch?rev=1.1&content-type=text/plain
49
50 Index: upower-0.99.0-create-dir-runtime.patch
51 ===================================================================
52 From b9cff29978113aefe3ad18521f383f12ab099a34 Mon Sep 17 00:00:00 2001
53 From: Cosimo Cecchi <cosimo@××××××××.com>
54 Date: Tue, 25 Feb 2014 09:43:04 +0000
55 Subject: Create the history directory at runtime
56
57 In addition to build time - this increases compatibilty with OSTree,
58 which starts out with an empty /var.
59
60 Signed-off-by: Richard Hughes <richard@×××××××.com>
61 ---
62 diff --git a/src/up-history.c b/src/up-history.c
63 index f9d0fdf..795b093 100644
64 --- a/src/up-history.c
65 +++ b/src/up-history.c
66 @@ -414,6 +414,7 @@ up_history_set_directory (UpHistory *history, const gchar *dir)
67 {
68 g_free (history->priv->dir);
69 history->priv->dir = g_strdup (dir);
70 + g_mkdir_with_parents (dir, 0755);
71 }
72
73 /**
74 @@ -887,7 +888,8 @@ up_history_init (UpHistory *history)
75 history->priv->data_time_full = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
76 history->priv->data_time_empty = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
77 history->priv->max_data_age = UP_HISTORY_DEFAULT_MAX_DATA_AGE;
78 - history->priv->dir = g_build_filename (HISTORY_DIR, NULL);
79 +
80 + up_history_set_directory (history, HISTORY_DIR);
81 }
82
83 /**
84 --
85 cgit v0.9.0.2-2-gbebe
86
87
88
89 1.1 sys-power/upower/files/upower-0.99.0-fix-shutdown-on-boot.patch
90
91 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/upower/files/upower-0.99.0-fix-shutdown-on-boot.patch?rev=1.1&view=markup
92 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/upower/files/upower-0.99.0-fix-shutdown-on-boot.patch?rev=1.1&content-type=text/plain
93
94 Index: upower-0.99.0-fix-shutdown-on-boot.patch
95 ===================================================================
96 From dbf7eb7e557674a9b888a088f1cae4f36b77e14d Mon Sep 17 00:00:00 2001
97 From: Bastien Nocera <hadess@××××××.net>
98 Date: Wed, 23 Apr 2014 13:34:24 +0000
99 Subject: daemon: Fix shutdown on boot on some machines
100
101 On the Lenovo A600 all-in-one, there's a HCI/HID dual-mode Broadcom
102 device which will try to get the battery level of the supplied
103 mouse and keyboard, but will usually fail to do so.
104
105 So we have a battery of type "battery" (it's not either a mouse or
106 a keyboard, as it's supposed to handle both) but our display device
107 battery code doesn't check whether those batteries are power supplies
108 or not, using this "empty" (0% after the check timed out) battery in
109 the shutdown policy.
110
111 Check better for power supply devices, not all the "battery" types
112 are power supply batteries, they might be non-power supply ones
113 from unknown device types.
114 ---
115 diff --git a/src/up-daemon.c b/src/up-daemon.c
116 index df0a7b7..ef90be4 100644
117 --- a/src/up-daemon.c
118 +++ b/src/up-daemon.c
119 @@ -208,6 +208,7 @@ up_daemon_update_display_battery (UpDaemon *daemon)
120 gdouble energy_rate = 0.0;
121 gint64 time_to_empty = 0;
122 gint64 time_to_full = 0;
123 + gboolean power_supply = FALSE;
124
125 device = g_ptr_array_index (array, i);
126 g_object_get (device,
127 @@ -219,6 +220,7 @@ up_daemon_update_display_battery (UpDaemon *daemon)
128 "energy-rate", &energy_rate,
129 "time-to-empty", &time_to_empty,
130 "time-to-full", &time_to_full,
131 + "power-supply", &power_supply,
132 NULL);
133
134 /* When we have a UPS, it's either a desktop, and
135 @@ -236,7 +238,8 @@ up_daemon_update_display_battery (UpDaemon *daemon)
136 is_present_total = TRUE;
137 break;
138 }
139 - if (kind != UP_DEVICE_KIND_BATTERY)
140 + if (kind != UP_DEVICE_KIND_BATTERY ||
141 + power_supply == FALSE)
142 continue;
143
144 /* If one battery is charging, then the composite is charging
145 @@ -389,17 +392,21 @@ up_daemon_refresh_battery_devices (UpDaemon *daemon)
146 guint i;
147 GPtrArray *array;
148 UpDevice *device;
149 - UpDeviceKind type;
150
151 /* refresh all devices in array */
152 array = up_device_list_get_array (daemon->priv->power_devices);
153 for (i=0; i<array->len; i++) {
154 + UpDeviceKind type;
155 + gboolean power_supply;
156 +
157 device = (UpDevice *) g_ptr_array_index (array, i);
158 /* only refresh battery devices */
159 g_object_get (device,
160 "type", &type,
161 + "power-supply", &power_supply,
162 NULL);
163 - if (type == UP_DEVICE_KIND_BATTERY)
164 + if (type == UP_DEVICE_KIND_BATTERY &&
165 + power_supply)
166 up_device_refresh_internal (device);
167 }
168 g_ptr_array_unref (array);
169 --
170 cgit v0.9.0.2-2-gbebe
171
172
173
174 1.1 sys-power/upower/files/upower-0.99.0-fix-segfault.patch
175
176 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/upower/files/upower-0.99.0-fix-segfault.patch?rev=1.1&view=markup
177 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/upower/files/upower-0.99.0-fix-segfault.patch?rev=1.1&content-type=text/plain
178
179 Index: upower-0.99.0-fix-segfault.patch
180 ===================================================================
181 From 0d64bbddaa0078ef148d609a3cfad854cf00d7de Mon Sep 17 00:00:00 2001
182 From: Martin Pitt <martinpitt@×××××.org>
183 Date: Fri, 08 Nov 2013 13:59:50 +0000
184 Subject: lib: Fix segfault on getting property when daemon is not running
185
186 This fixes "upower --version" when the daemon is not running, and thus the
187 client proxy is NULL.
188 ---
189 diff --git a/libupower-glib/up-client.c b/libupower-glib/up-client.c
190 index 35d7b5d..17fb02d 100644
191 --- a/libupower-glib/up-client.c
192 +++ b/libupower-glib/up-client.c
193 @@ -322,6 +322,9 @@ up_client_get_property (GObject *object,
194 UpClient *client;
195 client = UP_CLIENT (object);
196
197 + if (client->priv->proxy == NULL)
198 + return;
199 +
200 switch (prop_id) {
201 case PROP_DAEMON_VERSION:
202 g_value_set_string (value, up_client_glue_get_daemon_version (client->priv->proxy));
203 --
204 cgit v0.9.0.2-2-gbebe