Hello community,
here is the log from the commit of package plasma5-pk-updates for
openSUSE:Leap:15.2 checked in at 2020-05-12 11:36:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/plasma5-pk-updates (Old)
and /work/SRC/openSUSE:Leap:15.2/.plasma5-pk-updates.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "plasma5-pk-updates"
Tue May 12 11:36:25 2020 rev:58 rq:798284 version:0.3.2
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/plasma5-pk-updates/plasma5-pk-updates.changes
2020-02-27 06:41:15.597579190 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.plasma5-pk-updates.new.2738/plasma5-pk-updates.changes
2020-05-12 11:36:25.680252004 +0200
@@ -1,0 +2,13 @@
+Thu Apr 23 09:58:43 UTC 2020 - Fabian Vogt <[email protected]>
+
+- Fix 0001-Limit-to-one-automatic-check-each-10-minutes.patch
+ to handle msecs properly
+
+-------------------------------------------------------------------
+Fri Apr 17 14:09:14 UTC 2020 - Fabian Vogt <[email protected]>
+
+- Add patch to make avoiding error messages more effective (boo#1156387):
+ * 0001-Limit-to-one-automatic-check-each-10-minutes.patch
+ * 0001-Also-treat-ErrorNotAuthorized-as-temporary.patch
+
+-------------------------------------------------------------------
New:
----
0001-Also-treat-ErrorNotAuthorized-as-temporary.patch
0001-Limit-to-one-automatic-check-each-10-minutes.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ plasma5-pk-updates.spec ++++++
--- /var/tmp/diff_new_pack.TRqQpN/_old 2020-05-12 11:36:26.144252979 +0200
+++ /var/tmp/diff_new_pack.TRqQpN/_new 2020-05-12 11:36:26.144252979 +0200
@@ -1,7 +1,7 @@
#
# spec file for package plasma5-pk-updates
#
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -22,7 +22,7 @@
Summary: Software Update Manager for Plasma
License: GPL-3.0-or-later
Group: System/Packages
-Url: https://www.kde.org/
+URL: https://www.kde.org/
Source:
https://download.kde.org/stable/plasma-pk-updates/%{version}/plasma-pk-updates-%{version}.tar.xz
# Updated translations
Source1: plasma5-pk-updates-lang.tar.xz
@@ -42,6 +42,9 @@
# PATCH-FEATURE-UPSTREAM
Patch10: 0001-Add-support-for-license-prompts.patch
Patch11: 0001-Don-t-show-an-error-for-a-failed-automatic-refresh.patch
+# To be sent upstream if confirmed to work as expected
+Patch12: 0001-Limit-to-one-automatic-check-each-10-minutes.patch
+Patch13: 0001-Also-treat-ErrorNotAuthorized-as-temporary.patch
BuildRequires: PackageKit-Qt5-devel
BuildRequires: cmake >= 3.0
BuildRequires: extra-cmake-modules >= 1.3.0
++++++ 0001-Also-treat-ErrorNotAuthorized-as-temporary.patch ++++++
>From 4cf369b6676d92dcfaed48fb3837c98ce6c6f0fa Mon Sep 17 00:00:00 2001
From: Fabian Vogt <[email protected]>
Date: Fri, 17 Apr 2020 16:42:41 +0200
Subject: [PATCH] Also treat ErrorNotAuthorized as temporary
This can happen if updates are checked while it's not the active session.
---
src/declarative/pkupdates.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/declarative/pkupdates.cpp b/src/declarative/pkupdates.cpp
index 1c958db..857a6a1 100644
--- a/src/declarative/pkupdates.cpp
+++ b/src/declarative/pkupdates.cpp
@@ -490,6 +490,7 @@ void
PkUpdates::onRefreshErrorCode(PackageKit::Transaction::Error error, const Q
if(!m_isManualCheck) {
auto isTransientError = [] (PackageKit::Transaction::Error error) {
return (error ==
PackageKit::Transaction::ErrorFailedInitialization) ||
+ (error == PackageKit::Transaction::ErrorNotAuthorized) ||
(error == PackageKit::Transaction::ErrorNoNetwork) ||
(error == PackageKit::Transaction::ErrorCannotGetLock);
};
--
2.25.1
++++++ 0001-Limit-to-one-automatic-check-each-10-minutes.patch ++++++
>From 2e968cb632acdd1dbadcd0960fc44935c962847f Mon Sep 17 00:00:00 2001
From: Fabian Vogt <[email protected]>
Date: Fri, 17 Apr 2020 16:06:25 +0200
Subject: [PATCH 1/2] Limit to one automatic check each 10 minutes
Otherwise each network or battery change results in a check, which
can be especially annoying if those fail for some reason (e.g. no internet).
---
src/plasma/contents/ui/main.qml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/plasma/contents/ui/main.qml b/src/plasma/contents/ui/main.qml
index aaec014..bb87f1b 100644
--- a/src/plasma/contents/ui/main.qml
+++ b/src/plasma/contents/ui/main.qml
@@ -40,6 +40,9 @@ Item
property bool checkOnMobile: plasmoid.configuration.check_on_mobile
property bool checkOnBattery: plasmoid.configuration.check_on_battery
+ property double lastCheckAttempt: PkUpdates.lastRefreshTimestamp()
+ readonly property int secsAutoCheckLimit: 10 * 60
+
readonly property int secsInDay: 60 * 60 * 24;
readonly property int secsInWeek: secsInDay * 7;
readonly property int secsInMonth: secsInDay * 30;
@@ -54,6 +57,7 @@ Item
interval: 1000 * 60 * 60; // 1 hour
onTriggered: {
if (needsForcedUpdate() && networkAllowed && batteryAllowed) {
+ lastCheckAttempt = Date.now();
PkUpdates.checkUpdates(true /* force */, false /* manual */);
}
}
@@ -75,6 +79,10 @@ Item
}
function needsForcedUpdate() {
+ if ((Date.now() - lastCheckAttempt)/1000 < secsAutoCheckLimit) {
+ return false;
+ }
+
var secs = (Date.now() - PkUpdates.lastRefreshTimestamp())/1000; //
compare with the saved timestamp
if (secs < 0) { // never checked before
return true;
--
2.25.1