diff options
Diffstat (limited to 'sys-power/pm-utils')
-rw-r--r-- | sys-power/pm-utils/ChangeLog | 8 | ||||
-rw-r--r-- | sys-power/pm-utils/files/1.3.0-on_ac_power-upower.patch | 89 | ||||
-rw-r--r-- | sys-power/pm-utils/pm-utils-1.3.0-r2.ebuild (renamed from sys-power/pm-utils/pm-utils-1.3.0-r1.ebuild) | 3 |
3 files changed, 98 insertions, 2 deletions
diff --git a/sys-power/pm-utils/ChangeLog b/sys-power/pm-utils/ChangeLog index 0c87feec288c..ad92aa5a4df9 100644 --- a/sys-power/pm-utils/ChangeLog +++ b/sys-power/pm-utils/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-power/pm-utils # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/pm-utils/ChangeLog,v 1.34 2010/04/07 21:55:11 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/pm-utils/ChangeLog,v 1.35 2010/04/17 11:37:20 ssuominen Exp $ + +*pm-utils-1.3.0-r2 (17 Apr 2010) + + 17 Apr 2010; Samuli Suominen <ssuominen@gentoo.org> + +files/1.3.0-on_ac_power-upower.patch, +pm-utils-1.3.0-r2.ebuild: + Try UPower for on_ac_power before DeviceKit-power and HAL wrt #315663. 07 Apr 2010; Tomáš Chvátal <scarabeus@gentoo.org> pm-utils-1.3.0-r1.ebuild: diff --git a/sys-power/pm-utils/files/1.3.0-on_ac_power-upower.patch b/sys-power/pm-utils/files/1.3.0-on_ac_power-upower.patch new file mode 100644 index 000000000000..4483ef00749c --- /dev/null +++ b/sys-power/pm-utils/files/1.3.0-on_ac_power-upower.patch @@ -0,0 +1,89 @@ +From e8d0b58a9df080f021d04b4c2d358003974092f3 Mon Sep 17 00:00:00 2001 +From: Michal Schmidt <mschmidt@redhat.com> +Date: Tue, 23 Feb 2010 13:57:05 +0000 +Subject: on_ac_power: support UPower (new name for DeviceKit-power) + +DeviceKit-power got renamed to UPower and its D-Bus interface changed +accordingly. + +Try UPower first in on_ac_power. +If it fails, try DeviceKit-power. +It if fails too, try hal. + +Also update documentation. + +Signed-off-by: Michael Biebl <mbiebl@gmail.com> +--- +diff --git a/man/pm-action.xml b/man/pm-action.xml +index ccb4153..6e9f639 100644 +--- a/man/pm-action.xml ++++ b/man/pm-action.xml +@@ -104,7 +104,7 @@ + For some options external programs are needed. + </para> + <para> +- These commands will usually be called by <command>DeviceKit-power</command> ++ These commands will usually be called by <command>UPower</command> + or <command>hald</command> when triggered to do so by a program + in a desktop session such as <command>gnome-power-manager</command>. + Calling them from the command line is also possible, but it is not +diff --git a/man/pm-is-supported.xml b/man/pm-is-supported.xml +index 88bb9fd..d07c87d 100644 +--- a/man/pm-is-supported.xml ++++ b/man/pm-is-supported.xml +@@ -89,7 +89,7 @@ + <para> + The intended purpose of <command>&dhpackage;</command> is to + find out which power management modes are supported by the +- system. hald(8) will call it to do just that. (Note that DeviceKit-power ++ system. hald(8) will call it to do just that. (Note that UPower + does not use this.) + </para> + </refsect1> +@@ -161,10 +161,6 @@ + <!-- In alpabetical order. --> + <para> + <citerefentry> +- <refentrytitle>DeviceKit-power</refentrytitle> +- <manvolnum>7</manvolnum> +- </citerefentry>, +- <citerefentry> + <refentrytitle>hald</refentrytitle> + <manvolnum>8</manvolnum> + </citerefentry>, +@@ -175,6 +171,10 @@ + <citerefentry> + <refentrytitle>s2both</refentrytitle> + <manvolnum>8</manvolnum> ++ </citerefentry>, ++ <citerefentry> ++ <refentrytitle>UPower</refentrytitle> ++ <manvolnum>7</manvolnum> + </citerefentry> + </para> + </refsect1> +diff --git a/src/on_ac_power b/src/on_ac_power +index fdbcb36..1f9c59e 100755 +--- a/src/on_ac_power ++++ b/src/on_ac_power +@@ -30,7 +30,17 @@ + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # + +-# prefer DeviceKit-power if available ++# prefer UPower if available ++if s="$(dbus-send --system --print-reply \ ++ --dest=org.freedesktop.UPower \ ++ /org/freedesktop/UPower \ ++ org.freedesktop.DBus.Properties.Get \ ++ string:org.freedesktop.UPower string:OnBattery)"; then ++ echo "$s" | grep -q 'boolean false' ++ exit $? ++fi ++ ++# try its old name 'DeviceKit-power' too + if s="$(dbus-send --system --print-reply \ + --dest=org.freedesktop.DeviceKit.Power \ + /org/freedesktop/DeviceKit/Power \ +-- +cgit v0.8.3-6-g21f6 diff --git a/sys-power/pm-utils/pm-utils-1.3.0-r1.ebuild b/sys-power/pm-utils/pm-utils-1.3.0-r2.ebuild index b9079e4e4ecf..cc39c6a403c8 100644 --- a/sys-power/pm-utils/pm-utils-1.3.0-r1.ebuild +++ b/sys-power/pm-utils/pm-utils-1.3.0-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/pm-utils/pm-utils-1.3.0-r1.ebuild,v 1.2 2010/04/07 21:55:11 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/pm-utils/pm-utils-1.3.0-r2.ebuild,v 1.1 2010/04/17 11:37:20 ssuominen Exp $ EAPI="2" @@ -32,6 +32,7 @@ DEPEND="doc? ( app-text/xmlto )" PATCHES=( "${FILESDIR}/${PV}-fix_autotools.patch" + "${FILESDIR}/${PV}-on_ac_power-upower.patch" ) src_prepare() { |