[packages/upower] - fix for systems without systemd

bszx bszx at pld-linux.org
Sun Nov 11 20:23:42 CET 2012


commit 69363cf0be459b5f553511c18ddc33deb8f98874
Author: Bartek Szady <bszx at pld-linux.org>
Date:   Sun Nov 11 20:07:30 2012 +0100

    - fix for systems without systemd

 upower-withoutsystemd.patch | 13 +++++++++++++
 upower.spec                 |  4 +++-
 2 files changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/upower.spec b/upower.spec
index 6572c3f..13c57b1 100644
--- a/upower.spec
+++ b/upower.spec
@@ -2,11 +2,12 @@ Summary:	Power management service
 Summary(pl.UTF-8):	Usługa zarządzania energią
 Name:		upower
 Version:	0.9.18
-Release:	1
+Release:	2
 License:	GPL v2+
 Group:		Libraries
 Source0:	http://upower.freedesktop.org/releases/%{name}-%{version}.tar.xz
 # Source0-md5:	bfaaa1e7f8479fca5594406b3c36dff9
+Patch0:		%{name}-withoutsystemd.patch
 URL:		http://upower.freedesktop.org/
 BuildRequires:	autoconf >= 2.65
 BuildRequires:	automake >= 1:1.11
@@ -101,6 +102,7 @@ Dokumentacja API UPower.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__gtkdocize}
diff --git a/upower-withoutsystemd.patch b/upower-withoutsystemd.patch
new file mode 100644
index 0000000..336103e
--- /dev/null
+++ b/upower-withoutsystemd.patch
@@ -0,0 +1,13 @@
+--- upower-0.9.18/src/linux/up-backend.c.old	2012-07-11 19:11:39.000000000 +0200
++++ upower-0.9.18/src/linux/up-backend.c	2012-11-11 14:51:43.000000000 +0100
+@@ -603,7 +603,9 @@
+ up_backend_emits_resuming (UpBackend *backend)
+ {
+ #ifdef HAVE_SYSTEMD
+-	return TRUE;
++	if (sd_booted ())
++		return TRUE;
++	else
+ #else
+ 	return FALSE;
+ #endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/upower.git/commitdiff/69363cf0be459b5f553511c18ddc33deb8f98874



More information about the pld-cvs-commit mailing list