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 690BC138334 for ; Thu, 15 Aug 2019 17:09:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8AC7FE0CCC; Thu, 15 Aug 2019 17:09:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 59810E0CCC for ; Thu, 15 Aug 2019 17:09:58 +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 CF4C1349BE9 for ; Thu, 15 Aug 2019 17:09:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3BF464D4 for ; Thu, 15 Aug 2019 17:09:54 +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: <1565888983.78569d482a5866088bc6d9ebf3adcff8f864d2db.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-misc/kio-gdrive/files/, kde-misc/kio-gdrive/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-1.patch kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-2.patch kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild X-VCS-Directories: kde-misc/kio-gdrive/ kde-misc/kio-gdrive/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 78569d482a5866088bc6d9ebf3adcff8f864d2db X-VCS-Branch: master Date: Thu, 15 Aug 2019 17:09:54 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a030d160-e6a8-4764-94f3-4a34274f9ccf X-Archives-Hash: f40047a84bf3b0f8b894de8c9b4e261c commit: 78569d482a5866088bc6d9ebf3adcff8f864d2db Author: Andreas Sturmlechner gentoo org> AuthorDate: Thu Aug 15 14:44:29 2019 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Thu Aug 15 17:09:43 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78569d48 kde-misc/kio-gdrive: Revbump for >=kde-apps/libkgapi-19.08.0 compat Package-Manager: Portage-2.3.71, Repoman-2.3.17 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/kio-gdrive-1.2.6-libkgapi-19.08-1.patch | 120 +++++++++++++++++++++ .../files/kio-gdrive-1.2.6-libkgapi-19.08-2.patch | 42 ++++++++ kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild | 49 +++++++++ 3 files changed, 211 insertions(+) diff --git a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-1.patch b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-1.patch new file mode 100644 index 00000000000..03352081b73 --- /dev/null +++ b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-1.patch @@ -0,0 +1,120 @@ +From 01ec4d87b2e28de5eb3c23ec469c6c746f573520 Mon Sep 17 00:00:00 2001 +From: David Barchiesi +Date: Sun, 19 May 2019 12:38:24 +0200 +Subject: Adapt to LibKGAPI setFields() changes. + +Summary: +In the next release, LibKGAPI has changed the way it sets fields in `FileFetchJob` and in general allows setting response fields for all `Job`s (see [[ https://phabricator.kde.org/D20886 | D20886 Add fields standard query parameter to Job and use it in FileFetchJob ]]). + +This patch adjusts KIO Gdrive to this change and limits the response in `AboutFetchJob`s. + +Reviewers: dvratil, elvisangelaccio + +Subscribers: #libkgapi, #kio_gdrive + +Tags: #kio_gdrive, #libkgapi + +Differential Revision: https://phabricator.kde.org/D20888 +--- + CMakeLists.txt | 2 +- + src/kio_gdrive.cpp | 30 ++++++++++++++++++------------ + 2 files changed, 19 insertions(+), 13 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a830925..680ae3e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,7 +5,7 @@ project(kio-gdrive VERSION ${GDRIVE_VERSION}) + + set(QT_MIN_VERSION 5.2.0) + set(KF5_MIN_VERSION 5.14.0) +-set(KGAPI_MIN_VERSION 5.5.0) ++set(KGAPI_MIN_VERSION 5.11.41) + set(KACCOUNTS_MIN_VERSION 17.04.0) + set(QTKEYCHAIN_MIN_VERSION 0.6.0) + +diff --git a/src/kio_gdrive.cpp b/src/kio_gdrive.cpp +index 9ab146f..e01fef6 100644 +--- a/src/kio_gdrive.cpp ++++ b/src/kio_gdrive.cpp +@@ -146,6 +146,12 @@ void KIOGDrive::fileSystemFreeSpace(const QUrl &url) + } + if (!gdriveUrl.isRoot()) { + AboutFetchJob aboutFetch(getAccount(accountId)); ++ aboutFetch.setFields({ ++ About::Fields::Kind, ++ About::Fields::QuotaBytesTotal, ++ About::Fields::QuotaBytesUsedAggregate, ++ About::Fields::CanCreateTeamDrives, ++ }); + if (runJob(aboutFetch, url, accountId)) { + const AboutPtr about = aboutFetch.aboutData(); + if (about) { +@@ -379,7 +385,7 @@ QString KIOGDrive::resolveFileIdFromPath(const QString &path, PathFlags flags) + + const QString accountId = gdriveUrl.account(); + FileFetchJob fetchJob(query, getAccount(accountId)); +- fetchJob.setFields(FileFetchJob::Id | FileFetchJob::Title | FileFetchJob::Labels); ++ fetchJob.setFields({File::Fields::Id, File::Fields::Title, File::Fields::Labels}); + if (!runJob(fetchJob, url, accountId)) { + return QString(); + } +@@ -404,6 +410,7 @@ QString KIOGDrive::rootFolderId(const QString &accountId) + auto it = m_rootIds.constFind(accountId); + if (it == m_rootIds.cend()) { + AboutFetchJob aboutFetch(getAccount(accountId)); ++ aboutFetch.setFields({About::Fields::Kind, About::Fields::RootFolderId}); + QUrl url; + if (!runJob(aboutFetch, url, accountId)) { + return QString(); +@@ -455,10 +462,13 @@ void KIOGDrive::listDir(const QUrl &url) + query.addQuery(FileSearchQuery::Trashed, FileSearchQuery::Equals, false); + query.addQuery(FileSearchQuery::Parents, FileSearchQuery::In, folderId); + FileFetchJob fileFetchJob(query, getAccount(accountId)); +- fileFetchJob.setFields((FileFetchJob::BasicFields & ~FileFetchJob::Permissions) +- | FileFetchJob::Labels +- | FileFetchJob::ExportLinks +- | FileFetchJob::LastViewedByMeDate); ++ const auto extraFields = ++ KGAPI2::Drive::FileFetchJob::FieldShorthands::BasicFields + ++ QStringList({ KGAPI2::Drive::File::Fields::Labels, ++ KGAPI2::Drive::File::Fields::ExportLinks, ++ KGAPI2::Drive::File::Fields::LastViewedByMeDate, ++ }); ++ fileFetchJob.setFields(KGAPI2::Drive::FileFetchJob::FieldShorthands::BasicFields + extraFields); + runJob(fileFetchJob, url, accountId); + + ObjectsList objects = fileFetchJob.items(); +@@ -607,10 +617,7 @@ void KIOGDrive::get(const QUrl &url) + } + + FileFetchJob fileFetchJob(fileId, getAccount(accountId)); +- fileFetchJob.setFields(FileFetchJob::Id +- | FileFetchJob::MimeType +- | FileFetchJob::ExportLinks +- | FileFetchJob::DownloadUrl); ++ fileFetchJob.setFields({File::Fields::Id, File::Fields::MimeType, File::Fields::ExportLinks, File::Fields::DownloadUrl}); + runJob(fileFetchJob, url, accountId); + + const ObjectsList objects = fileFetchJob.items(); +@@ -866,8 +873,7 @@ void KIOGDrive::copy(const QUrl &src, const QUrl &dest, int permissions, KIO::Jo + return; + } + FileFetchJob sourceFileFetchJob(sourceFileId, getAccount(sourceAccountId)); +- sourceFileFetchJob.setFields(FileFetchJob::Id | FileFetchJob::ModifiedDate | +- FileFetchJob::LastViewedByMeDate | FileFetchJob::Description); ++ sourceFileFetchJob.setFields({File::Fields::Id, File::Fields::ModifiedDate, File::Fields::LastViewedByMeDate, File::Fields::Description}); + runJob(sourceFileFetchJob, src, sourceAccountId); + + const ObjectsList objects = sourceFileFetchJob.items(); +@@ -1086,7 +1092,7 @@ void KIOGDrive::mimetype(const QUrl &url) + const QString accountId = GDriveUrl(url).account(); + + FileFetchJob fileFetchJob(fileId, getAccount(accountId)); +- fileFetchJob.setFields(FileFetchJob::Id | FileFetchJob::MimeType); ++ fileFetchJob.setFields({File::Fields::Id, File::Fields::MimeType}); + runJob(fileFetchJob, url, accountId); + + const ObjectsList objects = fileFetchJob.items(); +-- +cgit v1.1 diff --git a/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-2.patch b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-2.patch new file mode 100644 index 00000000000..65d181ca7a5 --- /dev/null +++ b/kde-misc/kio-gdrive/files/kio-gdrive-1.2.6-libkgapi-19.08-2.patch @@ -0,0 +1,42 @@ +From f81aed7bd13fd1d7fcd1f37baade3f1f6f34c54d Mon Sep 17 00:00:00 2001 +From: David Barchiesi +Date: Wed, 3 Jul 2019 20:18:59 +0200 +Subject: Remove useless FileFetchJob field specifications. Fixes D21838 + related issues. + +--- + src/kio_gdrive.cpp | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +diff --git a/src/kio_gdrive.cpp b/src/kio_gdrive.cpp +index 4d80baf..5add144 100644 +--- a/src/kio_gdrive.cpp ++++ b/src/kio_gdrive.cpp +@@ -149,8 +149,7 @@ void KIOGDrive::fileSystemFreeSpace(const QUrl &url) + aboutFetch.setFields({ + About::Fields::Kind, + About::Fields::QuotaBytesTotal, +- About::Fields::QuotaBytesUsedAggregate, +- About::Fields::CanCreateTeamDrives, ++ About::Fields::QuotaBytesUsedAggregate + }); + if (runJob(aboutFetch, url, accountId)) { + const AboutPtr about = aboutFetch.aboutData(); +@@ -462,11 +461,10 @@ void KIOGDrive::listDir(const QUrl &url) + query.addQuery(FileSearchQuery::Parents, FileSearchQuery::In, folderId); + FileFetchJob fileFetchJob(query, getAccount(accountId)); + const auto extraFields = +- KGAPI2::Drive::FileFetchJob::FieldShorthands::BasicFields + +- QStringList({ KGAPI2::Drive::File::Fields::Labels, +- KGAPI2::Drive::File::Fields::ExportLinks, +- KGAPI2::Drive::File::Fields::LastViewedByMeDate, +- }); ++ QStringList({ KGAPI2::Drive::File::Fields::Labels, ++ KGAPI2::Drive::File::Fields::ExportLinks, ++ KGAPI2::Drive::File::Fields::LastViewedByMeDate, ++ }); + fileFetchJob.setFields(KGAPI2::Drive::FileFetchJob::FieldShorthands::BasicFields + extraFields); + runJob(fileFetchJob, url, accountId); + +-- +cgit v1.1 diff --git a/kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild b/kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild new file mode 100644 index 00000000000..41e4f617d5c --- /dev/null +++ b/kde-misc/kio-gdrive/kio-gdrive-1.2.6-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +KDE_APPS_MINIMAL=19.08.0 +KDE_HANDBOOK="forceoptional" +KDE_TEST="optional" +inherit kde5 + +DESCRIPTION="KIO Slave for Google Drive service" +HOMEPAGE="https://phabricator.kde.org/project/profile/72/" + +if [[ ${KDE_BUILD_TYPE} != live ]] ; then + SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz" + KEYWORDS="~amd64 ~x86" +fi + +IUSE="+kaccounts" + +COMMON_DEPEND=" + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep ki18n) + $(add_frameworks_dep kio) + $(add_frameworks_dep knotifications) + $(add_kdeapps_dep libkgapi) + $(add_qt_dep qtwidgets) + kaccounts? ( $(add_kdeapps_dep kaccounts-integration) ) + !kaccounts? ( dev-libs/qtkeychain:=[qt5(+)] ) +" +DEPEND="${COMMON_DEPEND} + $(add_qt_dep qtgui) + $(add_qt_dep qtnetwork) +" +RDEPEND="${COMMON_DEPEND} + kaccounts? ( $(add_kdeapps_dep kaccounts-providers) ) +" +BDEPEND="dev-util/intltool" + +DOCS=( README.md ) + +PATCHES=( "${FILESDIR}"/${P}-libkgapi-19.08-{1,2}.patch ) + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_find_package kaccounts KAccounts) + ) + kde5_src_configure +}