Hello community,

here is the log from the commit of package kservice for openSUSE:Factory 
checked in at 2020-12-15 12:29:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kservice (Old)
 and      /work/SRC/openSUSE:Factory/.kservice.new.2328 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kservice"

Tue Dec 15 12:29:27 2020 rev:90 rq:855459 version:5.77.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kservice/kservice.changes        2020-11-23 
10:33:02.997529620 +0100
+++ /work/SRC/openSUSE:Factory/.kservice.new.2328/kservice.changes      
2020-12-15 12:31:41.992063901 +0100
@@ -1,0 +2,16 @@
+Mon Dec  7 17:14:41 UTC 2020 - Christophe Giboudeaux <[email protected]>
+
+- Update to 5.77.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/kde-frameworks-5.77.0
+- Changes since 5.76.0:
+  * [kapplicationtrader] Fix API docs
+  * KSycoca: recreate DB when version < expected version
+  * KSycoca: Keep track of resources Files of KMimeAssociation
+  * KSycoca: ensure extrafiles are ordered for comparison
+  * KSycoca: avoid database rebuild if XDG_CONFIG_DIRS contains
+    duplicates
+  * Fix duplicate detection check
+
+-------------------------------------------------------------------

Old:
----
  kservice-5.76.0.tar.xz
  kservice-5.76.0.tar.xz.sig

New:
----
  kservice-5.77.0.tar.xz
  kservice-5.77.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kservice.spec ++++++
--- /var/tmp/diff_new_pack.zViRuM/_old  2020-12-15 12:31:42.824064571 +0100
+++ /var/tmp/diff_new_pack.zViRuM/_new  2020-12-15 12:31:42.828064574 +0100
@@ -16,14 +16,14 @@
 #
 
 
-%define _tar_path 5.76
+%define _tar_path 5.77
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
 %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
 %bcond_without lang
 Name:           kservice
-Version:        5.76.0
+Version:        5.77.0
 Release:        0
 Summary:        Plugin framework for desktop services
 License:        LGPL-2.1-or-later
@@ -50,10 +50,10 @@
 BuildRequires:  cmake(KF5DBusAddons) >= %{_kf5_bugfix_version}
 BuildRequires:  cmake(KF5DocTools) >= %{_kf5_bugfix_version}
 BuildRequires:  cmake(KF5I18n) >= %{_kf5_bugfix_version}
-BuildRequires:  cmake(Qt5Concurrent) >= 5.12.0
-BuildRequires:  cmake(Qt5DBus) >= 5.12.0
-BuildRequires:  cmake(Qt5Test) >= 5.12.0
-BuildRequires:  cmake(Qt5Xml) >= 5.12.0
+BuildRequires:  cmake(Qt5Concurrent) >= 5.13.0
+BuildRequires:  cmake(Qt5DBus) >= 5.13.0
+BuildRequires:  cmake(Qt5Test) >= 5.13.0
+BuildRequires:  cmake(Qt5Xml) >= 5.13.0
 Recommends:     kded >= %{_kf5_bugfix_version}
 Obsoletes:      libKF5Service4
 %if %{with lang}


++++++ kservice-5.76.0.tar.xz -> kservice-5.77.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kservice-5.76.0/CMakeLists.txt 
new/kservice-5.77.0/CMakeLists.txt
--- old/kservice-5.76.0/CMakeLists.txt  2020-11-07 13:16:17.000000000 +0100
+++ new/kservice-5.77.0/CMakeLists.txt  2020-12-10 20:54:56.000000000 +0100
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 3.5)
 
-set(KF5_VERSION "5.76.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.76.0") # handled by release scripts
+set(KF5_VERSION "5.77.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.77.0") # handled by release scripts
 project(KService VERSION ${KF5_VERSION})
 
 # Disallow in-source build
@@ -11,7 +11,7 @@
 
 # ECM setup
 include(FeatureSummary)
-find_package(ECM 5.76.0  NO_MODULE)
+find_package(ECM 5.77.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL "https://commits.kde.org/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
@@ -41,7 +41,7 @@
     CACHE STRING "Name to install the applications.menu file as.")
 
 # Dependencies
-set(REQUIRED_QT_VERSION 5.12.0)
+set(REQUIRED_QT_VERSION 5.13.0)
 find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Xml)
 if (NOT ANDROID)
   find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED DBus)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kservice-5.76.0/autotests/ksycocatest.cpp 
