Gentoo Archives: gentoo-commits

From: "Alexandre Rostovtsev (tetromino)" <tetromino@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/glib/files: glib-2.30.2-machine-id.patch
Date: Mon, 14 Nov 2011 08:11:41
Message-Id: 20111114081112.8E5A32004C@flycatcher.gentoo.org
1 tetromino 11/11/14 08:11:12
2
3 Added: glib-2.30.2-machine-id.patch
4 Log:
5 Bump. Notable changes: gdbus-related bugfixes. Add patch to detect machine-id in both /etc and /var, and lower dbus dep. Compile tests when USE=doc to prevent build failure (bug #387385, solution proposed by Pacho Ramos).
6
7 (Portage version: 2.2.0_alpha74/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 dev-libs/glib/files/glib-2.30.2-machine-id.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/glib/files/glib-2.30.2-machine-id.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/glib/files/glib-2.30.2-machine-id.patch?rev=1.1&content-type=text/plain
14
15 Index: glib-2.30.2-machine-id.patch
16 ===================================================================
17 From 1c9eceaccb6e6c4339cd6951cf53fbd60ae80b8b Mon Sep 17 00:00:00 2001
18 From: Alexandre Rostovtsev <tetromino@g.o>
19 Date: Mon, 14 Nov 2011 01:43:22 -0500
20 Subject: [PATCH] _g_dbus_get_machine_id(): check /etc/machine-id too
21
22 machine-id can be in /etc or in /var/lib/dbus.
23
24 https://bugzilla.gnome.org/show_bug.cgi?id=663928
25 ---
26 gio/gdbusprivate.c | 6 +++++-
27 1 files changed, 5 insertions(+), 1 deletions(-)
28
29 diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c
30 index 55ac883..68c3ddf 100644
31 --- a/gio/gdbusprivate.c
32 +++ b/gio/gdbusprivate.c
33 @@ -1985,7 +1985,11 @@ _g_dbus_get_machine_id (GError **error)
34 gchar *ret;
35 /* TODO: use PACKAGE_LOCALSTATEDIR ? */
36 ret = NULL;
37 - if (!g_file_get_contents ("/var/lib/dbus/machine-id",
38 + if (!g_file_get_contents ("/etc/machine-id",
39 + &ret,
40 + NULL,
41 + NULL) &&
42 + !g_file_get_contents ("/var/lib/dbus/machine-id",
43 &ret,
44 NULL,
45 error))
46 --
47 1.7.8.rc1