Accepting request 897227 from home:Vogtinator:kiofusespeed

- Use %pkg_vcmp for util-linux requirement for %check
- Add patch to avoid occasional test failure:
  * 0001-Initialize-m_lastChildrenRefresh-to-be-really-in-the.patch

OBS-URL: https://build.opensuse.org/request/show/897227
OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/kio-fuse?expand=0&rev=11
This commit is contained in:
Luca Beltrame 2021-06-03 19:18:29 +00:00 committed by Git OBS Bridge
parent 8410265277
commit 9c576df313
3 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From 1a8862daee5c3ef502d7cf04e451180c15e8f3a3 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Thu, 3 Jun 2021 15:50:40 +0200
Subject: [PATCH] Initialize m_lastChildrenRefresh to be really in the past
steady_clock's epoch is the system start and such a default constructed
steady_clock::time_point might actually not be older than ATTR_TIMEOUT.
By setting it to min() explicitly, it should be sufficiently behind.
---
kiofusenode.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kiofusenode.h b/kiofusenode.h
index 357b094..28a920a 100644
--- a/kiofusenode.h
+++ b/kiofusenode.h
@@ -76,7 +76,7 @@ public:
// be emitted on finish.
bool m_childrenRequested = false;
// Stores the last time a node's children were refreshed via KIO::listDir.
- std::chrono::steady_clock::time_point m_lastChildrenRefresh;
+ std::chrono::steady_clock::time_point m_lastChildrenRefresh = decltype(m_lastChildrenRefresh)::min();
// Returns true if a node is due for a readdir refresh, false otherwise.
bool haveChildrenTimedOut() { return m_lastChildrenRefresh < g_timeoutEpoch || (std::chrono::steady_clock::now() - m_lastChildrenRefresh) >= ATTR_TIMEOUT; }
--
2.25.1

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Jun 3 14:00:13 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de>
- Use %pkg_vcmp for util-linux requirement for %check
- Add patch to avoid occasional test failure:
* 0001-Initialize-m_lastChildrenRefresh-to-be-really-in-the.patch
-------------------------------------------------------------------
Sun Mar 21 14:37:43 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de>

View File

@ -29,6 +29,8 @@ Source0: https://download.kde.org/stable/%{name}/%{version}/%{name}-%{ver
Source1: https://download.kde.org/stable/%{name}/%{version}/%{name}-%{version}.tar.xz.sig
Source2: kio-fuse.keyring
%endif
# PATCH-FIX-UPSTREAM
Patch1: 0001-Initialize-m_lastChildrenRefresh-to-be-really-in-the.patch
BuildRequires: extra-cmake-modules
BuildRequires: pkgconfig
BuildRequires: cmake(KF5KIO) >= 5.66.0
@ -55,7 +57,7 @@ applications using FUSE.
%install
%kf5_makeinstall -C build
%if 0%{?suse_version} > 1500
%if %{pkg_vcmp util-linux >= 2.34}
%check
# The hack below only works with util-linux 3.34+.
# Without working umount, the tests can't work :-(