[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
15/72: gnu: qtdeclarative: Disable QML cache to avoid stale cache issues
From: |
guix-commits |
Subject: |
15/72: gnu: qtdeclarative: Disable QML cache to avoid stale cache issues. |
Date: |
Wed, 16 Aug 2023 06:41:07 -0400 (EDT) |
apteryx pushed a commit to branch qt-updates
in repository guix.
commit 5f432f6aa1fc188fc69ac26f13fff03a2b318a5d
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Aug 11 15:26:14 2023 -0400
gnu: qtdeclarative: Disable QML cache to avoid stale cache issues.
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@riseup.net>
---
gnu/local.mk | 2 ++
.../patches/qtdeclarative-5-disable-qmlcache.patch | 16 ++++++++++++++++
.../patches/qtdeclarative-disable-qmlcache.patch | 16 ++++++++++++++++
gnu/packages/qt.scm | 6 ++++--
4 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 1bf33377a4..f10fe292dc 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1732,6 +1732,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 @@ xmlpatternsvalidator.")))
(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 @@ with JavaScript and C++.")))
(uri (qt-url name version))
(sha256
(base32
- "1hbw63828pp8vm9b46i2pkcbcpr4mq9nblhmpwrw2pflq0fi24xq"))))
+ "1hbw63828pp8vm9b46i2pkcbcpr4mq9nblhmpwrw2pflq0fi24xq"))
+ (patches (search-patches
"qtdeclarative-disable-qmlcache.patch"))))
(build-system cmake-build-system)
(arguments
(list
- 09/72: gnu-maintenance: Document nested procedures in 'import-html-release'., (continued)
- 09/72: gnu-maintenance: Document nested procedures in 'import-html-release'., guix-commits, 2023/08/16
- 28/72: gnu: qtmultimedia: Update to 6.5.2., guix-commits, 2023/08/16
- 29/72: gnu: qtwayland: Update to 6.5.2., guix-commits, 2023/08/16
- 33/72: gnu: qttranslations: Update to 6.5.2., guix-commits, 2023/08/16
- 10/72: gnu-maintenance: Extract 'canonicalize-url' from 'import-html-release'., guix-commits, 2023/08/16
- 03/72: gnu: qt: Streamline qt-urls., guix-commits, 2023/08/16
- 04/72: gnu: qt-creator: Use mirror://qt for source URI., guix-commits, 2023/08/16
- 05/72: gnu-maintenance: Fix docstring., guix-commits, 2023/08/16
- 11/72: gnu-maintenance: Add support to rewrite version in URL path., guix-commits, 2023/08/16
- 14/72: gnu: qt: Revert to use individual versions instead of %qt5-version., guix-commits, 2023/08/16
- 15/72: gnu: qtdeclarative: Disable QML cache to avoid stale cache issues.,
guix-commits <=
- 20/72: gnu: qtsvg: Update to 6.5.2., guix-commits, 2023/08/16
- 19/72: gnu: qt5compat: Update to 6.5.2., guix-commits, 2023/08/16
- 21/72: gnu: qtimageformats: Rename variable to qtimageformats-5., guix-commits, 2023/08/16
- 22/72: gnu: qtimageformats-5: Fix indentation., guix-commits, 2023/08/16
- 26/72: gnu: qtwebsockets: Update to 6.5.2., guix-commits, 2023/08/16
- 32/72: gnu: qttools: Update to 6.5.2., guix-commits, 2023/08/16
- 38/72: gnu: Remove qtquickcontrols2., guix-commits, 2023/08/16
- 45/72: gnu: qtxmlpatterns: Update to 5.15.10., guix-commits, 2023/08/16
- 48/72: gnu: qtwebsockets-5: Update to 5.15.10., guix-commits, 2023/08/16
- 70/72: gnu: qtnetworkauth-5: Update to 5.15.10., guix-commits, 2023/08/16