Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kf6-ksvg for openSUSE:Factory checked in at 2024-08-10 19:06:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kf6-ksvg (Old) and /work/SRC/openSUSE:Factory/.kf6-ksvg.new.7232 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kf6-ksvg" Sat Aug 10 19:06:48 2024 rev:8 rq:1192899 version:6.5.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kf6-ksvg/kf6-ksvg.changes 2024-07-14 08:53:30.747054839 +0200 +++ /work/SRC/openSUSE:Factory/.kf6-ksvg.new.7232/kf6-ksvg.changes 2024-08-10 19:10:54.341519077 +0200 @@ -1,0 +2,13 @@ +Mon Aug 5 10:47:53 UTC 2024 - Christophe Marin <christo...@krop.fr> + +- Update to 6.5.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/6/6.5.0 +- Changes since 6.4.0: + * Update dependency version to 6.5.0 + * findInCache: Compare last modified to boot time if timestamp is 0 (kde#453876) + * Update version to 6.5.0 + * Drop dead code + +------------------------------------------------------------------- Old: ---- ksvg-6.4.0.tar.xz ksvg-6.4.0.tar.xz.sig New: ---- ksvg-6.5.0.tar.xz ksvg-6.5.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kf6-ksvg.spec ++++++ --- /var/tmp/diff_new_pack.gz5Sgn/_old 2024-08-10 19:10:54.833539509 +0200 +++ /var/tmp/diff_new_pack.gz5Sgn/_new 2024-08-10 19:10:54.837539676 +0200 @@ -19,13 +19,13 @@ %define qt6_version 6.6.0 %define rname ksvg -# Full KF6 version (e.g. 6.4.0) +# Full KF6 version (e.g. 6.5.0) %{!?_kf6_version: %global _kf6_version %{version}} # Last major and minor KF6 version (e.g. 6.0) %{!?_kf6_bugfix_version: %define _kf6_bugfix_version %(echo %{_kf6_version} | awk -F. '{print $1"."$2}')} %bcond_without released Name: kf6-ksvg -Version: 6.4.0 +Version: 6.5.0 Release: 0 Summary: Components for handling SVGs License: GPL-2.0-or-later ++++++ ksvg-6.4.0.tar.xz -> ksvg-6.5.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksvg-6.4.0/CMakeLists.txt new/ksvg-6.5.0/CMakeLists.txt --- old/ksvg-6.4.0/CMakeLists.txt 2024-07-05 22:09:01.000000000 +0200 +++ new/ksvg-6.5.0/CMakeLists.txt 2024-08-02 13:15:37.000000000 +0200 @@ -1,12 +1,12 @@ cmake_minimum_required(VERSION 3.16) -set(KF_VERSION "6.4.0") # handled by release scripts -set(KF_DEP_VERSION "6.4.0") # handled by release scripts +set(KF_VERSION "6.5.0") # handled by release scripts +set(KF_DEP_VERSION "6.5.0") # handled by release scripts project(KSvg VERSION ${KF_VERSION}) # ECM setup include(FeatureSummary) -find_package(ECM 6.4.0 NO_MODULE) +find_package(ECM 6.5.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) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksvg-6.4.0/autotests/CMakeLists.txt new/ksvg-6.5.0/autotests/CMakeLists.txt --- old/ksvg-6.4.0/autotests/CMakeLists.txt 2024-07-05 22:09:01.000000000 +0200 +++ new/ksvg-6.5.0/autotests/CMakeLists.txt 2024-08-02 13:15:37.000000000 +0200 @@ -7,12 +7,6 @@ include(ECMMarkAsTest) include(ECMAddTests) -# add_definitions( -DKDESRCDIR=${CMAKE_CURRENT_SOURCE_DIR} ) - -if(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION) - set(KSVG_NO_PACKAGE_EXTRADATA TRUE) -endif() - MACRO(KSVG_UNIT_TESTS) FOREACH(_testname ${ARGN}) set(libs Qt6::Qml Qt6::Test KF6::Svg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksvg-6.4.0/src/ksvg/private/imageset_p.cpp new/ksvg-6.5.0/src/ksvg/private/imageset_p.cpp --- old/ksvg-6.4.0/src/ksvg/private/imageset_p.cpp 2024-07-05 22:09:01.000000000 +0200 +++ new/ksvg-6.5.0/src/ksvg/private/imageset_p.cpp 2024-08-02 13:15:37.000000000 +0200 @@ -23,6 +23,10 @@ #include <KSharedConfig> #include <kpluginmetadata.h> +#if defined(Q_OS_LINUX) +#include <sys/sysinfo.h> +#endif + #define DEFAULT_CACHE_SIZE 16384 // value is from the old kconfigxt default value namespace KSvg @@ -117,6 +121,18 @@ QObject::connect(updateNotificationTimer, &QTimer::timeout, this, &ImageSetPrivate::notifyOfChanged); QCoreApplication::instance()->installEventFilter(this); + + #if defined(Q_OS_LINUX) + struct sysinfo x; + if (sysinfo(&x) == 0) { + bootTime = QDateTime::currentSecsSinceEpoch() - x.uptime; + qCDebug(LOG_KSVG) << "ImageSetPrivate: Using boot time value" << bootTime; + } else { + // Should never happen, but just in case, fallback to a sane value + bootTime = QDateTime::currentSecsSinceEpoch(); + qCWarning(LOG_KSVG) << "ImageSetPrivate: Failed to get uptime from sysinfo. Using current time as boot time" << bootTime; + } + #endif } ImageSetPrivate::~ImageSetPrivate() @@ -591,19 +607,30 @@ bool ImageSetPrivate::findInCache(const QString &key, QPixmap &pix, unsigned int lastModified) { - if (lastModified == 0) { - qCWarning(LOG_KSVG) << "findInCache with a lastModified timestamp of 0 is deprecated"; + if (!useCache()) { return false; } - if (!useCache()) { + qint64 cacheLastModifiedTime = uint(pixmapCache->lastModifiedTime().toSecsSinceEpoch()); + if (lastModified > cacheLastModifiedTime) { + qCDebug(LOG_KSVG) << "ImageSetPrivate::findInCache: lastModified > cacheLastModifiedTime for" << key; return false; } - - if (lastModified > uint(pixmapCache->lastModifiedTime().toSecsSinceEpoch())) { + #if defined(Q_OS_LINUX) + // If the timestamp is the UNIX epoch (0) then we compare against the boot time instead. + // This is notably the case on ostree based systems such as Fedora Kinoite. + if (lastModified == 0 && bootTime > cacheLastModifiedTime) { + qCDebug(LOG_KSVG) << "ImageSetPrivate::findInCache: lastModified == 0 && bootTime > cacheLastModifiedTime for" << key; + return false; + } + #else + if (lastModified == 0) { + qCWarning(LOG_KSVG) << "findInCache with a lastModified timestamp of 0 is deprecated"; return false; } + #endif + qCDebug(LOG_KSVG) << "ImageSetPrivate::findInCache: using cache for" << key; const QString id = keysToCache.value(key); const auto it = pixmapsToCache.constFind(id); if (it != pixmapsToCache.constEnd()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ksvg-6.4.0/src/ksvg/private/imageset_p.h new/ksvg-6.5.0/src/ksvg/private/imageset_p.h --- old/ksvg-6.4.0/src/ksvg/private/imageset_p.h 2024-07-05 22:09:01.000000000 +0200 +++ new/ksvg-6.5.0/src/ksvg/private/imageset_p.h 2024-08-02 13:15:37.000000000 +0200 @@ -52,18 +52,24 @@ const QString svgStyleSheet(KSvg::Svg *svg); /** + * Check if a pixmap already exists in the cache and compare the last modified + * timestamp of the file with the last modified date of the one in the cache to make sure + * the cache is still valid. + * + * On Linux systems only, if lastModified is not provided or set to 0, then this function + * uses the boot time as a reference instead. This is notably the case on ostree based + * systems such as Fedora Kinoite. + * * TODO: timestamp shouldn't be user-provided - * Check with file timestamp - * where cache is still valid. * * @param key the name to use in the cache for this image * @param pix the pixmap object to populate with the resulting data if found - * @param lastModified if non-zero, the time stamp is also checked on the file, - * and must be newer than the timestamp to be loaded + * @param lastModified the timestamp of the file which will be compared with the last + * modified time of the entry in the cache * - * @note Since KF 5.75, a lastModified value of 0 is deprecated. If used, it - * will now always return false. Use a proper file timestamp instead - * so modification can be properly tracked. + * @note Since KF 5.75, a lastModified value of 0 is deprecated on non-Linux systems. If + * used, it will now always return false. Use a proper file timestamp instead + * so modification can be properly tracked. * * @return true when pixmap was found and loaded from cache, false otherwise **/ @@ -149,6 +155,12 @@ QString themeMetadataPath; QString iconImageSetMetadataPath; + #if defined(Q_OS_LINUX) + // Store boot time to be able to compare it to the lastModifiedTime when the timestamp + // of files is the UNIX epoch. + time_t bootTime = 0; + #endif + bool isDefault : 1; bool useGlobal : 1; bool cacheImageSet : 1;