From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5C4E91396D0 for ; Sat, 30 Sep 2017 20:34:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B6CFE2BC014; Sat, 30 Sep 2017 20:34:05 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8B96F2BC014 for ; Sat, 30 Sep 2017 20:34:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 630AC3416F9 for ; Sat, 30 Sep 2017 20:34:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E085C9065 for ; Sat, 30 Sep 2017 20:34:02 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1506803625.abf5278fd06f3e1d88dd3e936c3cc1bc4136b455.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/, kde-frameworks/kio/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-frameworks/kio/files/kio-5.38.0-kioexec.patch kde-frameworks/kio/kio-5.38.0-r1.ebuild X-VCS-Directories: kde-frameworks/kio/ kde-frameworks/kio/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: abf5278fd06f3e1d88dd3e936c3cc1bc4136b455 X-VCS-Branch: master Date: Sat, 30 Sep 2017 20:34:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 96828ed5-4807-48a9-95b6-809e28938bf5 X-Archives-Hash: c85d0f4e32d6ba4f6895c2e3031764ac commit: abf5278fd06f3e1d88dd3e936c3cc1bc4136b455 Author: Andreas Sturmlechner gentoo org> AuthorDate: Mon Sep 25 09:45:37 2017 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Sep 30 20:33:45 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abf5278f kde-frameworks/kio: Fix huge 'file has changed' annoyance Package-Manager: Portage-2.3.10, Repoman-2.3.3 kde-frameworks/kio/files/kio-5.38.0-kioexec.patch | 87 +++++++++++++++++++++++ kde-frameworks/kio/kio-5.38.0-r1.ebuild | 80 +++++++++++++++++++++ 2 files changed, 167 insertions(+) diff --git a/kde-frameworks/kio/files/kio-5.38.0-kioexec.patch b/kde-frameworks/kio/files/kio-5.38.0-kioexec.patch new file mode 100644 index 00000000000..1cf2a1bfb83 --- /dev/null +++ b/kde-frameworks/kio/files/kio-5.38.0-kioexec.patch @@ -0,0 +1,87 @@ +From c76c1486ec79e8a16329207e9b293eed1244adfb Mon Sep 17 00:00:00 2001 +From: Jonathan Marten +Date: Mon, 25 Sep 2017 08:56:04 +0100 +Subject: kioexec: Watch the file when it has finished copying + +To eliminate a spurious "The file has changed, do you want to upload +it?" dialogue. + +BUG:384500 + +Differential Revision: https://phabricator.kde.org/D7841 +--- + src/kioexec/main.cpp | 49 +++++++++++++++++++++++++++---------------------- + 1 file changed, 27 insertions(+), 22 deletions(-) + +diff --git a/src/kioexec/main.cpp b/src/kioexec/main.cpp +index 6b0ec1d..615dfbf 100644 +--- a/src/kioexec/main.cpp ++++ b/src/kioexec/main.cpp +@@ -118,11 +118,6 @@ KIOExec::KIOExec(const QStringList &args, bool tempFiles, const QString &suggest + KIO::Job *job = KIO::file_copy(url, dest); + jobList.append(job); + +- // Tell kioexecd to watch the file for changes. +- OrgKdeKIOExecdInterface kioexecd(QStringLiteral("org.kde.kioexecd"), QStringLiteral("/modules/kioexecd"), QDBusConnection::sessionBus()); +- kioexecd.watch(file.path, file.url.toString()); +- mUseDaemon = !kioexecd.lastError().isValid(); +- + connect(job, &KJob::result, this, &KIOExec::slotResult); + } + } +@@ -141,25 +136,35 @@ KIOExec::KIOExec(const QStringList &args, bool tempFiles, const QString &suggest + + void KIOExec::slotResult(KJob *job) + { +- if (job && job->error()) { +- // That error dialog would be queued, i.e. not immediate... +- //job->showErrorDialog(); +- if ((job->error() != KIO::ERR_USER_CANCELED)) +- KMessageBox::error(nullptr, job->errorString()); +- +- QString path = static_cast(job)->destUrl().path(); +- +- QList::Iterator it = fileList.begin(); +- for (; it != fileList.end(); ++it) { +- if (it->path == path) { +- break; ++ if (job) { ++ KIO::FileCopyJob *copyJob = static_cast(job); ++ const QString path = copyJob->destUrl().path(); ++ ++ if (job->error()) { ++ // That error dialog would be queued, i.e. not immediate... ++ //job->showErrorDialog(); ++ if ((job->error() != KIO::ERR_USER_CANCELED)) ++ KMessageBox::error(nullptr, job->errorString()); ++ ++ auto it = std::find_if(fileList.begin(), fileList.end(), ++ [&path](const FileInfo &i) { return (i.path == path); }); ++ if (it != fileList.end()) { ++ fileList.erase(it); ++ } else { ++ qDebug() << path << " not found in list"; + } + } +- +- if (it != fileList.end()) { +- fileList.erase(it); +- } else { +- qDebug() << path << " not found in list"; ++ else ++ { ++ // Tell kioexecd to watch the file for changes. ++ const QString dest = copyJob->srcUrl().toString(); ++ qDebug() << "Telling kioexecd to watch path" << path << "dest" << dest; ++ OrgKdeKIOExecdInterface kioexecd(QStringLiteral("org.kde.kioexecd"), QStringLiteral("/modules/kioexecd"), QDBusConnection::sessionBus()); ++ kioexecd.watch(path, dest); ++ mUseDaemon = !kioexecd.lastError().isValid(); ++ if (!mUseDaemon) { ++ qDebug() << "Not using kioexecd"; ++ } + } + } + +-- +cgit v0.11.2 + diff --git a/kde-frameworks/kio/kio-5.38.0-r1.ebuild b/kde-frameworks/kio/kio-5.38.0-r1.ebuild new file mode 100644 index 00000000000..d20326004df --- /dev/null +++ b/kde-frameworks/kio/kio-5.38.0-r1.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +KDE_TEST="forceoptional" +VIRTUALX_REQUIRED="test" +inherit kde5 + +DESCRIPTION="Framework providing transparent file and data management" +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="acl +handbook kerberos +kwallet X" + +RDEPEND=" + $(add_frameworks_dep karchive) + $(add_frameworks_dep kbookmarks) + $(add_frameworks_dep kcodecs) + $(add_frameworks_dep kcompletion) + $(add_frameworks_dep kconfig) + $(add_frameworks_dep kconfigwidgets) + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep kdbusaddons) + $(add_frameworks_dep ki18n) + $(add_frameworks_dep kiconthemes) + $(add_frameworks_dep kitemviews) + $(add_frameworks_dep kjobwidgets) + $(add_frameworks_dep knotifications) + $(add_frameworks_dep kservice) + $(add_frameworks_dep ktextwidgets) + $(add_frameworks_dep kwidgetsaddons) + $(add_frameworks_dep kwindowsystem) + $(add_frameworks_dep kxmlgui) + $(add_frameworks_dep solid) + $(add_qt_dep qtdbus) + $(add_qt_dep qtgui) + $(add_qt_dep qtnetwork 'ssl') + $(add_qt_dep qtscript) + $(add_qt_dep qtwidgets) + $(add_qt_dep qtxml) + dev-libs/libxml2 + dev-libs/libxslt + acl? ( + sys-apps/attr + virtual/acl + ) + kerberos? ( virtual/krb5 ) + kwallet? ( $(add_frameworks_dep kwallet) ) + X? ( $(add_qt_dep qtx11extras) ) +" +DEPEND="${RDEPEND} + $(add_qt_dep qtconcurrent) + handbook? ( $(add_frameworks_dep kdoctools) ) + test? ( sys-libs/zlib ) + X? ( + x11-libs/libX11 + x11-libs/libXrender + x11-proto/xproto + ) +" +PDEPEND=" + $(add_frameworks_dep kded) +" + +# tests hang +RESTRICT+=" test" + +PATCHES=( "${FILESDIR}/${P}-kioexec.patch" ) + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_find_package acl ACL) + $(cmake-utils_use_find_package handbook KF5DocTools) + $(cmake-utils_use_find_package kerberos GSSAPI) + $(cmake-utils_use_find_package kwallet KF5Wallet) + $(cmake-utils_use_find_package X X11) + ) + + kde5_src_configure +}