Hello community,

here is the log from the commit of package solid for openSUSE:Factory checked 
in at 2018-05-06 14:59:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/solid (Old)
 and      /work/SRC/openSUSE:Factory/.solid.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "solid"

Sun May  6 14:59:45 2018 rev:57 rq:603352 version:5.45.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/solid/solid.changes      2018-04-19 
15:20:03.941976998 +0200
+++ /work/SRC/openSUSE:Factory/.solid.new/solid.changes 2018-05-06 
14:59:49.172657076 +0200
@@ -1,0 +2,7 @@
+Wed May  2 15:44:23 UTC 2018 - wba...@tmo.at
+
+- Add Update-mount-point-after-mount-operations.patch to fix
+  spurious errors when trying to open an unmounted disk/device in
+  file manager (kde#370975)
+
+-------------------------------------------------------------------

New:
----
  Update-mount-point-after-mount-operations.patch

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

Other differences:
------------------
++++++ solid.spec ++++++
--- /var/tmp/diff_new_pack.RuhEpG/_old  2018-05-06 14:59:49.832632856 +0200
+++ /var/tmp/diff_new_pack.RuhEpG/_new  2018-05-06 14:59:49.836632709 +0200
@@ -46,6 +46,8 @@
 Source1:        baselibs.conf
 # PATCH-FIX-UPSTREAM
 Patch:          UDisks-Correct-handling-of-removable-file-systems.patch
+# PATCH-FIX-UPSTREAM
+Patch1:         Update-mount-point-after-mount-operations.patch
 
 %description
 Solid is a device integration framework.  It provides a way of querying and
@@ -100,6 +102,7 @@
 %prep
 %setup -q
 %patch -p1
+%patch1 -p1
 
 %build
   %cmake_kf5 -d build -- -DWITH_NEW_SOLID_JOB=ON -DWITH_NEW_POWER_ASYNC_API=ON 
-DWITH_NEW_POWER_ASYNC_FREEDESKTOP=ON 
-Dlconvert_executable=%{_kf5_libdir}/qt5/bin/lconvert

++++++ Update-mount-point-after-mount-operations.patch ++++++
>From d735708ff11c40ee6b9bee64544250d55067403f Mon Sep 17 00:00:00 2001
From: David Edmundson <k...@davidedmundson.co.uk>
Date: Tue, 1 May 2018 22:16:28 +0100
Subject: Update mount point after mount operations

Summary:
The order of udisks evaluation has changed from:

call Mount
propertiesChanged
mount call returns

call Mount
mount call returns
propertiesChanged

The mount has finished, but the property is not yet updated.

Solid caches properties, updating them when they change. This worked
before but due to the re-ordering client code gets "setupDone" requests
the mount point gets an outdated version from the cache and we get
errors. Invalidating the cache causes us to round-trip to the udisks
daemon meaning we'll have the correct values.

BUG: 370975

Test Plan:
Diagnosed but with dbus-monitor trace
Asked someone on the bug report to test this

Reviewers: #plasma

Subscribers: #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D12648
---
 src/solid/devices/backends/udisks2/udisksdevice.cpp        | 7 +++++++
 src/solid/devices/backends/udisks2/udisksdevice.h          | 1 +
 src/solid/devices/backends/udisks2/udisksstorageaccess.cpp | 8 ++++----
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/solid/devices/backends/udisks2/udisksdevice.cpp 
b/src/solid/devices/backends/udisks2/udisksdevice.cpp
index f3fdfff..0df32be 100644
--- a/src/solid/devices/backends/udisks2/udisksdevice.cpp
+++ b/src/solid/devices/backends/udisks2/udisksdevice.cpp
@@ -157,6 +157,13 @@ QStringList Device::interfaces() const
     return QStringList();
 }
 
+void Device::invalidateCache()
+{
+    if (m_backend) {
+        return m_backend->invalidateProperties();
+    }
+}
+
 QObject *Device::createDeviceInterface(const Solid::DeviceInterface::Type 
&type)
 {
     if (!queryDeviceInterface(type)) {
diff --git a/src/solid/devices/backends/udisks2/udisksdevice.h 
b/src/solid/devices/backends/udisks2/udisksdevice.h
index 147d554..1492564 100644
--- a/src/solid/devices/backends/udisks2/udisksdevice.h
+++ b/src/solid/devices/backends/udisks2/udisksdevice.h
@@ -61,6 +61,7 @@ public:
     QVariant prop(const QString &key) const;
     bool propertyExists(const QString &key) const;
     QVariantMap allProperties() const;
+    void invalidateCache();
 
     bool hasInterface(const QString &name) const;
     QStringList interfaces() const;
diff --git a/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp 
b/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp
index 7db2263..d08f35d 100644
--- a/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp
+++ b/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp
@@ -166,6 +166,7 @@ void StorageAccess::slotDBusReply(const QDBusMessage & 
/*reply*/)
             mount();
         } else { // Don't broadcast setupDone unless the setup is really done. 
(Fix kde#271156)
             m_setupInProgress = false;
+            m_device->invalidateCache();
             m_device->broadcastActionDone("setup");
 
             checkAccessibility();
@@ -191,6 +192,7 @@ void StorageAccess::slotDBusReply(const QDBusMessage & 
/*reply*/)
             }
 
             m_teardownInProgress = false;
+            m_device->invalidateCache();
             m_device->broadcastActionDone("teardown");
 
             checkAccessibility();
@@ -227,9 +229,8 @@ void StorageAccess::slotSetupDone(int error, const QString 
&errorString)
 {
     m_setupInProgress = false;
     //qDebug() << "SETUP DONE:" << m_device->udi();
-    emit setupDone(static_cast<Solid::ErrorType>(error), errorString, 
m_device->udi());
-
     checkAccessibility();
+    emit setupDone(static_cast<Solid::ErrorType>(error), errorString, 
m_device->udi());
 }
 
 void StorageAccess::slotTeardownRequested()
@@ -241,9 +242,8 @@ void StorageAccess::slotTeardownRequested()
 void StorageAccess::slotTeardownDone(int error, const QString &errorString)
 {
     m_teardownInProgress = false;
-    emit teardownDone(static_cast<Solid::ErrorType>(error), errorString, 
m_device->udi());
-
     checkAccessibility();
+    emit teardownDone(static_cast<Solid::ErrorType>(error), errorString, 
m_device->udi());
 }
 
 bool StorageAccess::mount()
-- 
cgit v0.11.2


Reply via email to