new/kservice-5.77.0/autotests/ksycocatest.cpp
--- old/kservice-5.76.0/autotests/ksycocatest.cpp       2020-11-07 
13:16:17.000000000 +0100
+++ new/kservice-5.77.0/autotests/ksycocatest.cpp       2020-12-10 
20:54:56.000000000 +0100
@@ -80,6 +80,7 @@
     void testAllResourceDirs();
     void testDeletingSycoca();
     void testNonReadableSycoca();
+    void extraFileInFutureShouldRebuildSycocaOnce();
 
 private:
     void createGlobalServiceType()
@@ -94,6 +95,7 @@
     }
     QString servicesDir() const { return 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
"/kservices5"; }
     QString serviceTypesDir() const { return 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
"/kservicetypes5"; }
+    QString extraFile() const { return 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
"/mimeapps.list"; }
     QString menusDir() const { return 
QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + 
"/menus"; }
     QString appsDir() const { return 
QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation) + 
QLatin1Char('/'); }
 
@@ -302,4 +304,34 @@
     QFile::remove(KSycoca::absoluteFilePath());
 }
 
+void KSycocaTest::extraFileInFutureShouldRebuildSycocaOnce()
+{
+    const QDateTime oldTimestamp = 
QFileInfo(KSycoca::absoluteFilePath()).lastModified();
+
+    auto path = extraFile();
+    QFile f(path);
+    QVERIFY(f.open(QIODevice::WriteOnly));
+    auto beginning = f.fileTime(QFileDevice::FileModificationTime);
+    auto newdate = beginning.addSecs(60);
+    qDebug() << "Time changed for " << newdate << path;
+    QVERIFY(f.setFileTime(newdate, QFileDevice::FileModificationTime));
+
+    ksycoca_ms_between_checks = 0;
+
+    QTest::qWait(s_waitDelay);
+
+    KSycoca::self()->ensureCacheValid();
+    const QDateTime newTimestamp = 
QFileInfo(KSycoca::absoluteFilePath()).lastModified();
+    QVERIFY(newTimestamp > oldTimestamp);
+
+    QTest::qWait(s_waitDelay);
+
+    KSycoca::self()->ensureCacheValid();
+    const QDateTime againTimestamp = 
QFileInfo(KSycoca::absoluteFilePath()).lastModified();
+    QCOMPARE(againTimestamp, newTimestamp); // same mtime, it didn't get 
rebuilt
+
+    // Ensure we don't pollute the other tests, with our extra file in the 
future.
+    QVERIFY(QFile::remove(path));
+}
+
 #include "ksycocatest.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kservice-5.76.0/po/ml/kservice5.po 
new/kservice-5.77.0/po/ml/kservice5.po
--- old/kservice-5.76.0/po/ml/kservice5.po      2020-11-07 13:16:17.000000000 
+0100
+++ new/kservice-5.77.0/po/ml/kservice5.po      2020-12-10 20:54:56.000000000 
+0100
@@ -20,8 +20,6 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Weblate 3.9.1\n"
-"X-Poedit-Country: INDIA\n"
 
 #, kde-format
 msgctxt "NAME OF TRANSLATORS"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kservice-5.76.0/po/vi/kservice5.po 
new/kservice-5.77.0/po/vi/kservice5.po
--- old/kservice-5.76.0/po/vi/kservice5.po      2020-11-07 13:16:17.000000000 
+0100
+++ new/kservice-5.77.0/po/vi/kservice5.po      2020-12-10 20:54:56.000000000 
+0100
@@ -10,7 +10,7 @@
 "Project-Id-Version: kdelibs4\n"
 "Report-Msgid-Bugs-To: https://bugs.kde.org\n";
 "POT-Creation-Date: 2020-10-24 02:12+0200\n"
-"PO-Revision-Date: 2020-10-11 22:25+0200\n"
+"PO-Revision-Date: 2020-12-04 13:35+0100\n"
 "Last-Translator: Phu Hung Nguyen <[email protected]>\n"
 "Language-Team: Vietnamese <[email protected]>\n"
 "Language: vi\n"
@@ -18,7 +18,7 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Lokalize 19.12.2\n"
+"X-Generator: Lokalize 20.08.1\n"
 
 #, kde-format
 msgctxt "NAME OF TRANSLATORS"
@@ -42,7 +42,7 @@
 #, kde-format
 msgctxt "application description"
 msgid "Rebuilds the system configuration cache."
-msgstr "Xây lại bộ nhớ đệm cấu hình hệ thống."
+msgstr "Xây lại bộ nhớ sẵn cấu hình hệ thống."
 
 #: kbuildsycoca/kbuildsycoca_main.cpp:51
 #, kde-format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kservice-5.76.0/po/zh_CN/kservice5.po 
