Skip to content
Snippets Groups Projects
Commit d276724c authored by Ruben Rodriguez's avatar Ruben Rodriguez
Browse files

Merge branch 'usb_solid_mount' into 'etiona'

Backport fix for solid kde framework

See merge request trisquel/package-helpers!302
parents 1774e7a5 49355472
No related branches found
No related tags found
No related merge requests found
diff -ruN solid-5.44.0/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp solid-5.44.0-fix-url-format/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp
--- solid-5.44.0/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp 2020-06-26 14:03:41.000000000 -0500
+++ solid-5.44.0-fix-url-format/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp 2020-06-26 14:10:13.708453200 -0500
@@ -122,10 +122,10 @@
const QString path = filePath();
- return !path.isEmpty()
- && !path.startsWith(QLatin1String("/media/"))
- && !path.startsWith(QLatin1String("/run/media/"))
- && !path.startsWith(QDir::homePath());
+ bool inUserPath = path.startsWith(QLatin1String("/media/")) ||
+ path.startsWith(QLatin1String("/run/media/")) ||
+ path.startsWith(QDir::homePath());
+ return !inUserPath;
}
bool StorageAccess::setup()
diff -ruN solid-5.44.0-fix-url-format/src/solid/devices/backends/udisks2/udisksdevice.cpp solid-5.44.0-update-mount-point/src/solid/devices/backends/udisks2/udisksdevice.cpp
--- solid-5.44.0-fix-url-format/src/solid/devices/backends/udisks2/udisksdevice.cpp 2020-06-26 14:07:57.083219471 -0500
+++ solid-5.44.0-update-mount-point/src/solid/devices/backends/udisks2/udisksdevice.cpp 2020-06-26 15:41:51.879400437 -0500
@@ -157,6 +157,13 @@
return QStringList();
}
+void Device::invalidateCache()
+{
+ if (m_backend) {
+ return m_backend->invalidateProperties();
+ }
+}
+
QObject *Device::createDeviceInterface(const Solid::DeviceInterface::Type &type)
{
if (!queryDeviceInterface(type)) {
diff -ruN solid-5.44.0-fix-url-format/src/solid/devices/backends/udisks2/udisksdevice.h solid-5.44.0-update-mount-point/src/solid/devices/backends/udisks2/udisksdevice.h
--- solid-5.44.0-fix-url-format/src/solid/devices/backends/udisks2/udisksdevice.h 2020-06-26 14:07:57.083219471 -0500
+++ solid-5.44.0-update-mount-point/src/solid/devices/backends/udisks2/udisksdevice.h 2020-06-26 15:44:30.976790082 -0500
@@ -61,6 +61,7 @@
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 -ruN solid-5.44.0-fix-url-format/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp solid-5.44.0-update-mount-point/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp
--- solid-5.44.0-fix-url-format/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp 2020-06-26 14:10:13.708453200 -0500
+++ solid-5.44.0-update-mount-point/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp 2020-06-26 19:02:41.461847792 -0500
@@ -177,6 +177,7 @@
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();
@@ -202,6 +203,7 @@
}
m_teardownInProgress = false;
+ m_device->invalidateCache();
m_device->broadcastActionDone("teardown");
checkAccessibility();
@@ -238,9 +240,8 @@
{
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()
@@ -252,9 +253,8 @@
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()
#!/bin/sh
#
# Copyright (C) 2020 Luis Guzmán <ark@switnet.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION=1
. ./config
patch -p1 < $DATA/122a6cd8_correct_handling_of_removable_file_systems.patch
patch -p1 < $DATA/d735708f_update_mount_point_after_mount_operations.patch
changelog "Correct handling of removable file systems KDE GIT#122a6cd8 & #d735708f"
compile
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment