Hello community, here is the log from the commit of package pm-utils for openSUSE:11.4 checked in at Fri Mar 2 14:08:14 CET 2012.
-------- --- old-versions/11.4/UPDATES/all/pm-utils/pm-utils.changes 2012-02-13 11:05:58.000000000 +0100 +++ 11.4/pm-utils/pm-utils.changes 2012-02-29 13:52:57.000000000 +0100 @@ -1,0 +2,7 @@ +Wed Feb 29 12:51:24 UTC 2012 - mvysko...@suse.cz + +- fix bnc#749031: Add pm-utils-dhcp-interfaces.patch, fix script + 50rcnetwork error and update savestate/restorestate functions. +- add pm-utils-1.4.1-vtXX-upower-battery-AC-adapter.patch (bnc#670074) + +------------------------------------------------------------------- calling whatdependson for 11.4-i586 New: ---- pm-utils-1.4.1-vtXX-upower-battery-AC-adapter.patch pm-utils-dhcp-interfaces.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pm-utils.spec ++++++ --- /var/tmp/diff_new_pack.q3NgFk/_old 2012-03-02 14:01:27.000000000 +0100 +++ /var/tmp/diff_new_pack.q3NgFk/_new 2012-03-02 14:01:27.000000000 +0100 @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild %define pm_libdir %{_prefix}/lib/%{name}/ %define pm_quirkdbdir %{pm_libdir}/video-quirks @@ -23,9 +22,9 @@ Name: pm-utils Version: 1.4.1 -Release: 5.<RELEASE11> +Release: 5.<RELEASE13> Summary: Tools to suspend and hibernate computers -License: GPLv2+ +License: GPL-2.0+ Group: System/Base Url: http://pm-utils.freedesktop.org/wiki/ Source0: %{name}-%{version}.tar.bz2 @@ -47,17 +46,20 @@ Patch5: pm-utils-1.3.0-suse-directfb-ignore-fbmodes.patch #PATCH-FIX-OPENSUSE: Update NetworkManager's Sleep method bnc#735837 Patch6: pm-utils-1.4.1-networkmanager.patch +#PATCH-FIX-OPENSUSE: Fix 50rcnetwork bnc#749031 +Patch7: pm-utils-dhcp-interfaces.patch +Patch8: pm-utils-1.4.1-vtXX-upower-battery-AC-adapter.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq # hooks requires some external tools -Requires: grep -Requires: sed +Requires: coreutils Requires: ethtool Requires: gawk -Requires: coreutils +Requires: grep Requires: module-init-tools +Requires: sed Requires: upower @@ -74,7 +76,7 @@ Richard Hughes <rich...@hughsie.com> %package ndiswrapper -License: GPLv2+ + Summary: The pm-utils hook for ndiswrapper Group: System/Base Supplements: ndiswrapper @@ -95,6 +97,9 @@ %patch4 -p1 -b .suse-logging %patch5 -p1 -b .directfb-ignore-fbmodes %patch6 -p1 -b .networkmanager +cd .. +%patch7 -p1 +%patch8 -p0 %build %{configure} \ ++++++ pm-utils-1.4.1-vtXX-upower-battery-AC-adapter.patch ++++++ Index: pm-utils-suse/bin/powersave =================================================================== --- pm-utils-suse.orig/bin/powersave +++ pm-utils-suse/bin/powersave @@ -54,7 +54,7 @@ function upower_enumerate_batteries() { continue fi # type 2 is battery - if upower_device_get_property "${DEVICE}" String:Type 2>/dev/null | grep -q "2$"; then + if upower_device_get_property "${DEVICE}" string:Type 2>/dev/null | grep uint | grep -q "2$"; then echo "${DEVICE}" fi done @@ -63,7 +63,7 @@ function upower_enumerate_batteries() { # print the ac_adapter found on system # Note: it prints the first match, as it expects only one per machine function upower_find_ac_adapter() { - for DEVICE in $(upower_call_method org.freedesktop.UPower.EnumerateDevices); do + for DEVICE in $(upower_call_method org.freedesktop.UPower.EnumerateDevices | grep -o '/org[A-Za-z0-9/_]*'); do # type 1 is Line Power if upower_device_get_property "${DEVICE}" string:Type 2>/dev/null | grep -q "1$"; then echo "${DEVICE}" @@ -193,20 +193,24 @@ function hal_battery_info { done } +function dbus-getv { + sed -n "s#.*[ \t]*$1[0-9]*[ \t]*##p" +} + function upower_battery_info { C=1 for BATTERY in `upower_enumerate_batteries`; do - SEC=`upower_device_get_property "${BATTERY}" TimeToEmpty` + let SEC="`upower_device_get_property "${BATTERY}" string:TimeToEmpty | dbus-getv int`" if [ $SEC -ne 0 ]; then let MIN=SEC/60 else MIN=0 fi - PERC=`upower_device_get_property "${BATTERY}" Percentage` + PERC=`upower_device_get_property "${BATTERY}" string:Percentage | dbus-getv double` - case `upower_device_get_property "${BATTERY}" State` in + case `upower_device_get_property "${BATTERY}" string:State | dbus-getv uint` in 1) STATE="Charging" ;; 2) STATE="Discharging" ;; 3) STATE="Empty" ;; @@ -217,7 +221,7 @@ function upower_battery_info { esac echo "Battery$C:" - echo -e "\t Remaining percent: $PERC" + echo -e "\t Remaining percent: $PERC%" echo -e "\t Remaining minutes: $MIN" echo -e "\t Charging state: $STATE" ++++++ pm-utils-dhcp-interfaces.patch ++++++ Index: pm-utils/pm-utils-suse/hooks/sleep.d/50rcnetwork =================================================================== --- pm-utils.orig/pm-utils-suse/hooks/sleep.d/50rcnetwork +++ pm-utils/pm-utils-suse/hooks/sleep.d/50rcnetwork @@ -16,21 +16,23 @@ [ -r /etc/sysconfig/network/config ] && . /etc/sysconfig/network/config [ -r /etc/sysconfig/network/scripts/functions ] && . /etc/sysconfig/network/scripts/functions -command_exists dhcp_clients || exit $NA - # NetworkManager is handled by 55NetworkManager, so skip this script if # nm is enabled in sysconfig ... -[ x"${NETWORKMANAGER}" -eq x"yes" ] && exit $NA +[ x"${NETWORKMANAGER}" = x"yes" ] && exit $NA # ... or if is running command_exists nm_running && nm_running && exit $NA +# check network/scripts/function provides dhcp_interfaces() +# function returning a list of interfaces with running dhcp. +command_exists dhcp_interfaces || exit $NA + case "$1" in hibernate|suspend) - save_state "dhcp_clients" "`dhcp_clients`" + savestate "dhcp_interfaces" "`dhcp_interfaces`" service network stop-all-dhcp-clients ;; thaw|resume) - for interface in `restore_state "dhcp_clients"`; do + for interface in `restorestate "dhcp_interfaces"`; do service network restart ${interface} done ;; continue with "q"... Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org