GNU bug report logs - #65280
[PATCH 00/26] Refresh Qt 6 packages

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Mon, 14 Aug 2023 04:23:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 65280 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 65280 <at> debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>,
 Distopico Vegan <distopico <at> riseup.net>
Subject: [PATCH 02/26] gnu: qtdeclarative: Disable QML cache to avoid stale
 cache issues.
Date: Mon, 14 Aug 2023 00:29:12 -0400
Fixes <https://issues.guix.gnu.org/64605> and similar reports.

* gnu/packages/patches/qtdeclarative-5-disable-qmlcache.patch: New patch.
* gnu/packages/patches/qtdeclarative-disable-qmlcache.patch: Likewise.
* gnu/local.mk (dist_patch_DATA): Register them.
* gnu/packages/qt.scm (qtdeclarative-5, qtdeclarative): Apply them.

Reported-by: Distopico Vegan <distopico <at> riseup.net>
---

 gnu/local.mk                                     |  2 ++
 .../qtdeclarative-5-disable-qmlcache.patch       | 16 ++++++++++++++++
 .../patches/qtdeclarative-disable-qmlcache.patch | 16 ++++++++++++++++
 gnu/packages/qt.scm                              |  6 ++++--
 4 files changed, 38 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/qtdeclarative-5-disable-qmlcache.patch
 create mode 100644 gnu/packages/patches/qtdeclarative-disable-qmlcache.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 1fc37ca6e8..bc703db2df 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1730,6 +1730,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/python-typeguard-python3.10.patch	\
   %D%/packages/patches/python-w3lib-fix-test-failure.patch	\
   %D%/packages/patches/python-wxwidgets-type-errors.patch	\
+  %D%/packages/patches/qtdeclarative-5-disable-qmlcache.patch	\
+  %D%/packages/patches/qtdeclarative-disable-qmlcache.patch	\
   %D%/packages/patches/quodlibet-fix-invalid-glob.patch	\
   %D%/packages/patches/quodlibet-fix-mtime-tests.patch		\
   %D%/packages/patches/qxlsx-fix-include-directory.patch	\
diff --git a/gnu/packages/patches/qtdeclarative-5-disable-qmlcache.patch b/gnu/packages/patches/qtdeclarative-5-disable-qmlcache.patch
new file mode 100644
index 0000000000..2f1cf0dd4e
--- /dev/null
+++ b/gnu/packages/patches/qtdeclarative-5-disable-qmlcache.patch
@@ -0,0 +1,16 @@
+Retrieved from
+https://github.com/NixOS/nixpkgs/raw/master/pkgs/development/libraries/qt-5/5.15/qtdeclarative-default-disable-qmlcache.patch
+
+diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
+index 1d66e75..827567a 100644
+--- a/src/qml/qml/qqmltypeloader.cpp
++++ b/src/qml/qml/qqmltypeloader.cpp
+@@ -727,7 +727,7 @@ bool QQmlTypeLoader::Blob::isDebugging() const
+ 
+ bool QQmlTypeLoader::Blob::diskCacheEnabled() const
+ {
+-    return (!disableDiskCache() && !isDebugging()) || forceDiskCache();
++    return forceDiskCache();
+ }
+ 
+ bool QQmlTypeLoader::Blob::qmldirDataAvailable(const QQmlRefPointer<QQmlQmldirData> &data, QList<QQmlError> *errors)
diff --git a/gnu/packages/patches/qtdeclarative-disable-qmlcache.patch b/gnu/packages/patches/qtdeclarative-disable-qmlcache.patch
new file mode 100644
index 0000000000..5f06ec53b4
--- /dev/null
+++ b/gnu/packages/patches/qtdeclarative-disable-qmlcache.patch
@@ -0,0 +1,16 @@
+Retrieved from
+https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch
+
+diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
+index 852cde9e..165f1b57 100644
+--- a/src/qml/jsruntime/qv4engine.cpp
++++ b/src/qml/jsruntime/qv4engine.cpp
+@@ -2093,7 +2093,7 @@ void ExecutionEngine::registerModule(const QString &_name, const QJSValue &modul
+ 
+ bool ExecutionEngine::diskCacheEnabled() const
+ {
+-    return (!disableDiskCache() && !debugger()) || forceDiskCache();
++    return forceDiskCache();
+ }
+ 
+ void ExecutionEngine::callInContext(QV4::Function *function, QObject *self,
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 59c079934c..a4de003647 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1205,7 +1205,8 @@ (define-public qtdeclarative-5
               (uri (qt-url name version))
               (sha256
                (base32
-                "1kb8nj17vmnky0ayiwypim7kf6rmlmfcjf6gnrw8rydmp61w0vh2"))))
+                "1kb8nj17vmnky0ayiwypim7kf6rmlmfcjf6gnrw8rydmp61w0vh2"))
+              (patches (search-patches "qtdeclarative-5-disable-qmlcache.patch"))))
     (arguments
      (substitute-keyword-arguments (package-arguments qtsvg-5)
        ((#:tests? _ #f) #f)             ;TODO: Enable the tests
@@ -1251,7 +1252,8 @@ (define-public qtdeclarative
               (uri (qt-url name version))
               (sha256
                (base32
-                "1hbw63828pp8vm9b46i2pkcbcpr4mq9nblhmpwrw2pflq0fi24xq"))))
+                "1hbw63828pp8vm9b46i2pkcbcpr4mq9nblhmpwrw2pflq0fi24xq"))
+              (patches (search-patches "qtdeclarative-disable-qmlcache.patch"))))
     (build-system cmake-build-system)
     (arguments
      (list
-- 
2.41.0





This bug report was last modified 1 year and 334 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.