public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: kde-apps/libkgapi/files/, kde-apps/libkgapi/
@ 2020-11-25 13:17 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2020-11-25 13:17 UTC (permalink / raw
  To: gentoo-commits

commit:     421c9da28628083d6c510eed8c963ed025a1cfbe
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 25 12:22:52 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Nov 25 13:17:42 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=421c9da2

kde-apps/libkgapi: Fix contactfetchjobtest

Upstream commit 570c0fd731af9ca4cead249d1db6133acc21f7c1
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=419629
Reported-by: Paolo Pedroni <paolo.pedroni <AT> iol.it>
Closes: https://bugs.gentoo.org/754159
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch | 31 ++++++++++++++++++++++
 kde-apps/libkgapi/libkgapi-20.08.3.ebuild          |  4 +++
 2 files changed, 35 insertions(+)

diff --git a/kde-apps/libkgapi/files/libkgapi-20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch b/kde-apps/libkgapi/files/libkgapi-20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch
new file mode 100644
index 00000000000..42cd78136ad
--- /dev/null
+++ b/kde-apps/libkgapi/files/libkgapi-20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch
@@ -0,0 +1,31 @@
+From 570c0fd731af9ca4cead249d1db6133acc21f7c1 Mon Sep 17 00:00:00 2001
+From: David Barchiesi <david@barchie.si>
+Date: Mon, 24 Aug 2020 12:04:17 +0200
+Subject: [PATCH] Remove duplicate "gContact$groupMembershipInfo" value in mock
+ fetch response.
+
+BUG: 419629
+---
+ autotests/contacts/data/contact1_fetch_response.txt | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/autotests/contacts/data/contact1_fetch_response.txt b/autotests/contacts/data/contact1_fetch_response.txt
+index 7b22c91..89fc0e1 100644
+--- a/autotests/contacts/data/contact1_fetch_response.txt
++++ b/autotests/contacts/data/contact1_fetch_response.txt
+@@ -44,12 +44,6 @@ Content-type: application/json; charset=UTF-8
+       "$t": "2018-03-25T16:37:29.565Z"
+     }, 
+     "xmlns$gd": "http://schemas.google.com/g/2005", 
+-    "gContact$groupMembershipInfo": [
+-      {
+-        "deleted": "false", 
+-        "href": "http://www.google.com/m8/feeds/groups/MockAccount/base/6"
+-      }
+-    ], 
+     "gd$structuredPostalAddress": [
+       {
+         "gd$country": {
+-- 
+GitLab
+

diff --git a/kde-apps/libkgapi/libkgapi-20.08.3.ebuild b/kde-apps/libkgapi/libkgapi-20.08.3.ebuild
index 20276f79832..9ba86c9d21f 100644
--- a/kde-apps/libkgapi/libkgapi-20.08.3.ebuild
+++ b/kde-apps/libkgapi/libkgapi-20.08.3.ebuild
@@ -35,3 +35,7 @@ DEPEND="
 RDEPEND="${DEPEND}
 	!<kde-apps/kdepim-runtime-18.07.80:5
 "
+
+PATCHES=(
+	"${FILESDIR}/${P}-fix-contactfetchjobtest-w-qt-5.15.patch" # bug 754159
+)


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

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/libkgapi/files/, kde-apps/libkgapi/
@ 2021-01-14 19:49 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2021-01-14 19:49 UTC (permalink / raw
  To: gentoo-commits

commit:     1ddf70fde01795a6b4ee92321f553fd9dab7ba92
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 14 19:20:33 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Jan 14 19:48:48 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ddf70fd

kde-apps/libkgapi: Remember GMail auth token

See also: https://bugs.kde.org/show_bug.cgi?id=429406

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...ibkgapi-20.12.1-remember-gmail-auth-token.patch | 30 +++++++++++++++++++
 kde-apps/libkgapi/libkgapi-20.12.1-r1.ebuild       | 35 ++++++++++++++++++++++
 2 files changed, 65 insertions(+)

diff --git a/kde-apps/libkgapi/files/libkgapi-20.12.1-remember-gmail-auth-token.patch b/kde-apps/libkgapi/files/libkgapi-20.12.1-remember-gmail-auth-token.patch
new file mode 100644
index 00000000000..4d777f1475f
--- /dev/null
+++ b/kde-apps/libkgapi/files/libkgapi-20.12.1-remember-gmail-auth-token.patch
@@ -0,0 +1,30 @@
+From d81d247026ac993ac5717ca471c7fcf1778951f2 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Wed, 6 Jan 2021 15:54:52 +0100
+Subject: [PATCH] Don't reset account scopes if not necessary
+
+This triggers unnecesary authentication prompts
+
+BUG: 429406
+---
+ src/core/accountmanager.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/accountmanager.cpp b/src/core/accountmanager.cpp
+index b9af6c1..f68563e 100644
+--- a/src/core/accountmanager.cpp
++++ b/src/core/accountmanager.cpp
+@@ -81,7 +81,9 @@ public:
+                     currentScopes.push_back(requestedScope);
+                 }
+             }
+-            account->setScopes(currentScopes);
++            if (currentScopes != account->scopes()) {
++                account->setScopes(currentScopes);
++            }
+         }
+         auto *job = new AuthJob(account, apiKey, apiSecret);
+         job->setUsername(account->accountName());
+-- 
+GitLab
+

diff --git a/kde-apps/libkgapi/libkgapi-20.12.1-r1.ebuild b/kde-apps/libkgapi/libkgapi-20.12.1-r1.ebuild
new file mode 100644
index 00000000000..07016b6b5f8
--- /dev/null
+++ b/kde-apps/libkgapi/libkgapi-20.12.1-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_TEST="true"
+KFMIN=5.75.0
+QTMIN=5.15.1
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Library for accessing Google calendar and contact resources"
+HOMEPAGE="https://api.kde.org/kdepim/libkgapi/html/index.html"
+
+LICENSE="LGPL-2.1+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="nls"
+
+BDEPEND="
+	nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 )
+"
+DEPEND="
+	dev-libs/cyrus-sasl:2
+	>=dev-qt/qtgui-${QTMIN}:5
+	>=dev-qt/qtnetwork-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtxml-${QTMIN}:5
+	>=kde-frameworks/kcalendarcore-${KFMIN}:5
+	>=kde-frameworks/kcontacts-${KFMIN}:5
+	>=kde-frameworks/kwallet-${KFMIN}:5
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-remember-gmail-auth-token.patch" ) # KDE-Bug 429406


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

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/libkgapi/files/, kde-apps/libkgapi/
@ 2021-02-24 22:40 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2021-02-24 22:40 UTC (permalink / raw
  To: gentoo-commits

commit:     d18944a40e30a4cbc81eabad819c5b91126629ce
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 24 21:18:24 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Feb 24 22:39:43 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d18944a4

kde-apps/libkgapi: drop 20.08.3*

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-apps/libkgapi/Manifest                         |  1 -
 ...20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch | 31 -----------------
 kde-apps/libkgapi/libkgapi-20.08.3-r1.ebuild       | 40 ----------------------
 3 files changed, 72 deletions(-)

diff --git a/kde-apps/libkgapi/Manifest b/kde-apps/libkgapi/Manifest
index 4d783edbb5d..ecf59a49792 100644
--- a/kde-apps/libkgapi/Manifest
+++ b/kde-apps/libkgapi/Manifest
@@ -1,2 +1 @@
-DIST libkgapi-20.08.3.tar.xz 242676 BLAKE2B 86b04cea376eb46081632fb571bdb3a67f4f44f3dd6c8a3af0144598634417ee39defb445324f33969420718daa999f43c5ea5d9c01634a0ec944bf457219fd7 SHA512 de7062632660777074f4d0d8b754b072c7f2b0550260e994d1db3e99d8f258f2507ad605d91cb6c465794ced92b740a742ab99947737edea73fd928c087d4388
 DIST libkgapi-20.12.2.tar.xz 246020 BLAKE2B c934898d8832c0264919a313d25d6a74a7a377dbd5575926ea6bc6ebbe8870e37691b307b058b67a5ff09d9bbf2db759b4d98d93d347a239315500e7f95d5bdc SHA512 0350eaff72b192219553047781e1ae79bc794b9519095f812a1c8efe3e9d33c3dbb5d9db07bd28a39132adc4543627e2c46a866aec9f8710ef2d35cfb0a1f697

diff --git a/kde-apps/libkgapi/files/libkgapi-20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch b/kde-apps/libkgapi/files/libkgapi-20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch
deleted file mode 100644
index 42cd78136ad..00000000000
--- a/kde-apps/libkgapi/files/libkgapi-20.08.3-fix-contactfetchjobtest-w-qt-5.15.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 570c0fd731af9ca4cead249d1db6133acc21f7c1 Mon Sep 17 00:00:00 2001
-From: David Barchiesi <david@barchie.si>
-Date: Mon, 24 Aug 2020 12:04:17 +0200
-Subject: [PATCH] Remove duplicate "gContact$groupMembershipInfo" value in mock
- fetch response.
-
-BUG: 419629
----
- autotests/contacts/data/contact1_fetch_response.txt | 6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/autotests/contacts/data/contact1_fetch_response.txt b/autotests/contacts/data/contact1_fetch_response.txt
-index 7b22c91..89fc0e1 100644
---- a/autotests/contacts/data/contact1_fetch_response.txt
-+++ b/autotests/contacts/data/contact1_fetch_response.txt
-@@ -44,12 +44,6 @@ Content-type: application/json; charset=UTF-8
-       "$t": "2018-03-25T16:37:29.565Z"
-     }, 
-     "xmlns$gd": "http://schemas.google.com/g/2005", 
--    "gContact$groupMembershipInfo": [
--      {
--        "deleted": "false", 
--        "href": "http://www.google.com/m8/feeds/groups/MockAccount/base/6"
--      }
--    ], 
-     "gd$structuredPostalAddress": [
-       {
-         "gd$country": {
--- 
-GitLab
-

diff --git a/kde-apps/libkgapi/libkgapi-20.08.3-r1.ebuild b/kde-apps/libkgapi/libkgapi-20.08.3-r1.ebuild
deleted file mode 100644
index 99b60fac04b..00000000000
--- a/kde-apps/libkgapi/libkgapi-20.08.3-r1.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-ECM_TEST="true"
-KFMIN=5.74.0
-QTMIN=5.15.1
-VIRTUALX_REQUIRED="test"
-inherit ecm kde.org
-
-DESCRIPTION="Library for accessing Google calendar and contact resources"
-HOMEPAGE="https://api.kde.org/kdepim/libkgapi/html/index.html"
-
-LICENSE="LGPL-2.1+"
-SLOT="5"
-KEYWORDS="amd64 arm64 ~ppc64 x86"
-IUSE="nls"
-
-BDEPEND="
-	nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 )
-"
-DEPEND="
-	dev-libs/cyrus-sasl:2
-	>=dev-qt/qtgui-${QTMIN}:5
-	>=dev-qt/qtnetwork-${QTMIN}:5
-	>=dev-qt/qtwebengine-${QTMIN}:5[widgets]
-	>=dev-qt/qtwidgets-${QTMIN}:5
-	>=dev-qt/qtxml-${QTMIN}:5
-	>=kde-frameworks/kcalendarcore-${KFMIN}:5
-	>=kde-frameworks/kcontacts-${KFMIN}:5
-	>=kde-frameworks/kio-${KFMIN}:5
-	>=kde-frameworks/kwallet-${KFMIN}:5
-	>=kde-frameworks/kwindowsystem-${KFMIN}:5
-"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
-	"${FILESDIR}/${P}-fix-contactfetchjobtest-w-qt-5.15.patch" # bug 754159
-)


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

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/libkgapi/files/, kde-apps/libkgapi/
@ 2022-07-15  7:13 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-07-15  7:13 UTC (permalink / raw
  To: gentoo-commits

commit:     4443c8095edbfbb98ec5cf1c3e6b5c109ae8bed4
Author:     Alfred Persson Forsberg <cat <AT> catcream <DOT> org>
AuthorDate: Tue Jun 28 16:11:03 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 15 07:12:19 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4443c809

kde-apps/libkgapi: fix build for musl

The issue here is that NI_MAXHOST is used inside
saslplugin/plugin_common.c. That is a GNU extension only defined when
_GNU_SOURCE is defined. Declarning that this is POSIX source
code (_POSIX_SOURCE) is therefore misleading and breaks the build for
musl.

See:
https://invent.kde.org/pim/libkgapi/-/merge_requests/29/diffs?commit_id=1e6a54a9f2d818aa4046e5291702e236a53ba987,
https://invent.kde.org/pim/libkgapi/-/merge_requests/29/

Signed-off-by: Alfred Persson Forsberg <cat <AT> catcream.org>
Closes: https://github.com/gentoo/gentoo/pull/26116
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/libkgapi-22.04.2-gnu_source.patch        | 23 ++++++++++++++++++++++
 kde-apps/libkgapi/libkgapi-22.04.3.ebuild          |  2 ++
 2 files changed, 25 insertions(+)

diff --git a/kde-apps/libkgapi/files/libkgapi-22.04.2-gnu_source.patch b/kde-apps/libkgapi/files/libkgapi-22.04.2-gnu_source.patch
new file mode 100644
index 000000000000..88e3e2a3ed34
--- /dev/null
+++ b/kde-apps/libkgapi/files/libkgapi-22.04.2-gnu_source.patch
@@ -0,0 +1,23 @@
+https://invent.kde.org/pim/libkgapi/-/merge_requests/29
+https://invent.kde.org/pim/libkgapi/-/merge_requests/29/diffs?commit_id=1e6a54a9f2d818aa4046e5291702e236a53ba987
+
+---
+ src/saslplugin/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/saslplugin/CMakeLists.txt b/src/saslplugin/CMakeLists.txt
+index 61edd04..e8823fb 100644
+--- a/src/saslplugin/CMakeLists.txt
++++ b/src/saslplugin/CMakeLists.txt
+@@ -2,7 +2,7 @@ include(CheckIncludeFile)
+ include(CheckStructHasMember)
+ 
+ if (NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+-   add_definitions(-D_POSIX_SOURCE)
++	add_definitions(-D_GNU_SOURCE)
+ endif()
+ 
+ if (WIN32)
+-- 
+2.35.1
+

diff --git a/kde-apps/libkgapi/libkgapi-22.04.3.ebuild b/kde-apps/libkgapi/libkgapi-22.04.3.ebuild
index 6b4d892a0c6a..2e26e8525db4 100644
--- a/kde-apps/libkgapi/libkgapi-22.04.3.ebuild
+++ b/kde-apps/libkgapi/libkgapi-22.04.3.ebuild
@@ -32,6 +32,8 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}"/${PN}-22.04.2-gnu_source.patch )
+
 src_test() {
 	local myctestargs=(
 		# Both fail for multiple distros, see bug #832709 for more discussion


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

* [gentoo-commits] repo/gentoo:master commit in: kde-apps/libkgapi/files/, kde-apps/libkgapi/
@ 2023-01-28 22:48 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2023-01-28 22:48 UTC (permalink / raw
  To: gentoo-commits

commit:     93ce4f04790e887e14d4176fe1f931e07f9c31aa
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 28 21:45:47 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Jan 28 22:32:26 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93ce4f04

kde-apps/libkgapi: Fix AccountManager promises cache handling

Upstream commits:
b5a581d98d9b57363c44bd98eeab7243fbf13a22
d677a08c21fd99e7e8be0a0899f797f9237207e4

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=406839
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=409122
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=421664
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=456923

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...ager-dont-keep-finished-promises-in-cache.patch | 27 ++++++++
 ...e-promises-for-AccountManager-findAccount.patch | 75 ++++++++++++++++++++++
 kde-apps/libkgapi/libkgapi-22.08.3-r1.ebuild       | 49 ++++++++++++++
 3 files changed, 151 insertions(+)

diff --git a/kde-apps/libkgapi/files/libkgapi-22.08.3-AccountManager-dont-keep-finished-promises-in-cache.patch b/kde-apps/libkgapi/files/libkgapi-22.08.3-AccountManager-dont-keep-finished-promises-in-cache.patch
new file mode 100644
index 000000000000..485bc7d840f8
--- /dev/null
+++ b/kde-apps/libkgapi/files/libkgapi-22.08.3-AccountManager-dont-keep-finished-promises-in-cache.patch
@@ -0,0 +1,27 @@
+From b5a581d98d9b57363c44bd98eeab7243fbf13a22 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Mon, 21 Nov 2022 13:00:41 +0100
+Subject: [PATCH] AccountManager: Don't keep finished promises in the cache
+
+AccountPromises are destroyed one event loop cycle after they finished().
+They won't emit finished() again, so they can't be used.
+---
+ src/core/accountmanager.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/accountmanager.cpp b/src/core/accountmanager.cpp
+index 42719c5e..da5c37b6 100644
+--- a/src/core/accountmanager.cpp
++++ b/src/core/accountmanager.cpp
+@@ -134,7 +134,7 @@ public:
+         auto promise = mPendingPromises.value(key, nullptr);
+         if (!promise) {
+             promise = new AccountPromise(q);
+-            QObject::connect(promise, &QObject::destroyed, q, [key, this]() {
++            QObject::connect(promise, &AccountPromise::finished, q, [key, this]() {
+                 mPendingPromises.remove(key);
+             });
+             mPendingPromises.insert(key, promise);
+-- 
+GitLab
+

diff --git a/kde-apps/libkgapi/files/libkgapi-22.08.3-dont-cache-promises-for-AccountManager-findAccount.patch b/kde-apps/libkgapi/files/libkgapi-22.08.3-dont-cache-promises-for-AccountManager-findAccount.patch
new file mode 100644
index 000000000000..b24b80377686
--- /dev/null
+++ b/kde-apps/libkgapi/files/libkgapi-22.08.3-dont-cache-promises-for-AccountManager-findAccount.patch
@@ -0,0 +1,75 @@
+From d677a08c21fd99e7e8be0a0899f797f9237207e4 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Mon, 21 Nov 2022 13:02:27 +0100
+Subject: [PATCH] Don't cache promises for AccountManager::findAccount
+
+Unlike AccountManager::getAccount and AccountManager::refreshTokens, this
+method does not return an authenticated account. However, the promises are
+cached for all of them in the same store, so it was possible for a call to
+e.g. refreshTokens to get a promise created by findAccount instead, resulting
+in an unexpected result. Just don't cache promises created by findAccount.
+
+BUG: 406839
+BUG: 409122
+BUG: 421664
+BUG: 456923
+---
+ src/core/accountmanager.cpp | 38 ++++++++++++++++++-------------------
+ 1 file changed, 18 insertions(+), 20 deletions(-)
+
+diff --git a/src/core/accountmanager.cpp b/src/core/accountmanager.cpp
+index da5c37b6..c6b8189d 100644
+--- a/src/core/accountmanager.cpp
++++ b/src/core/accountmanager.cpp
+@@ -265,30 +265,28 @@ AccountPromise *AccountManager::refreshTokens(const QString &apiKey, const QStri
+ 
+ AccountPromise *AccountManager::findAccount(const QString &apiKey, const QString &accountName, const QList<QUrl> &scopes)
+ {
+-    auto promise = d->createPromise(apiKey, accountName);
+-    if (!promise->d->isRunning()) {
+-        QTimer::singleShot(0, this, [=]() {
+-            d->ensureStore([=](bool storeOpened) {
+-                if (!storeOpened) {
+-                    promise->d->setError(tr("Failed to open account store"));
+-                    return;
+-                }
++    auto promise = new AccountPromise(this);
++    QTimer::singleShot(0, this, [=]() {
++        d->ensureStore([=](bool storeOpened) {
++            if (!storeOpened) {
++                promise->d->setError(tr("Failed to open account store"));
++                return;
++            }
+ 
+-                const auto account = d->mStore->getAccount(apiKey, accountName);
+-                if (!account) {
+-                    promise->d->setAccount({});
++            const auto account = d->mStore->getAccount(apiKey, accountName);
++            if (!account) {
++                promise->d->setAccount({});
++            } else {
++                const auto currentScopes = account->scopes();
++                if (scopes.isEmpty() || d->compareScopes(currentScopes, scopes)) {
++                    promise->d->setAccount(account);
+                 } else {
+-                    const auto currentScopes = account->scopes();
+-                    if (scopes.isEmpty() || d->compareScopes(currentScopes, scopes)) {
+-                        promise->d->setAccount(account);
+-                    } else {
+-                        promise->d->setAccount({});
+-                    }
++                    promise->d->setAccount({});
+                 }
+-            });
++            }
+         });
+-        promise->d->setRunning();
+-    }
++    });
++    promise->d->setRunning();
+     return promise;
+ }
+ 
+-- 
+GitLab
+

diff --git a/kde-apps/libkgapi/libkgapi-22.08.3-r1.ebuild b/kde-apps/libkgapi/libkgapi-22.08.3-r1.ebuild
new file mode 100644
index 000000000000..a46cb2350c58
--- /dev/null
+++ b/kde-apps/libkgapi/libkgapi-22.08.3-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="true"
+KFMIN=5.96.0
+QTMIN=5.15.5
+VIRTUALX_REQUIRED="test"
+inherit ecm gear.kde.org
+
+DESCRIPTION="Library for accessing Google calendar and contact resources"
+HOMEPAGE="https://api.kde.org/kdepim/libkgapi/html/index.html"
+
+LICENSE="LGPL-2.1+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="nls"
+
+DEPEND="
+	dev-libs/cyrus-sasl:2
+	>=dev-qt/qtgui-${QTMIN}:5
+	>=dev-qt/qtnetwork-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtxml-${QTMIN}:5
+	>=kde-frameworks/kcalendarcore-${KFMIN}:5
+	>=kde-frameworks/kcontacts-${KFMIN}:5
+	>=kde-frameworks/kwallet-${KFMIN}:5
+"
+RDEPEND="${DEPEND}"
+BDEPEND="nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 )"
+
+PATCHES=(
+	"${FILESDIR}/${P}-AccountManager-dont-keep-finished-promises-in-cache.patch"
+	"${FILESDIR}/${P}-dont-cache-promises-for-AccountManager-findAccount.patch"
+)
+
+src_test() {
+	local myctestargs=(
+		# Both fail for multiple distros, see bug #832709 for more discussion
+		# Revisit at least once Qt 5.15.3 is in wider distribution (in Gentoo at least):
+		#   contacts-contactcreatejobtest, contacts-contactmodifyjobtest
+		# More failures not specific to Gentoo, bug #852593, KDE-bug #440648:
+		#  calendar-eventcreatejobtest, calendar-eventfetchjobtest, calendar-eventmodifyjobtest
+		-E "(contacts-contactcreatejobtest|contacts-contactmodifyjobtest|calendar-eventcreatejobtest|calendar-eventfetchjobtest|calendar-eventmodifyjobtest)"
+	)
+
+	virtx cmake_src_test
+}


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

end of thread, other threads:[~2023-01-28 22:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-15  7:13 [gentoo-commits] repo/gentoo:master commit in: kde-apps/libkgapi/files/, kde-apps/libkgapi/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-01-28 22:48 Andreas Sturmlechner
2021-02-24 22:40 Andreas Sturmlechner
2021-01-14 19:49 Andreas Sturmlechner
2020-11-25 13:17 Andreas Sturmlechner

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