[kdelibs] Can't safely remove a USB removable hard drive (#852196)
Rex Dieter
rdieter at fedoraproject.org
Wed Aug 29 15:51:26 UTC 2012
commit 04f815b67d7a16b119864101088dc9b0d4e19cf2
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Wed Aug 29 10:29:50 2012 -0500
Can't safely remove a USB removable hard drive (#852196)
kdelibs-4.9.0-udisks_detatch_external_hdd.patch | 19 +++++++++++++++++++
kdelibs.spec | 9 ++++++++-
2 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/kdelibs-4.9.0-udisks_detatch_external_hdd.patch b/kdelibs-4.9.0-udisks_detatch_external_hdd.patch
new file mode 100644
index 0000000..ace636b
--- /dev/null
+++ b/kdelibs-4.9.0-udisks_detatch_external_hdd.patch
@@ -0,0 +1,19 @@
+diff -up kdelibs-4.9.0/solid/solid/backends/udisks/udisksstorageaccess.cpp.solid-detach-external-hdd kdelibs-4.9.0/solid/solid/backends/udisks/udisksstorageaccess.cpp
+--- kdelibs-4.9.0/solid/solid/backends/udisks/udisksstorageaccess.cpp.solid-detach-external-hdd 2012-07-20 03:07:42.000000000 -0500
++++ kdelibs-4.9.0/solid/solid/backends/udisks/udisksstorageaccess.cpp 2012-08-29 10:25:28.162850570 -0500
+@@ -204,7 +204,14 @@ void UDisksStorageAccess::slotDBusReply(
+ QDBusMessage msg = QDBusMessage::createMethodCall(UD_DBUS_SERVICE, drivePath, UD_DBUS_INTERFACE_DISKS_DEVICE, "DriveEject");
+ msg << QStringList(); // options, unused now
+ c.call(msg, QDBus::NoBlock);
+- }
++ // power down removable USB hard drives, rhbz#852196
++ UDisksDevice drive(drivePath);
++ if (drive.prop("DriveCanDetach").toBool()) {
++ QDBusMessage msg2 = QDBusMessage::createMethodCall(UD_DBUS_SERVICE, drivePath, UD_DBUS_INTERFACE_DISKS_DEVICE, "DriveDetach");
++ msg2 << QStringList(); // options, unused now
++ c.call(msg2, QDBus::NoBlock);
++ }
++ }
+
+ slotChanged();
+ }
diff --git a/kdelibs.spec b/kdelibs.spec
index 43d9912..ff12839 100644
--- a/kdelibs.spec
+++ b/kdelibs.spec
@@ -25,7 +25,7 @@
Summary: KDE Libraries
Version: 4.9.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Name: kdelibs
Epoch: 6
@@ -144,6 +144,9 @@ Patch53: kdelibs-4.7.2-kjs-s390.patch
# return valid locale (RFC 1766)
Patch54: kdelibs-4.8.4-kjs-locale.patch
+# Can't safely remove a USB removable hard drive ( http://bugzilla.redhat.com/852196 )
+Patch55: kdelibs-4.9.0-udisks_detatch_external_hdd.patch
+
## upstream
# fix kdeclarative install location (by wstephenson as found in kde-packager list)
Patch100: kdelibs-4.8.3-kdeclarative-install-location.patch
@@ -325,6 +328,7 @@ popd
%patch52 -p1 -b .SOLID_UPNP
%patch53 -p1 -b .kjs-s390
%patch54 -p1 -b .kjs-locale
+%patch55 -p1 -b .solid-detach-external-hdd
# upstream patches
%patch100 -p1 -b .kdeclarative-install-location
@@ -583,6 +587,9 @@ rm -rf %{buildroot}
%changelog
+* Wed Aug 29 2012 Rex Dieter <rdieter at fedoraproject.org> 6:4.9.0-4
+- Can't safely remove a USB removable hard drive (#852196)
+
* Sun Aug 12 2012 Rex Dieter <rdieter at fedoraproject.org> - 6:4.9.0-3
- drop .spec cruft
- Requires: media-player-info
More information about the scm-commits
mailing list