new/kservice-5.77.0/po/zh_CN/kservice5.po
--- old/kservice-5.76.0/po/zh_CN/kservice5.po   2020-11-07 13:16:17.000000000 
+0100
+++ new/kservice-5.77.0/po/zh_CN/kservice5.po   2020-12-10 20:54:56.000000000 
+0100
@@ -16,7 +16,7 @@
 "Project-Id-Version: kdeorg\n"
 "Report-Msgid-Bugs-To: https://bugs.kde.org\n";
 "POT-Creation-Date: 2020-10-24 02:12+0200\n"
-"PO-Revision-Date: 2020-10-08 19:21\n"
+"PO-Revision-Date: 2020-11-10 15:01\n"
 "Last-Translator: \n"
 "Language-Team: Chinese Simplified\n"
 "Language: zh_CN\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kservice-5.76.0/src/services/kapplicationtrader.h 
new/kservice-5.77.0/src/services/kapplicationtrader.h
--- old/kservice-5.76.0/src/services/kapplicationtrader.h       2020-11-07 
13:16:17.000000000 +0100
+++ new/kservice-5.77.0/src/services/kapplicationtrader.h       2020-12-10 
20:54:56.000000000 +0100
@@ -39,7 +39,7 @@
     using FilterFunc = std::function<bool(const KService::Ptr &)>;
 
     /**
-     * This method returns a list of services (applications) which are 
associated with a given MIME type.
+     * This method returns a list of services (applications) that match a 
given filter.
      *
      * @param filter a callback function that returns @c true if the 
application
      * should be selected and @c false if it should be skipped.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kservice-5.76.0/src/sycoca/kbuildsycoca.cpp 
new/kservice-5.77.0/src/sycoca/kbuildsycoca.cpp
--- old/kservice-5.76.0/src/sycoca/kbuildsycoca.cpp     2020-11-07 
13:16:17.000000000 +0100
+++ new/kservice-5.77.0/src/sycoca/kbuildsycoca.cpp     2020-12-10 
20:54:56.000000000 +0100
@@ -175,6 +175,11 @@
         m_allResourceDirs.insert(dir, stamp);
     }
 
+    const auto lstFiles = factoryExtraFiles();
+    for (const QString &file : lstFiles) {
+        m_extraFiles.insert(file, 
QFileInfo(file).lastModified().toMSecsSinceEpoch());
+    }
+
     QMap<QString, QByteArray> allResourcesSubDirs; // dirs, 
kstandarddirs-resource-name
     // For each factory
     for (KSycocaFactory* factory : factoryList) {
@@ -508,6 +513,10 @@
     for (auto it = m_allResourceDirs.constBegin(); it != 
m_allResourceDirs.constEnd(); ++it) {
         (*str) << it.value();
     }
+    (*str) << m_extraFiles.keys();
+    for (auto it = m_extraFiles.constBegin(); it != m_extraFiles.constEnd(); 
++it) {
+        (*str) << it.value();
+    }
 
     // Calculate per-servicetype/MIME type data
     if (serviceFactory) serviceFactory->postProcessServices();
@@ -560,6 +569,16 @@
     return *dirs;
 }
 
+QStringList KBuildSycoca::factoryExtraFiles()
+{
+    QStringList files;
+    // these are the extra files cached by ksycoca
+    // and whose timestamps are checked
+    files += KMimeAssociations::mimeAppsFiles();
+
+    return files;
+}
+
 QStringList KBuildSycoca::existingResourceDirs()
 {
     static QStringList *dirs = nullptr;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kservice-5.76.0/src/sycoca/kbuildsycoca_p.h 
new/kservice-5.77.0/src/sycoca/kbuildsycoca_p.h
--- old/kservice-5.76.0/src/sycoca/kbuildsycoca_p.h     2020-11-07 
13:16:17.000000000 +0100
+++ new/kservice-5.77.0/src/sycoca/kbuildsycoca_p.h     2020-12-10 
20:54:56.000000000 +0100
@@ -48,6 +48,7 @@
     }
 
     static QStringList factoryResourceDirs();
+    static QStringList factoryExtraFiles();
     static QStringList existingResourceDirs();
 
     /**
@@ -112,6 +113,7 @@
     }
 
     QMap<QString, qint64> m_allResourceDirs; // dir, mtime in ms since epoch
+    QMap<QString, qint64> m_extraFiles; // file, mtime in ms since epoch
     QString m_trackId;
 
     QByteArray m_resource; // e.g. "services" (old resource name, now only 
used for the signal, see kctimefactory.cpp)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kservice-5.76.0/src/sycoca/kmimeassociations.cpp 
new/kservice-5.77.0/src/sycoca/kmimeassociations.cpp
--- old/kservice-5.76.0/src/sycoca/kmimeassociations.cpp        2020-11-07 
13:16:17.000000000 +0100
+++ new/kservice-5.77.0/src/sycoca/kmimeassociations.cpp        2020-12-10 
20:54:56.000000000 +0100
@@ -38,7 +38,7 @@
 text/plain=kate.desktop;
 */
 
