Apply a patch from upstream so we can use cd-fix-profile in
situations without D-Bus.
This commit is contained in:
parent
4755132f35
commit
280c181686
@ -0,0 +1,48 @@
|
|||||||
|
From 49cc45deb53b879c904fd2ce059277db9c87a9f8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Richard Hughes <richard@hughsie.com>
|
||||||
|
Date: Wed, 21 Nov 2012 21:38:01 +0000
|
||||||
|
Subject: [PATCH] Do not try to connect to colord in cd-fix-profile until
|
||||||
|
actually needed
|
||||||
|
|
||||||
|
This speeds up the startup of the tool and also means it can be used on build
|
||||||
|
servers without colord or DBus running.
|
||||||
|
---
|
||||||
|
client/cd-fix-profile.c | 11 ++++-------
|
||||||
|
1 file changed, 4 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/client/cd-fix-profile.c b/client/cd-fix-profile.c
|
||||||
|
index d968e8b..3a481cf 100644
|
||||||
|
--- a/client/cd-fix-profile.c
|
||||||
|
+++ b/client/cd-fix-profile.c
|
||||||
|
@@ -384,11 +384,14 @@ cd_util_get_standard_space_filename (CdUtilPrivate *priv,
|
||||||
|
CdStandardSpace standard_space,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
- CdProfile *profile_tmp;
|
||||||
|
+ CdProfile *profile_tmp = NULL;
|
||||||
|
gboolean ret;
|
||||||
|
gchar *filename = NULL;
|
||||||
|
|
||||||
|
/* try to find */
|
||||||
|
+ ret = cd_client_connect_sync (priv->client, NULL, error);
|
||||||
|
+ if (!ret)
|
||||||
|
+ goto out;
|
||||||
|
profile_tmp = cd_client_get_standard_space_sync (priv->client,
|
||||||
|
standard_space,
|
||||||
|
NULL,
|
||||||
|
@@ -1101,12 +1104,6 @@ main (int argc, char *argv[])
|
||||||
|
/* create helper object */
|
||||||
|
priv = g_new0 (CdUtilPrivate, 1);
|
||||||
|
priv->client = cd_client_new ();
|
||||||
|
- ret = cd_client_connect_sync (priv->client, NULL, &error);
|
||||||
|
- if (!ret) {
|
||||||
|
- g_print ("%s\n", error->message);
|
||||||
|
- g_error_free (error);
|
||||||
|
- goto out;
|
||||||
|
- }
|
||||||
|
|
||||||
|
/* add commands */
|
||||||
|
priv->cmd_array = g_ptr_array_new_with_free_func ((GDestroyNotify) cd_util_item_free);
|
||||||
|
--
|
||||||
|
1.8.0
|
||||||
|
|
10
colord.spec
10
colord.spec
@ -1,11 +1,14 @@
|
|||||||
Summary: Color daemon
|
Summary: Color daemon
|
||||||
Name: colord
|
Name: colord
|
||||||
Version: 0.1.24
|
Version: 0.1.24
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+ and LGPLv2+
|
License: GPLv2+ and LGPLv2+
|
||||||
URL: http://www.freedesktop.org/software/colord/
|
URL: http://www.freedesktop.org/software/colord/
|
||||||
Source0: http://www.freedesktop.org/software/colord/releases/%{name}-%{version}.tar.xz
|
Source0: http://www.freedesktop.org/software/colord/releases/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
|
# Already upstream
|
||||||
|
Patch1: 0001-Do-not-try-to-connect-to-colord-in-cd-fix-profile-un.patch
|
||||||
|
|
||||||
BuildRequires: dbus-devel
|
BuildRequires: dbus-devel
|
||||||
BuildRequires: docbook-utils
|
BuildRequires: docbook-utils
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
@ -54,6 +57,7 @@ when running GTK applications.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch1 -p1 -b .cd-fix-profile
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%configure \
|
||||||
@ -129,6 +133,10 @@ exit 0
|
|||||||
%{_datadir}/gtk-doc/html/colord/*
|
%{_datadir}/gtk-doc/html/colord/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 21 2012 Richard Hughes <richard@hughsie.com> 0.1.24-2
|
||||||
|
- Apply a patch from upstream so we can use cd-fix-profile in
|
||||||
|
situations without D-Bus.
|
||||||
|
|
||||||
* Fri Oct 26 2012 Richard Hughes <richard@hughsie.com> 0.1.24-1
|
* Fri Oct 26 2012 Richard Hughes <richard@hughsie.com> 0.1.24-1
|
||||||
- New upstream version
|
- New upstream version
|
||||||
- Fix a critical warning when user tries to dump a non-icc file
|
- Fix a critical warning when user tries to dump a non-icc file
|
||||||
|
Loading…
Reference in New Issue
Block a user