[arch-commits] Commit in kdelibs/kde-unstable (3 files)
Andrea Scarpino
andrea at archlinux.org
Wed Jun 6 16:37:51 UTC 2012
Date: Wednesday, June 6, 2012 @ 12:37:51
Author: andrea
Revision: 160904
upgpkg: kdelibs 4.8.80-5
Fix battery not present and cannot mount partition bugs
Added:
kdelibs/kde-unstable/fix-battery.patch
kdelibs/kde-unstable/fix-mount.patch
Modified:
kdelibs/kde-unstable/PKGBUILD
-------------------+
PKGBUILD | 13 ++++++++++---
fix-battery.patch | 39 +++++++++++++++++++++++++++++++++++++++
fix-mount.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 93 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2012-06-06 16:18:25 UTC (rev 160903)
+++ PKGBUILD 2012-06-06 16:37:51 UTC (rev 160904)
@@ -4,7 +4,7 @@
pkgname=kdelibs
pkgver=4.8.80
-pkgrel=4
+pkgrel=5
pkgdesc="KDE Core Libraries"
arch=('i686' 'x86_64')
url='https://projects.kde.org/projects/kde/kdelibs'
@@ -18,11 +18,15 @@
install=${pkgname}.install
source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.xz"
'kde-applications-menu.patch' 'archlinux-menu.patch'
- 'use-pythondontwritebytecode.patch')
+ 'use-pythondontwritebytecode.patch'
+ 'fix-battery.patch'
+ 'fix-mount.patch')
sha1sums=('e0d4cef3a09c85e4309e48d7ab62ba9b8eccc575'
'86ee8c8660f19de8141ac99cd6943964d97a1ed7'
'63a850ab4196b9d06934f2b4a13acd9f7739bc67'
- 'bbacbbe2194f3961cd7557d98a9ddef158ca11aa')
+ 'bbacbbe2194f3961cd7557d98a9ddef158ca11aa'
+ '49e3d3e2b9b6e7b3abf6cdf0c37f30fbe7095797'
+ '7b74500f1e51d3f1ab8037d92b60285d6ab7d964')
build() {
cd "${srcdir}"/${pkgname}-${pkgver}
@@ -34,6 +38,9 @@
# Set PYTHONDONTWRITEBYTECODE (KDEBUG#276151)
patch -p0 -i "${srcdir}"/use-pythondontwritebytecode.patch
+
+ patch -p1 -i "${srcdir}"/fix-battery.patch
+ patch -p1 -i "${srcdir}"/fix-mount.patch
cd "${srcdir}"
mkdir build
Added: fix-battery.patch
===================================================================
--- fix-battery.patch (rev 0)
+++ fix-battery.patch 2012-06-06 16:37:51 UTC (rev 160904)
@@ -0,0 +1,39 @@
+commit 7f8c750541790de5a380409466cf07cfe19c3651
+Author: Lukas Tinkl <lukas at kde.org>
+Date: Wed Jun 6 15:47:39 2012 +0200
+
+ Revert "don't consider external batteries (mice, keyboard, BT) as primary"
+
+ This reverts commit d1661d1638851fd950c5926fb2040ea2abe2a8f0.
+
+ This causes more trouble than expected, newer kernels/upower contain a bug that (in my case
+ and many others) marks ALL batteries as non-powersupply.
+
+ BUG:301033
+ CCBUG:300787
+
+diff --git a/solid/solid/backends/upower/upowerbattery.cpp b/solid/solid/backends/upower/upowerbattery.cpp
+index 9c5f675..ab555d4 100644
+--- a/solid/solid/backends/upower/upowerbattery.cpp
++++ b/solid/solid/backends/upower/upowerbattery.cpp
+@@ -44,18 +44,15 @@ Solid::Battery::BatteryType Battery::type() const
+ {
+ Solid::Battery::BatteryType result = Solid::Battery::UnknownBattery;
+ const uint t = m_device->prop("Type").toUInt();
+- bool powerSupply = m_device->prop("PowerSupply").toBool();
+ switch (t)
+ {
+ case 1: // TODO "Line Power"
+ break;
+ case 2:
+- if (powerSupply)
+- result = Solid::Battery::PrimaryBattery;
++ result = Solid::Battery::PrimaryBattery;
+ break;
+ case 3:
+- if (powerSupply)
+- result = Solid::Battery::UpsBattery;
++ result = Solid::Battery::UpsBattery;
+ break;
+ case 4:
+ result = Solid::Battery::MonitorBattery;
Added: fix-mount.patch
===================================================================
--- fix-mount.patch (rev 0)
+++ fix-mount.patch 2012-06-06 16:37:51 UTC (rev 160904)
@@ -0,0 +1,44 @@
+commit 19213a6c34e1b47a100815ccbfee8b5c70c3c12a
+Author: Alex Fiestas <afiestas at kde.org>
+Date: Tue Jun 5 18:12:28 2012 +0200
+
+ Emit deviceRemoved/Added with the right deviceList set
+
+ The problem is quite straightforward, deviceAdded is being emitted when
+ the m_deviceList has the OLD list, so the new device is still NOT in it.
+ If the user of the library instances a device Solid::Device(UDI) in the
+ slot after that signal, the device will be null because it will not be
+ found in m_deviceList.
+
+ REVIEW: 105132
+
+diff --git a/solid/solid/backends/fstab/fstabmanager.cpp b/solid/solid/backends/fstab/fstabmanager.cpp
+index 608159f..6b29fa4 100644
+--- a/solid/solid/backends/fstab/fstabmanager.cpp
++++ b/solid/solid/backends/fstab/fstabmanager.cpp
+@@ -116,17 +116,19 @@ void FstabManager::_k_updateDeviceList()
+ QSet<QString> newlist = deviceList.toSet();
+ QSet<QString> oldlist = m_deviceList.toSet();
+
+- foreach(const QString &device, newlist) {
+- if ( !oldlist.contains(device) )
+- emit deviceAdded(udiPrefix() + "/" + device);
+- }
+-
+ foreach(const QString &device, oldlist) {
+- if ( !newlist.contains(device) )
++ if ( !newlist.contains(device) ) {
+ emit deviceRemoved(udiPrefix() + "/" + device);
++ }
+ }
+
+ m_deviceList = deviceList;
++
++ foreach(const QString &device, newlist) {
++ if ( !oldlist.contains(device) ) {
++ emit deviceAdded(udiPrefix() + "/" + device);
++ }
++ }
+ }
+
+ void FstabManager::onMtabChanged()
More information about the arch-commits
mailing list