public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/solid/files/, kde-frameworks/solid/
@ 2019-11-12 22:09 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2019-11-12 22:09 UTC (permalink / raw
  To: gentoo-commits

commit:     a59d298a587a4f21e62c0532578bf0b657b0a1ff
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 12 19:47:32 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Nov 12 22:08:54 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a59d298a

kde-frameworks/solid: Fix ext. optical drives media change detection

KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=394348
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...lid-5.64.0-udisks2-media-change-detection.patch | 65 ++++++++++++++++++++++
 kde-frameworks/solid/solid-5.64.0-r1.ebuild        | 38 +++++++++++++
 2 files changed, 103 insertions(+)

diff --git a/kde-frameworks/solid/files/solid-5.64.0-udisks2-media-change-detection.patch b/kde-frameworks/solid/files/solid-5.64.0-udisks2-media-change-detection.patch
new file mode 100644
index 00000000000..57fd17f7b61
--- /dev/null
+++ b/kde-frameworks/solid/files/solid-5.64.0-udisks2-media-change-detection.patch
@@ -0,0 +1,65 @@
+From 4aa39aed1bd6c81dbf0d6dc9d312af5340f7caab Mon Sep 17 00:00:00 2001
+From: Rok Mandeljc <rok.mandeljc@gmail.com>
+Date: Tue, 12 Nov 2019 10:20:38 -0700
+Subject: [udisks2] fix media change detection for external optical drives
+
+Summary:
+If an external optical drive is connected after Solid does its initial introspection, the resulting UDI does not get a mediaChanged signal/slot connection, and thus fails to react to the media change. Consequently, disc content is not properly updated after the medium is ejected, causing bug #394348.
+
+This patch assumes that an addition of "org.freedesktop.UDisks2.Block" interface means that a new device has been added; in this case, it performs Device::mightBeOpticalDisc() check to add the slotMediaChanged() connection.
+
+BUG: 394348
+FIXED-IN: 5.65
+
+Test Plan:
+Test steps:
+1. Start KDE Plasma session. Make sure K3b is installed.
+2. Connect an external USB optical drive.
+3. Insert the disc
+4. Observe Device action notifications for the inserted disc.
+5. Eject the disc.
+6. Observe Device action notifications.
+
+Behavior before patch: after disc is ejected, a "Copy with K3b" action remains available for the drive
+See: https://bugs.kde.org/show_bug.cgi?id=394348
+
+Behavior after patch: after disc is ejected, no actions remain available for the drive
+
+Reviewers: bruns, broulik, dfaure, #frameworks, ngraham
+
+Reviewed By: ngraham
+
+Subscribers: ngraham, bugseforuns, kde-frameworks-devel
+
+Tags: #frameworks
+
+Differential Revision: https://phabricator.kde.org/D20508
+---
+ src/solid/devices/backends/udisks2/udisksmanager.cpp | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/src/solid/devices/backends/udisks2/udisksmanager.cpp b/src/solid/devices/backends/udisks2/udisksmanager.cpp
+index 4982aee..3b76423 100644
+--- a/src/solid/devices/backends/udisks2/udisksmanager.cpp
++++ b/src/solid/devices/backends/udisks2/udisksmanager.cpp
+@@ -191,6 +191,18 @@ void Manager::slotInterfacesAdded(const QDBusObjectPath &object_path, const Vari
+ 
+     qCDebug(UDISKS2) << udi << "has new interfaces:" << interfaces_and_properties.keys();
+ 
++    // If device gained an org.freedesktop.UDisks2.Block interface, we
++    // should check if it is an optical drive, in order to properly
++    // register mediaChanged event handler with newly-plugged external
++    // drives
++    if (interfaces_and_properties.contains("org.freedesktop.UDisks2.Block")) {
++        Device device(udi);
++        if (device.mightBeOpticalDisc()) {
++            QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
++                SLOT(slotMediaChanged(QDBusMessage)));
++        }
++    }
++
+     updateBackend(udi);
+ 
+     // new device, we don't know it yet
+-- 
+cgit v1.1

diff --git a/kde-frameworks/solid/solid-5.64.0-r1.ebuild b/kde-frameworks/solid/solid-5.64.0-r1.ebuild
new file mode 100644
index 00000000000..6eea94371fe
--- /dev/null
+++ b/kde-frameworks/solid/solid-5.64.0-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+QTMIN=5.12.3
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Provider for platform independent hardware discovery, abstraction and management"
+LICENSE="LGPL-2.1+"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="nls"
+
+BDEPEND="
+	nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 )
+"
+RDEPEND="
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtdeclarative-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtxml-${QTMIN}:5
+	sys-fs/udisks:2
+	virtual/libudev:=
+"
+DEPEND="${RDEPEND}
+	test? ( >=dev-qt/qtconcurrent-${QTMIN}:5 )
+"
+
+PATCHES=( "${FILESDIR}/${P}-udisks2-media-change-detection.patch" )
+
+pkg_postinst() {
+	ecm_pkg_postinst
+
+	if [[ -z "${REPLACING_VERSIONS}" ]] && ! has_version "app-misc/media-player-info" ; then
+		elog "For media player support, install app-misc/media-player-info"
+	fi
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/solid/files/, kde-frameworks/solid/
@ 2021-12-08 15:08 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2021-12-08 15:08 UTC (permalink / raw
  To: gentoo-commits

commit:     cb86920e9f343601f2452704de28f8f331a23dd9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 30 14:49:08 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Dec  8 15:07:45 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb86920e

kde-frameworks/solid: Add dev. desc. for storage medium w/o size

Upstream commit c521c9e53693eb6f8f1926db72b78787b063f27f
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=445299
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...88.0-dev-desc-for-storage-medium-w-o-size.patch | 37 +++++++++++++++
 kde-frameworks/solid/solid-5.88.0-r1.ebuild        | 53 ++++++++++++++++++++++
 2 files changed, 90 insertions(+)

diff --git a/kde-frameworks/solid/files/solid-5.88.0-dev-desc-for-storage-medium-w-o-size.patch b/kde-frameworks/solid/files/solid-5.88.0-dev-desc-for-storage-medium-w-o-size.patch
new file mode 100644
index 000000000000..d1eff9f9565e
--- /dev/null
+++ b/kde-frameworks/solid/files/solid-5.88.0-dev-desc-for-storage-medium-w-o-size.patch
@@ -0,0 +1,37 @@
+From c521c9e53693eb6f8f1926db72b78787b063f27f Mon Sep 17 00:00:00 2001
+From: Kai Uwe Broulik <kde@privat.broulik.de>
+Date: Fri, 19 Nov 2021 12:10:37 +0100
+Subject: [PATCH] Add device description for storage medium without size
+
+"0B Removable Media" is not very helpful, just omit the size then.
+---
+ src/solid/devices/backends/udisks2/udisksdevice.cpp | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/solid/devices/backends/udisks2/udisksdevice.cpp b/src/solid/devices/backends/udisks2/udisksdevice.cpp
+index ad55edd..5d75065 100644
+--- a/src/solid/devices/backends/udisks2/udisksdevice.cpp
++++ b/src/solid/devices/backends/udisks2/udisksdevice.cpp
+@@ -576,9 +576,17 @@ QString Device::volumeDescription() const
+         description = tr("Floppy Disk");
+     } else {
+         if (drive_is_removable) {
+-            description = tr("%1 Removable Media", "%1 is the size").arg(size_str);
++            if (storageVolume.size() > 0) {
++                description = tr("%1 Removable Media", "%1 is the size").arg(size_str);
++            } else {
++                description = tr("Removable Media");
++            }
+         } else {
+-            description = tr("%1 Media", "%1 is the size").arg(size_str);
++            if (storageVolume.size() > 0) {
++                description = tr("%1 Media", "%1 is the size").arg(size_str);
++            } else {
++                description = tr("Storage Media");
++            }
+         }
+     }
+ 
+-- 
+GitLab
+

diff --git a/kde-frameworks/solid/solid-5.88.0-r1.ebuild b/kde-frameworks/solid/solid-5.88.0-r1.ebuild
new file mode 100644
index 000000000000..71811c0dc72d
--- /dev/null
+++ b/kde-frameworks/solid/solid-5.88.0-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org optfeature
+
+DESCRIPTION="Provider for platform independent hardware discovery, abstraction and management"
+
+LICENSE="LGPL-2.1+"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="ios nls"
+
+RDEPEND="
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtdeclarative-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5
+	>=dev-qt/qtxml-${QTMIN}:5
+	sys-apps/util-linux
+	sys-fs/udisks:2
+	virtual/libudev:=
+	ios? (
+		app-pda/libimobiledevice:=
+		app-pda/libplist:=
+	)
+"
+DEPEND="${RDEPEND}
+	test? ( >=dev-qt/qtconcurrent-${QTMIN}:5 )
+"
+BDEPEND="
+	sys-devel/bison
+	sys-devel/flex
+	nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 )
+"
+
+PATCHES=( "${FILESDIR}/${P}-dev-desc-for-storage-medium-w-o-size.patch" ) # KDE-bug 445299
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake_use_find_package ios IMobileDevice)
+		$(cmake_use_find_package ios PList)
+	)
+	ecm_src_configure
+}
+
+pkg_postinst() {
+	if [[ -z "${REPLACING_VERSIONS}" ]]; then
+		optfeature "media player devices support" app-misc/media-player-info
+	fi
+	ecm_pkg_postinst
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-08 15:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-12 22:09 [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/solid/files/, kde-frameworks/solid/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2021-12-08 15:08 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox