Mailinglist Archive: opensuse-commit (849 mails)

< Previous Next >
commit pm-utils for openSUSE:Factory

Hello community,

here is the log from the commit of package pm-utils for openSUSE:Factory
checked in at Wed Mar 2 15:12:15 CET 2011.



--------
--- pm-utils/pm-utils.changes 2011-03-01 09:33:50.000000000 +0100
+++ /mounts/work_src_done/STABLE/pm-utils/pm-utils.changes 2011-03-02
15:01:53.000000000 +0100
@@ -1,0 +2,6 @@
+Wed Mar 2 14:01:03 UTC 2011 - estellnb@xxxxxxxxxx
+
+- Show battery and AC-adpater (power adapter) status when working
+ without X under a console: upower is used (bnc#670074)
+
+-------------------------------------------------------------------
@@ -33,0 +40 @@
+>>>>>>> ./pm-utils.changes.rc13d0ced37ad6aae6e3d140dad6f4c2b

calling whatdependson for head-i586


New:
----
pm-utils-1.4.1-vtXX-upower-battery-AC-adapter.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pm-utils.spec ++++++
--- /var/tmp/diff_new_pack.bLIM8G/_old 2011-03-02 15:12:00.000000000 +0100
+++ /var/tmp/diff_new_pack.bLIM8G/_new 2011-03-02 15:12:00.000000000 +0100
@@ -23,7 +23,7 @@

Name: pm-utils
Version: 1.4.1
-Release: 8
+Release: 9
Summary: Tools to suspend and hibernate computers
License: GPLv2+
Group: System/Base
@@ -45,6 +45,7 @@
Patch4: pm-utils-1.3.0-suse-logging.patch
#PATCH-FIX-OPENSUSE: export SUSE_IGNORE_FBMODES to workaround bnc#304995
Patch5: pm-utils-1.3.0-suse-directfb-ignore-fbmodes.patch
+Patch11: pm-utils-1.4.1-vtXX-upower-battery-AC-adapter.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build

PreReq: %insserv_prereq
@@ -92,6 +93,8 @@
%patch3 -p1 -b .suse-grub
%patch4 -p1 -b .suse-logging
%patch5 -p1 -b .directfb-ignore-fbmodes
+cd ..
+%patch11 -p0

%build
%{configure} \

++++++ pm-utils-1.4.1-vtXX-upower-battery-AC-adapter.patch ++++++
*** pm-utils-suse/bin/powersave 2011-03-01 21:18:38.351062624 +0100
*** pm-utils-suse/bin/powersave 2011-03-01 21:25:43.213064195 +0100
***************
*** 54,60 ****
continue
fi
# type 2 is battery
! if upower_device_get_property "${DEVICE}" String:Type 2>/dev/null |
grep -q "2$"; then
echo "${DEVICE}"
fi
done
--- 54,60 ----
continue
fi
# type 2 is battery
! if upower_device_get_property "${DEVICE}" string:Type 2>/dev/null |
grep uint | grep -q "2$"; then
echo "${DEVICE}"
fi
done
***************
*** 63,69 ****
# 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
# type 1 is Line Power
if upower_device_get_property "${DEVICE}" string:Type 2>/dev/null |
grep -q "1$"; then
echo "${DEVICE}"
--- 63,69 ----
# 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 | 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,212 ****
done
}

function upower_battery_info {
C=1
for BATTERY in `upower_enumerate_batteries`; do

! SEC=`upower_device_get_property "${BATTERY}" TimeToEmpty`
if [ $SEC -ne 0 ]; then
let MIN=SEC/60
else
MIN=0
fi

! PERC=`upower_device_get_property "${BATTERY}" Percentage`

! case `upower_device_get_property "${BATTERY}" State` in
1) STATE="Charging" ;;
2) STATE="Discharging" ;;
3) STATE="Empty" ;;
--- 193,216 ----
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

! 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}" string:Percentage |
dbus-getv double`

! case `upower_device_get_property "${BATTERY}" string:State |
dbus-getv uint` in
1) STATE="Charging" ;;
2) STATE="Discharging" ;;
3) STATE="Empty" ;;
***************
*** 217,223 ****
esac

echo "Battery$C:"
! echo -e "\t Remaining percent: $PERC"
echo -e "\t Remaining minutes: $MIN"
echo -e "\t Charging state: $STATE"

--- 221,227 ----
esac

echo "Battery$C:"
! echo -e "\t Remaining percent: $PERC%"
echo -e "\t Remaining minutes: $MIN"
echo -e "\t Charging state: $STATE"


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread