On 20 Apr 2011, at 15:12, Mika Laitio wrote:

> I though that the description "This package links to the sources of the 
> package upower of project Trunk:Testing. " in the source files tab of 
> devel:base:upower means that changes to T:T goes via this ok...
> 

That is what you get when you link any package.

> But ok, I can use branch command and resubmit.
> 

Thanks

> Mika
> 
> On 04/20/2011 02:41 PM, Anas Nashif wrote:
>> why are you submitting to devel:base, you should also use branch, example:
>> 
>> osc branch Trunk:Testing upower
>> 
>> this will get you the right submission target.
>> 
>> Anas
>> 
>> On 20 Apr 2011, at 13:50, lamikr wrote:
>> 
>>> Hi,
>>> I have made the following changes to upower in project devel:base. Please 
>>> review and accept ASAP.
>>> 
>>> Thank You,
>>> lamikr
>>> 
>>> [This message was auto-generated]
>>> 
>>> ---
>>> 
>>> Request #16606:
>>> 
>>>  submit:   home:lamikr/upower(r2) ->  devel:base/upower
>>> 
>>> 
>>> Message:
>>>    * Wed Apr 20 2011 Mika Laitio<[email protected]>  - 0.9.5
>>> - BMC#16455 If the sysfs does not provide energy_full and energy_full_design
>>>  properties for the battery but provided only the energy property, try
>>>  to calculate the value by using voltage_now, charge_now and charge_full_now
>>>  sysfs entries. Without this patch energy_full was calculated to 0
>>>  and upower uses the highest energy value seen as a "full_energy"
>>>  in it's calculations and that caused that the battery charge level was
>>>  calculated incorrectly until the battery was loaded once to full.
>>> 
>>> State:   new          2011-04-20T03:50:09 lamikr
>>> Comment: None
>>> 
>>> 
>>> 
>>> changes files:
>>> --------------
>>> --- upower.changes
>>> +++ upower.changes
>>> @@ -0,0 +1,9 @@
>>> +* Wed Apr 20 2011 Mika Laitio<[email protected]>  - 0.9.5
>>> +- BMC#16455 If the sysfs does not provide energy_full and 
>>> energy_full_design
>>> +  properties for the battery but provided only the energy property, try
>>> +  to calculate the value by using voltage_now, charge_now and 
>>> charge_full_now
>>> +  sysfs entries. Without this patch energy_full was calculated to 0
>>> +  and upower uses the highest energy value seen as a "full_energy"
>>> +  in it's calculations and that caused that the battery charge level was
>>> +  calculated incorrectly until the battery was loaded once to full.
>>> +
>>> 
>>> new:
>>> ----
>>>  fix-energy-full-calculation-when-it-is-not-in-sysfs-data.patch
>>> 
>>> spec files:
>>> -----------
>>> --- upower.spec
>>> +++ upower.spec
>>> @@ -1,6 +1,6 @@
>>> #
>>> # Do NOT Edit the Auto-generated Part!
>>> -# Generated by: spectacle version 0.20git
>>> +# Generated by: spectacle version 0.22git
>>> #
>>> #>>  macros
>>> %define ver 0_9_4
>>> @@ -15,6 +15,7 @@
>>> URL:        http://upower.freedesktop.org/
>>> Source0:    http://upower.freedesktop.org/releases/upower-%{version}.tar.bz2
>>> Source100:  upower.yaml
>>> +Patch0:     fix-energy-full-calculation-when-it-is-not-in-sysfs-data.patch
>>> Requires:   polkit>= 0.92
>>> Requires:   udev
>>> Requires:   pm-utils>= 1.2.2.1
>>> @@ -56,6 +57,8 @@
>>> %prep
>>> %setup -q -n %{name}-%{version}
>>> 
>>> +# fix-energy-full-calculation-when-it-is-not-in-sysfs-data.patch
>>> +%patch0 -p1
>>> #>>  setup
>>> #<<  setup
>>> 
>>> 
>>> other changes:
>>> --------------
>>> 
>>> ++++++ fix-energy-full-calculation-when-it-is-not-in-sysfs-data.patch (new)
>>> --- fix-energy-full-calculation-when-it-is-not-in-sysfs-data.patch
>>> +++ fix-energy-full-calculation-when-it-is-not-in-sysfs-data.patch
>>> +diff -Naur upower-0.9.5_orig/src/linux/up-device-supply.c 
>>> upower-0.9.5/src/linux/up-device-supply.c
>>> +--- upower-0.9.5_orig/src/linux/up-device-supply.c 2010-07-02 
>>> 16:04:42.000000000 +0300
>>> ++++ upower-0.9.5/src/linux/up-device-supply.c      2011-04-20 
>>> 12:01:31.787624219 +0300
>>> +@@ -491,11 +491,14 @@
>>> +           energy_full_design = sysfs_get_double (native_path, 
>>> "energy_full_design") / 1000000.0;
>>> +
>>> +           /* convert charge to energy */
>>> +-          if (energy == 0) {
>>> +-                  energy_full = sysfs_get_double (native_path, 
>>> "charge_full") / 1000000.0;
>>> +-                  energy_full_design = sysfs_get_double (native_path, 
>>> "charge_full_design") / 1000000.0;
>>> +-                  energy_full *= voltage_design;
>>> +-                  energy_full_design *= voltage_design;
>>> ++          if ((energy == 0) || (energy_full == 0)) {
>>> ++                  energy_full = sysfs_get_double (native_path, 
>>> "charge_full");
>>> ++                  energy_full = (energy_full * voltage_design) / 
>>> 1000000.0;
>>> ++                  supply->priv->coldplug_units = 
>>> UP_DEVICE_SUPPLY_COLDPLUG_UNITS_CHARGE;
>>> ++          }
>>> ++          if ((energy == 0) || (energy_full_design == 0)) {
>>> ++                  energy_full_design = sysfs_get_double (native_path, 
>>> "charge_full_design");
>>> ++                  energy_full_design = (energy_full_design * 
>>> voltage_design) / 1000000.0;
>>> +                   supply->priv->coldplug_units = 
>>> UP_DEVICE_SUPPLY_COLDPLUG_UNITS_CHARGE;
>>> +           }
>>> +
>>> 
>>> ++++++ upower.yaml
>>> --- upower.yaml
>>> +++ upower.yaml
>>> @@ -7,6 +7,8 @@
>>> URL: http://upower.freedesktop.org/
>>> Sources:
>>>     - http://upower.freedesktop.org/releases/upower-%{version}.tar.bz2
>>> +Patches:
>>> +    - fix-energy-full-calculation-when-it-is-not-in-sysfs-data.patch
>>> Description: |
>>>     UPower (formerly DeviceKit-power) provides a daemon, API and command
>>>     line tools for managing power devices attached to the system.
>>> 
>>> _______________________________________________
>>> MeeGo-commits mailing list
>>> [email protected]
>>> http://lists.meego.com/listinfo/meego-commits
>> 
>> _______________________________________________
>> MeeGo-packaging mailing list
>> [email protected]
>> http://lists.meego.com/listinfo/meego-packaging
> 
> _______________________________________________
> MeeGo-packaging mailing list
> [email protected]
> http://lists.meego.com/listinfo/meego-packaging

_______________________________________________
MeeGo-packaging mailing list
[email protected]
http://lists.meego.com/listinfo/meego-packaging

Reply via email to