parent
182707d8e3
commit
84ab2447ca
@ -1,46 +0,0 @@
|
|||||||
From 21ce3b1e938c4b96154a7b00a15beef428ffce4e Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= <tim@siosm.fr>
|
|
||||||
Date: Sun, 15 May 2022 15:32:50 +0200
|
|
||||||
Subject: [PATCH] kbuildsycoca: Ignore last modified time when set to UNIX
|
|
||||||
Epoch
|
|
||||||
|
|
||||||
On some systems (i.e. Fedora Kinoite), all files in /usr have a last
|
|
||||||
modified timestamp of 0 (UNIX Epoch). In this case, always assume the
|
|
||||||
file as been changed.
|
|
||||||
|
|
||||||
We only get the current time once to speed up execution as we don't need
|
|
||||||
to be accurate in this case.
|
|
||||||
|
|
||||||
BUG: 442011
|
|
||||||
|
|
||||||
See:
|
|
||||||
- https://bugzilla.redhat.com/show_bug.cgi?id=2021087
|
|
||||||
- https://discussion.fedoraproject.org/t/kinoite-installation-with-utc-timezone-breaks-kde/34293/8
|
|
||||||
---
|
|
||||||
src/sycoca/kbuildsycoca.cpp | 10 +++++++++-
|
|
||||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/sycoca/kbuildsycoca.cpp b/src/sycoca/kbuildsycoca.cpp
|
|
||||||
index 0caeccf..3b0e011 100644
|
|
||||||
--- a/src/sycoca/kbuildsycoca.cpp
|
|
||||||
+++ b/src/sycoca/kbuildsycoca.cpp
|
|
||||||
@@ -607,7 +607,15 @@ static quint32 updateHash(const QString &file, quint32 hash)
|
|
||||||
if (fi.isReadable() && fi.isFile()) {
|
|
||||||
// This was using buff.st_ctime (in Waldo's initial commit to kstandarddirs.cpp in 2001), but that looks wrong?
|
|
||||||
// Surely we want to catch manual editing, while a chmod doesn't matter much?
|
|
||||||
- hash += fi.lastModified().toSecsSinceEpoch();
|
|
||||||
+ qint64 timestamp = fi.lastModified().toSecsSinceEpoch();
|
|
||||||
+ // On some systems (i.e. Fedora Kinoite), all files in /usr have a last
|
|
||||||
+ // modified timestamp of 0 (UNIX Epoch). In this case, always assume
|
|
||||||
+ // the file as been changed.
|
|
||||||
+ if (timestamp == 0) {
|
|
||||||
+ static qint64 now = QDateTime::currentDateTimeUtc().toSecsSinceEpoch();
|
|
||||||
+ timestamp = now;
|
|
||||||
+ }
|
|
||||||
+ hash += timestamp;
|
|
||||||
}
|
|
||||||
return hash;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.36.1
|
|
||||||
|
|
@ -1 +1 @@
|
|||||||
SHA512 (kservice-5.94.0.tar.xz) = d8c93e14821bc103a375e86f99fdf19f966596f7acb37eb5209ac0fbef045b5e56e3c725bfada4b47d00ea8119a00de3e8f246fcb4cb7b390578f48945ae1e15
|
SHA512 (kservice-5.96.0.tar.xz) = ff8f0932574de555626944954a1b7d3bc6fd23fbce03ec8749d6f0242f5e75406c16687c3b6bb9d1cb747dd17aa4c3560164e8dec78de5c6075f532e6ad2e609
|
||||||
|
Loading…
Reference in new issue