Hello community,

here is the log from the commit of package pm-utils for openSUSE:11.3
checked in at Tue Apr 5 00:51:03 CEST 2011.



--------
--- old-versions/11.3/UPDATES/all/pm-utils/pm-utils.changes     2010-09-01 
13:53:47.000000000 +0200
+++ 11.3/pm-utils/pm-utils.changes      2011-02-25 18:00:06.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Feb 25 16:53:14 CET 2011 - [email protected]
+
+- Show battery and AC-adpater (power adapter) status when working
+  without X under a console: upower is used
+
+-------------------------------------------------------------------

calling whatdependson for 11.3-i586


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

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

Other differences:
------------------
++++++ pm-utils.spec ++++++
--- /var/tmp/diff_new_pack.DLLADC/_old  2011-04-05 00:50:29.000000000 +0200
+++ /var/tmp/diff_new_pack.DLLADC/_new  2011-04-05 00:50:29.000000000 +0200
@@ -1,7 +1,7 @@
 #
-# spec file for package pm-utils (Version 1.3.0)
+# spec file for package pm-utils
 #
-# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -23,7 +23,7 @@
 
 Name:           pm-utils
 Version:        1.3.0
-Release:        10.<RELEASE1>
+Release:        10.<RELEASE3>
 Summary:        Tools to suspend and hibernate computers
 License:        GPLv2+
 Group:          System/Base
@@ -55,6 +55,7 @@
 #FIXME: this patch invalidates patch1 as well as a part of patch0, remove them 
on update
 Patch9:         pm-utils-1.3.0-direct-on_ac_power.patch
 Patch10:        Put-log-into-the-functions.diff
+Patch11:        pm-utils-1.3.0-vtXX-upower-battery-AC-adapter.patch
 # the merge requests on gitorious are ignored, so I patch it here instead of
 # wasting energy sending it there.
 Patch99:        pm-utils-1.3.0-pm-utils-suse-fix-rcnetwork.patch
@@ -120,6 +121,7 @@
 %patch9 -p1 -b .on_ac_power-direct-sysfs
 %patch10 -p1 
 cd ../pm-utils-suse
+%patch11 -p1
 # no backup, because the file would be installed
 %patch99 -p1
 

++++++ pm-utils-1.3.0-vtXX-upower-battery-AC-adapter.patch ++++++
*** pm-utils-suse/bin/powersave Sat Feb  5 18:38:26 2011
*** pm-utils-suse/bin/powersave Sat Feb  5 22:24:54 2011
***************
*** 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,71 ****
  # 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}"
              break
          fi
--- 63,71 ----
  # 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}"
              break
          fi
***************
*** 133,152 ****
      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" ;;
--- 133,156 ----
      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" ;;
***************
*** 157,163 ****
          esac
  
        echo "Battery$C:"
!       echo -e "\t Remaining percent: $PERC"
        echo -e "\t Remaining minutes: $MIN"
        echo -e "\t Charging state: $STATE"
  
--- 161,167 ----
          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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to