summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-07-13 18:14:37 +0100
committerSam James <sam@gentoo.org>2024-07-13 18:16:24 +0100
commit0f7b57dd048269d781ae5c52a4337bb62675c441 (patch)
tree8bce5e2745abdc6b08a1472dc26b619de152abe8
parentmail-client/claws-mail: Stabilize 3.21.0-r1 x86, #935895 (diff)
downloadgentoo-0f7b57dd048269d781ae5c52a4337bb62675c441.tar.gz
gentoo-0f7b57dd048269d781ae5c52a4337bb62675c441.tar.bz2
gentoo-0f7b57dd048269d781ae5c52a4337bb62675c441.zip
kde-apps/ark: backport Qt 6.7 QTemporaryDir fix
Bug: https://bugs.kde.org/487229 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--kde-apps/ark/ark-24.05.2-r1.ebuild (renamed from kde-apps/ark/ark-24.05.2.ebuild)4
-rw-r--r--kde-apps/ark/files/ark-24.05.2-qt6.7-qtemporarydir.patch37
2 files changed, 41 insertions, 0 deletions
diff --git a/kde-apps/ark/ark-24.05.2.ebuild b/kde-apps/ark/ark-24.05.2-r1.ebuild
index 789686d922ec..fbbd5a228e83 100644
--- a/kde-apps/ark/ark-24.05.2.ebuild
+++ b/kde-apps/ark/ark-24.05.2-r1.ebuild
@@ -50,6 +50,10 @@ BDEPEND="
elibc_glibc? ( test? ( amd64? ( app-arch/rar ) x86? ( app-arch/rar ) ) )
"
+PATCHES=(
+ "${FILESDIR}"/${P}-qt6.7-qtemporarydir.patch
+)
+
src_configure() {
local mycmakeargs=(
$(cmake_use_find_package zip LibZip)
diff --git a/kde-apps/ark/files/ark-24.05.2-qt6.7-qtemporarydir.patch b/kde-apps/ark/files/ark-24.05.2-qt6.7-qtemporarydir.patch
new file mode 100644
index 000000000000..299fdce71290
--- /dev/null
+++ b/kde-apps/ark/files/ark-24.05.2-qt6.7-qtemporarydir.patch
@@ -0,0 +1,37 @@
+https://mail.kde.org/pipermail/distributions/2024-July/001513.html
+https://invent.kde.org/utilities/ark/-/commit/85c5e26f581cf011638a53e62b92e1da8fd55fcd
+
+[sam: Rebase for fuzz in the logline.]
+
+From 85c5e26f581cf011638a53e62b92e1da8fd55fcd Mon Sep 17 00:00:00 2001
+From: Elvis Angelaccio <elvis.angelaccio@kde.org>
+Date: Sat, 22 Jun 2024 17:54:07 +0200
+Subject: [PATCH] cliinterface: adapt to behavior change in QTemporaryDir
+
+Qt 6.7 changed the behavior of QTemporaryDir (see commit 935562a77b in
+qtbase.git) and now QTemporaryDir::path() returns a relative path rather
+than an absolute one.
+
+We were relying on the old behavior which ensured that the extract temp
+dir would always auto-delete itself, regardless of the ark CWD.
+
+This is no longer working, because now when the temp dir gets deleted,
+its destructor tries to delete a relative path, but meanwhile ark has
+already changed the CWD and so that path does not exist.
+
+The fix is to create the QTemporaryDir with an absolute path (but still
+as hidden folder in the CWD), so we get back the old behavior (the
+returned QTemporaryDir::path() will again be absolute).
+
+BUG: 487229
+--- a/kerfuffle/cliinterface.cpp
++++ b/kerfuffle/cliinterface.cpp
+@@ -96,7 +96,7 @@ bool CliInterface::extractFiles(const QList<Archive::Entry *> &files, const QStr
+
+ if (useTmpExtractDir) {
+ // Create an hidden temp folder in the current directory.
+- m_extractTempDir.reset(new QTemporaryDir(QStringLiteral(".%1-").arg(QCoreApplication::applicationName())));
++ m_extractTempDir.reset(new QTemporaryDir(QStringLiteral("%1/.%2-").arg(QDir::currentPath(), QCoreApplication::applicationName())));
+
+ qCDebug(ARK) << "Using temporary extraction dir:" << m_extractTempDir->path();
+ if (!m_extractTempDir->isValid()) {