Resolves: bz#888478 - Eject of CDs and DVDs fails

This commit is contained in:
Lukáš Tinkl 2012-12-19 15:32:40 +01:00
parent f2aaad9133
commit 4870c19294
3 changed files with 35 additions and 20 deletions

View File

@ -1,19 +0,0 @@
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();
}

View File

@ -0,0 +1,29 @@
commit af93389d5a821e1c99374aff90f357cc738228d6
Author: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Date: Sat Dec 15 21:11:45 2012 +0100
Use correct signature for DriveEject method arguments
The previous commit added the "unmount" parameter as option for the
DriveEject method. It also inadvertently changed the method signature
of the call from "array of strings" to "string".
DIGEST: Fix ejecting CDs/DVDs when using UDisks backend. UDisks2 is not affected
REVIEW: 107686
BUG: 311613
FIXED-IN: 4.9.5
diff --git a/solid/solid/backends/udisks/udisksopticaldrive.cpp b/solid/solid/backends/udisks/udisksopticaldrive.cpp
index 8ea6194..8286ee7 100644
--- a/solid/solid/backends/udisks/udisksopticaldrive.cpp
+++ b/solid/solid/backends/udisks/udisksopticaldrive.cpp
@@ -63,7 +63,7 @@ bool UDisksOpticalDrive::eject()
QString path = m_device->udi();
QDBusMessage msg = QDBusMessage::createMethodCall(UD_DBUS_SERVICE, path, UD_DBUS_INTERFACE_DISKS_DEVICE, "DriveEject");
- msg << "unmount"; // unmount parameter
+ msg << (QStringList() << "unmount"); // unmount parameter
return c.callWithCallback(msg, this, SLOT(slotDBusReply(QDBusMessage)), SLOT(slotDBusError(QDBusError)));
}

View File

@ -25,7 +25,7 @@
Summary: KDE Libraries
Version: 4.9.4
Release: 4%{?dist}
Release: 5%{?dist}
Name: kdelibs
Epoch: 6
@ -166,6 +166,7 @@ Patch59: kdelibs-4.9.3-kcm_ssl.patch
## upstream
Patch100: 0001-Revert-Also-check-parent-mimetypes-in-protocolForArc.patch
Patch101: 0001-Fix-crash-when-no-service-was-selected-user-clicked-.patch
Patch102: kdelibs-4.9.5-cdeject.patch
## security fix
# Not Upstreamed? why not ? -- Rex
@ -343,6 +344,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
# upstream patches
%patch100 -p1 -b .kio
%patch101 -p1 -b .crash
%patch102 -p1 -b .cdeject
# security fixes
%patch200 -p1 -b .CVE-2009-2702
@ -602,6 +604,9 @@ rm -rf %{buildroot}
%changelog
* Wed Dec 19 2012 Lukáš Tinkl <ltinkl@redhat.com> - 6:4.9.4-5
- Resolves: bz#888478 - Eject of CDs and DVDs fails
* Thu Dec 06 2012 Than Ngo <than@redhat.com> - 6:4.9.4-4
- apply upstream patch to fix crash when no service was selected