-void KMimeAssociations::parseAllMimeAppsList()
+QStringList KMimeAssociations::mimeAppsFiles()
 {
     QStringList mimeappsFileNames;
     // make the list of possible filenames from the spec 
($desktop-mimeapps.list, then mimeapps.list)
@@ -52,22 +52,31 @@
         mimeappsFileNames.append(desktop.toLower() + 
QLatin1String("-mimeapps.list"));
     }
     mimeappsFileNames.append(QStringLiteral("mimeapps.list"));
-    // list the dirs in the order of the spec (XDG_CONFIG_HOME, 
XDG_CONFIG_DIRS, XDG_DATA_HOME, XDG_DATA_DIRS)
-    const QStringList mimeappsDirs = 
QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation)
-                                    + 
QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation);
+    const QStringList mimeappsDirs = mimeAppsDirs();
     QStringList mimeappsFiles;
     // collect existing files
     for (const QString &dir : mimeappsDirs) {
         for (const QString &file : qAsConst(mimeappsFileNames)) {
             const QString filePath = dir + QLatin1Char('/') + file;
-            if (QFile::exists(filePath)) {
+            if (QFile::exists(filePath) && !mimeappsFiles.contains(filePath)) {
                 mimeappsFiles.append(filePath);
             }
         }
     }
-    //qDebug() << "FILE LIST:" << mimeappsFiles;
+    return mimeappsFiles;
+}
 
+QStringList KMimeAssociations::mimeAppsDirs()
+{
+    // list the dirs in the order of the spec (XDG_CONFIG_HOME, 
XDG_CONFIG_DIRS, XDG_DATA_HOME, XDG_DATA_DIRS)
+    return 
QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation)
+            + 
QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation);
+}
+
+void KMimeAssociations::parseAllMimeAppsList()
+{
     int basePreference = 1000; // start high :)
+    const QStringList mimeappsFiles = KMimeAssociations::mimeAppsFiles();
     QListIterator<QString> mimeappsIter(mimeappsFiles);
     mimeappsIter.toBack();
     while (mimeappsIter.hasPrevious()) { // global first, then local.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kservice-5.76.0/src/sycoca/kmimeassociations_p.h 
new/kservice-5.77.0/src/sycoca/kmimeassociations_p.h
--- old/kservice-5.76.0/src/sycoca/kmimeassociations_p.h        2020-11-07 
13:16:17.000000000 +0100
+++ new/kservice-5.77.0/src/sycoca/kmimeassociations_p.h        2020-12-10 
20:54:56.000000000 +0100
@@ -54,12 +54,16 @@
 public:
     explicit KMimeAssociations(KOfferHash &offerHash, KServiceFactory 
*serviceFactory);
 
+    static QStringList mimeAppsFiles();
+
     // Read mimeapps.list files
     void parseAllMimeAppsList();
 
     void parseMimeAppsList(const QString &file, int basePreference);
 
 private:
+    static QStringList mimeAppsDirs();
+
     void parseAddedAssociations(const KConfigGroup &group, const QString 
&file, int basePreference);
     void parseRemovedAssociations(const KConfigGroup &group, const QString 
&file);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kservice-5.76.0/src/sycoca/ksycoca.cpp 
new/kservice-5.77.0/src/sycoca/ksycoca.cpp
--- old/kservice-5.76.0/src/sycoca/ksycoca.cpp  2020-11-07 13:16:17.000000000 
+0100
+++ new/kservice-5.77.0/src/sycoca/ksycoca.cpp  2020-12-10 20:54:56.000000000 
+0100
@@ -49,7 +49,7 @@
  * However running apps should still be able to read it, so
  * only add to the data, never remove/modify.
  */
-#define KSYCOCA_VERSION 303
+#define KSYCOCA_VERSION 304
 
 #if HAVE_MADVISE || HAVE_MMAP
 #include <sys/mman.h> // This #include was checked when looking for 
posix_madvise
@@ -230,7 +230,7 @@
     if (!m_databasePath.isEmpty()) {
         qCDebug(SYCOCA) << "Opening ksycoca from" << m_databasePath;
         m_dbLastModified = QFileInfo(m_databasePath).lastModified();
-        checkVersion();
+        result = checkVersion();
     } else { // No database file
         //qCDebug(SYCOCA) << "Could not open ksycoca";
         result = false;
@@ -557,6 +557,15 @@
         allResourceDirs.insert(directoryList.at(i), mtime);
     }
 
+    QStringList fileList;
+    *str >> fileList;
+    extraFiles.clear();
+    for (auto fileName : fileList) {
+        qint64 mtime;
+        *str >> mtime;
+        extraFiles.insert(fileName, mtime);
+    }
+
     str->device()->seek(oldPos);
 
     timeStamp = header.timeStamp;
@@ -579,7 +588,7 @@
     // Check times of last modification of all directories on which ksycoca 
depends,
     // If none of them is newer than the mtime we stored for that directory at 
the
     // last rebuild, this means that there's no need to rebuild ksycoca.
-    bool checkTimestamps(const QMap<QString, qint64> &dirs)
+    bool checkDirectoriesTimestamps(const QMap<QString, qint64> &dirs)
     {
         Q_ASSERT(!dirs.isEmpty());
         //qCDebug(SYCOCA) << "checking file timestamps";
@@ -593,7 +602,7 @@
                     if (mtime > m_now) {
                         qCDebug(SYCOCA) << fi.filePath() << "has a 
modification time in the future" << mtime;
                     }
-                    qCDebug(SYCOCA) << "timestamp changed:" << fi.filePath() 
<< mtime << ">" << QDateTime::fromMSecsSinceEpoch(lastStamp);
+                    qCDebug(SYCOCA) << "dir timestamp changed:" << 
fi.filePath() << mtime << ">" << QDateTime::fromMSecsSinceEpoch(lastStamp);
                     // no need to continue search
                     return false;
                 }
@@ -608,6 +617,28 @@
         return true;
     }
 
+    bool checkFilesTimestamps(const QMap<QString, qint64> &files)
+    {
+        for (auto it = files.begin(); it != files.end(); ++it) {
+            const QString fileName = it.key();
+            const qint64 lastStamp = it.value();
+
+            QFileInfo fi(fileName);
+            if (!fi.exists()) {
+                return false;
+            }
+            const QDateTime mtime = fi.lastModified();
+            if (mtime.toMSecsSinceEpoch() > lastStamp) {
+                if (mtime > m_now) {
+                    qCDebug(SYCOCA) << fi.filePath() << "has a modification 
time in the future" << mtime;
+                }
+                qCDebug(SYCOCA) << "file timestamp changed:" << fi.filePath() 
<< mtime << ">" << QDateTime::fromMSecsSinceEpoch(lastStamp);
+                return false;
+            }
+        }
+        return true;
+    }
+
 private:
     QDateTime m_now;
 };
