diff options
| author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-08-11 15:26:14 -0400 |
|---|---|---|
| committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-08-22 12:32:20 -0400 |
| commit | 1717c8a233b7fda3a10aabc061168c71317f883e (patch) | |
| tree | 421fa5e5e0458f0d67beaa89d83280eb814523b2 | |
| parent | 41e62900d73c828200e01ca0df7190b0a5f8d122 (diff) | |
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>
| -rw-r--r-- | gnu/local.mk | 2 | ||||
| -rw-r--r-- | gnu/packages/patches/qtdeclarative-5-disable-qmlcache.patch | 16 | ||||
| -rw-r--r-- | gnu/packages/patches/qtdeclarative-disable-qmlcache.patch | 16 | ||||
| -rw-r--r-- | gnu/packages/qt.scm | 6 |
4 files changed, 38 insertions, 2 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 011ababfb75..6e2f70cdaa8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -1733,6 +1733,8 @@ dist_patch_DATA = \ | |||
| 1733 | %D%/packages/patches/python-typeguard-python3.10.patch \ | 1733 | %D%/packages/patches/python-typeguard-python3.10.patch \ |
| 1734 | %D%/packages/patches/python-w3lib-fix-test-failure.patch \ | 1734 | %D%/packages/patches/python-w3lib-fix-test-failure.patch \ |
| 1735 | %D%/packages/patches/python-wxwidgets-type-errors.patch \ | 1735 | %D%/packages/patches/python-wxwidgets-type-errors.patch \ |
| 1736 | %D%/packages/patches/qtdeclarative-5-disable-qmlcache.patch \ | ||
| 1737 | %D%/packages/patches/qtdeclarative-disable-qmlcache.patch \ | ||
| 1736 | %D%/packages/patches/quodlibet-fix-invalid-glob.patch \ | 1738 | %D%/packages/patches/quodlibet-fix-invalid-glob.patch \ |
| 1737 | %D%/packages/patches/quodlibet-fix-mtime-tests.patch \ | 1739 | %D%/packages/patches/quodlibet-fix-mtime-tests.patch \ |
| 1738 | %D%/packages/patches/qxlsx-fix-include-directory.patch \ | 1740 | %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 00000000000..2f1cf0dd4ed --- /dev/null +++ b/gnu/packages/patches/qtdeclarative-5-disable-qmlcache.patch | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | Retrieved from | ||
| 2 | https://github.com/NixOS/nixpkgs/raw/master/pkgs/development/libraries/qt-5/5.15/qtdeclarative-default-disable-qmlcache.patch | ||
| 3 | |||
| 4 | diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp | ||
| 5 | index 1d66e75..827567a 100644 | ||
| 6 | --- a/src/qml/qml/qqmltypeloader.cpp | ||
| 7 | +++ b/src/qml/qml/qqmltypeloader.cpp | ||
| 8 | @@ -727,7 +727,7 @@ bool QQmlTypeLoader::Blob::isDebugging() const | ||
| 9 | |||
| 10 | bool QQmlTypeLoader::Blob::diskCacheEnabled() const | ||
| 11 | { | ||
| 12 | - return (!disableDiskCache() && !isDebugging()) || forceDiskCache(); | ||
| 13 | + return forceDiskCache(); | ||
| 14 | } | ||
| 15 | |||
| 16 | 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 00000000000..5f06ec53b48 --- /dev/null +++ b/gnu/packages/patches/qtdeclarative-disable-qmlcache.patch | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | Retrieved from | ||
| 2 | https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch | ||
| 3 | |||
| 4 | diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp | ||
| 5 | index 852cde9e..165f1b57 100644 | ||
| 6 | --- a/src/qml/jsruntime/qv4engine.cpp | ||
| 7 | +++ b/src/qml/jsruntime/qv4engine.cpp | ||
| 8 | @@ -2093,7 +2093,7 @@ void ExecutionEngine::registerModule(const QString &_name, const QJSValue &modul | ||
| 9 | |||
| 10 | bool ExecutionEngine::diskCacheEnabled() const | ||
| 11 | { | ||
| 12 | - return (!disableDiskCache() && !debugger()) || forceDiskCache(); | ||
| 13 | + return forceDiskCache(); | ||
| 14 | } | ||
| 15 | |||
| 16 | void ExecutionEngine::callInContext(QV4::Function *function, QObject *self, | ||
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 9708cd64869..e98957ccbab 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm | |||
| @@ -1231,7 +1231,8 @@ xmlpatternsvalidator."))) | |||
| 1231 | (uri (qt-url name version)) | 1231 | (uri (qt-url name version)) |
| 1232 | (sha256 | 1232 | (sha256 |
| 1233 | (base32 | 1233 | (base32 |
| 1234 | "1kb8nj17vmnky0ayiwypim7kf6rmlmfcjf6gnrw8rydmp61w0vh2")))) | 1234 | "1kb8nj17vmnky0ayiwypim7kf6rmlmfcjf6gnrw8rydmp61w0vh2")) |
| 1235 | (patches (search-patches "qtdeclarative-5-disable-qmlcache.patch")))) | ||
| 1235 | (arguments | 1236 | (arguments |
| 1236 | (substitute-keyword-arguments (package-arguments qtsvg-5) | 1237 | (substitute-keyword-arguments (package-arguments qtsvg-5) |
| 1237 | ((#:tests? _ #f) #f) ;TODO: Enable the tests | 1238 | ((#:tests? _ #f) #f) ;TODO: Enable the tests |
| @@ -1277,7 +1278,8 @@ with JavaScript and C++."))) | |||
| 1277 | (uri (qt-url name version)) | 1278 | (uri (qt-url name version)) |
| 1278 | (sha256 | 1279 | (sha256 |
| 1279 | (base32 | 1280 | (base32 |
| 1280 | "1hbw63828pp8vm9b46i2pkcbcpr4mq9nblhmpwrw2pflq0fi24xq")))) | 1281 | "1hbw63828pp8vm9b46i2pkcbcpr4mq9nblhmpwrw2pflq0fi24xq")) |
| 1282 | (patches (search-patches "qtdeclarative-disable-qmlcache.patch")))) | ||
| 1281 | (build-system cmake-build-system) | 1283 | (build-system cmake-build-system) |
| 1282 | (arguments | 1284 | (arguments |
| 1283 | (list | 1285 | (list |
