Backport a patch from upstream as glib2 had an API change that

affects PackageKit.
This commit is contained in:
Richard Hughes 2011-09-09 10:19:14 +01:00
parent 4520aaf633
commit 3a0fac468d
2 changed files with 65 additions and 1 deletions

View File

@ -0,0 +1,56 @@
From 1d6670cdc2ed9a20166fe66410da28df71e43d3f Mon Sep 17 00:00:00 2001
From: Denis Washington <denisw@online.de>
Date: Wed, 31 Aug 2011 22:41:20 +0100
Subject: [PATCH] Use g_unix_signal_add_full() which has been renamed in the
unstable GLib branch
Signed-off-by: Richard Hughes <richard@hughsie.com>
---
src/pk-main.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/pk-main.c b/src/pk-main.c
index 12b26f6..45feed9 100644
--- a/src/pk-main.c
+++ b/src/pk-main.c
@@ -33,7 +33,7 @@
#include <dbus/dbus-glib-lowlevel.h>
#include <packagekit-glib2/pk-debug.h>
-#if GLIB_CHECK_VERSION(2,29,4)
+#if GLIB_CHECK_VERSION(2,29,19)
#include <glib-unix.h>
#endif
@@ -159,7 +159,7 @@ pk_main_quit_cb (PkEngine *engine, GMainLoop *mainloop)
g_main_loop_quit (mainloop);
}
-#if GLIB_CHECK_VERSION(2,29,4)
+#if GLIB_CHECK_VERSION(2,29,19)
/**
* pk_main_sigint_cb:
@@ -271,13 +271,13 @@ main (int argc, char *argv[])
goto exit_program;
}
-#if GLIB_CHECK_VERSION(2,29,4)
+#if GLIB_CHECK_VERSION(2,29,19)
/* do stuff on ctrl-c */
- g_unix_signal_add_watch_full (SIGINT,
- G_PRIORITY_DEFAULT,
- pk_main_sigint_cb,
- loop,
- NULL);
+ g_unix_signal_add_full (G_PRIORITY_DEFAULT,
+ SIGINT,
+ pk_main_sigint_cb,
+ loop,
+ NULL);
#else
signal (SIGINT, pk_main_sigint_handler);
#endif
--
1.7.6.1

View File

@ -3,7 +3,7 @@
Summary: Package management service
Name: PackageKit
Version: 0.6.18
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2+ and LGPLv2+
URL: http://www.packagekit.org
Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.xz
@ -14,6 +14,9 @@ Patch0: PackageKit-0.3.8-Fedora-Vendor.conf.patch
# Fedora specific: the yum backend doesn't do time estimation correctly
Patch1: PackageKit-0.4.4-Fedora-turn-off-time.conf.patch
# Already upstream, fix a compile failure
Patch2: 0001-Use-g_unix_signal_add_full-which-has-been-renamed-in.patch
Requires: PackageKit-glib = %{version}-%{release}
Requires: PackageKit-backend
Requires: shared-mime-info
@ -250,6 +253,7 @@ user to restart the computer or remove and re-insert the device.
%setup -q
%patch0 -p1 -b .fedora
%patch1 -p1 -b .no-time
%patch2 -p1 -b .glib-api-change
%build
%configure \
@ -463,6 +467,10 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_includedir}/PackageKit/backend/*.h
%changelog
* Fri Sep 09 2011 Richard Hughes <rhughes@redhat.com> - 0.6.18-2
- Backport a patch from upstream as glib2 had an API change that
affects PackageKit.
* Mon Sep 05 2011 Richard Hughes <rhughes@redhat.com> - 0.6.18-1
- New upstream release.
- Fix a small memory leak in the glib client library