@@ -626,7 +657,18 @@
     }
     // these days timeStamp is really a "bool headerFound", the value itself 
doesn't matter...
     // KF6: replace it with bool.
-    return timeStamp != 0 && 
!TimestampChecker().checkTimestamps(allResourceDirs);
+    bool ret = timeStamp != 0 &&
+            (!TimestampChecker().checkDirectoriesTimestamps(allResourceDirs)
+            ||
+            !TimestampChecker().checkFilesTimestamps(extraFiles));
+    if (ret) {
+        return true;
+    }
+    auto files = KBuildSycoca::factoryExtraFiles();
+    // ensure files are ordered so next comparison works
+    files.sort();
+    // to cover cases when extra files were added
+    return extraFiles.keys() != files;
 }
 
 bool KSycocaPrivate::buildSycoca()
@@ -641,11 +683,7 @@
     // Ok, the new database should be here now, open it.
     if (!openDatabase()) {
         qCDebug(SYCOCA) << "Still no database...";
-        return false; // Still no database - uh oh
-    }
-    if (!checkVersion()) {
-        qCDebug(SYCOCA) << "Still outdated...";
-        return false; // Still outdated - uh oh
+        return false;
     }
     return true;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kservice-5.76.0/src/sycoca/ksycoca_p.h 
new/kservice-5.77.0/src/sycoca/ksycoca_p.h
--- old/kservice-5.76.0/src/sycoca/ksycoca_p.h  2020-11-07 13:16:17.000000000 
+0100
+++ new/kservice-5.77.0/src/sycoca/ksycoca_p.h  2020-12-10 20:54:56.000000000 
+0100
@@ -107,6 +107,7 @@
     QString language;
     quint32 updateSig;
     QMap<QString, qint64> allResourceDirs; // path, modification time in "ms 
since epoch"
+    QMap<QString, qint64> extraFiles; // path, modification time in "ms since 
epoch"
 
     void addFactory(KSycocaFactory *factory)
     {
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/[email protected]

Reply via email to