Hello community,
here is the log from the commit of package plasma5-pk-updates for
openSUSE:Leap:15.2 checked in at 2020-02-27 06:41:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/plasma5-pk-updates (Old)
and /work/SRC/openSUSE:Leap:15.2/.plasma5-pk-updates.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "plasma5-pk-updates"
Thu Feb 27 06:41:13 2020 rev:57 rq:779436 version:0.3.2
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/plasma5-pk-updates/plasma5-pk-updates.changes
2020-01-15 15:44:16.347283387 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.plasma5-pk-updates.new.26092/plasma5-pk-updates.changes
2020-02-27 06:41:15.597579190 +0100
@@ -1,0 +2,12 @@
+Mon Feb 24 07:55:44 UTC 2020 - Fabian Vogt <[email protected]>
+
+- Add patch to avoid error messages for a locked db (boo#1161501):
+ * 0001-Don-t-show-an-error-for-a-failed-automatic-refresh.patch
+
+-------------------------------------------------------------------
+Tue Jan 28 15:21:59 UTC 2020 - Wolfgang Bauer <[email protected]>
+
+- Update german translations to remove a superfluous fullstop
+ (kde#386751)
+
+-------------------------------------------------------------------
New:
----
0001-Don-t-show-an-error-for-a-failed-automatic-refresh.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ plasma5-pk-updates.spec ++++++
--- /var/tmp/diff_new_pack.cyahEj/_old 2020-02-27 06:41:15.969579965 +0100
+++ /var/tmp/diff_new_pack.cyahEj/_new 2020-02-27 06:41:15.969579965 +0100
@@ -1,7 +1,7 @@
#
# spec file for package plasma5-pk-updates
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -41,6 +41,7 @@
Patch9: 0007-Port-away-from-KDELibs4Support-use-Solid-Power-inter.patch
# PATCH-FEATURE-UPSTREAM
Patch10: 0001-Add-support-for-license-prompts.patch
+Patch11: 0001-Don-t-show-an-error-for-a-failed-automatic-refresh.patch
BuildRequires: PackageKit-Qt5-devel
BuildRequires: cmake >= 3.0
BuildRequires: extra-cmake-modules >= 1.3.0
++++++ 0001-Don-t-show-an-error-for-a-failed-automatic-refresh.patch ++++++
>From 4d6cfaea1dd4a44867a6f77bdc8a6d3f0b70a396 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <[email protected]>
Date: Thu, 23 Jan 2020 11:18:58 +0100
Subject: [PATCH] Don't show an error for a failed automatic refresh
Summary:
If it's an automatically triggered refresh, the first time it fails a likely
transient (no network, locking failed, init failed) error is not shown.
Test Plan:
Started zypper in the background, which locks the database.
Reset the timestamp to 0 and started the applet in plasmawindowed.
The first autorefresh error wasn't displayed, but the subsequent ones were.
After quitting zypper it refreshed successfully and the count was reset.
Reviewers: bruns, antlarr
Differential Revision: https://phabricator.kde.org/D27423
---
src/declarative/pkupdates.cpp | 42 +++++++++++++++++++++++++++++----
src/declarative/pkupdates.h | 7 +++++-
src/plasma/contents/ui/Full.qml | 2 +-
src/plasma/contents/ui/main.qml | 2 +-
4 files changed, 45 insertions(+), 8 deletions(-)
diff --git a/src/declarative/pkupdates.cpp b/src/declarative/pkupdates.cpp
index 401c887..1c958db 100644
--- a/src/declarative/pkupdates.cpp
+++ b/src/declarative/pkupdates.cpp
@@ -197,7 +197,7 @@ void PkUpdates::doDelayedCheckUpdates()
{
qCDebug(PLASMA_PK_UPDATES) << "CheckUpdates was delayed. Doing it now";
m_checkUpdatesWhenNetworkOnline = false;
- checkUpdates();
+ checkUpdates(true /* force */, m_isManualCheck /* manual */);
}
}
@@ -230,8 +230,10 @@ QString PkUpdates::timestamp() const
return i18n("Last check: never");
}
-void PkUpdates::checkUpdates(bool force)
+void PkUpdates::checkUpdates(bool force, bool manual)
{
+ m_isManualCheck = manual;
+
if (!isNetworkOnline())
{
qCDebug(PLASMA_PK_UPDATES) << "Checking updates delayed. Network is
offline";
@@ -247,7 +249,7 @@ void PkUpdates::checkUpdates(bool force)
// evaluate the result
connect(m_cacheTrans.data(), &PackageKit::Transaction::statusChanged,
this, &PkUpdates::onStatusChanged);
connect(m_cacheTrans.data(), &PackageKit::Transaction::finished, this,
&PkUpdates::onFinished);
- connect(m_cacheTrans.data(), &PackageKit::Transaction::errorCode, this,
&PkUpdates::onErrorCode);
+ connect(m_cacheTrans.data(), &PackageKit::Transaction::errorCode, this,
&PkUpdates::onRefreshErrorCode);
connect(m_cacheTrans.data(), &PackageKit::Transaction::requireRestart,
this, &PkUpdates::onRequireRestart);
connect(m_cacheTrans.data(),
&PackageKit::Transaction::repoSignatureRequired, this,
&PkUpdates::onRepoSignatureRequired);
}
@@ -397,6 +399,7 @@ void PkUpdates::onFinished(PackageKit::Transaction::Exit
status, uint runtime)
// save the timestamp
KConfigGroup grp(KSharedConfig::openConfig("plasma-pk-updates"),
"General");
grp.writeEntry("Timestamp",
QDateTime::currentDateTime().toMSecsSinceEpoch());
+ grp.writeEntry("FailedAutoRefeshCount", 0);
grp.sync();
return;
@@ -462,7 +465,7 @@ void PkUpdates::onFinished(PackageKit::Transaction::Exit
status, uint runtime)
} else {
qCDebug(PLASMA_PK_UPDATES) << "Update packages transaction didn't
finish successfully";
// just try to refresh cache in case of error, the user might have
installed the updates manually meanwhile
- checkUpdates(false /* force */);
+ checkUpdates(false /* force */, false /* manual */);
return;
}
setActivity(Idle);
@@ -478,6 +481,35 @@ void PkUpdates::onFinished(PackageKit::Transaction::Exit
status, uint runtime)
}
void PkUpdates::onErrorCode(PackageKit::Transaction::Error error, const
QString &details)
+{
+ showError(error, details);
+}
+
+void PkUpdates::onRefreshErrorCode(PackageKit::Transaction::Error error, const
QString &details)
+{
+ if(!m_isManualCheck) {
+ auto isTransientError = [] (PackageKit::Transaction::Error error) {
+ return (error ==
PackageKit::Transaction::ErrorFailedInitialization) ||
+ (error == PackageKit::Transaction::ErrorNoNetwork) ||
+ (error == PackageKit::Transaction::ErrorCannotGetLock);
+ };
+
+ KConfigGroup grp(KSharedConfig::openConfig("plasma-pk-updates"),
"General");
+ auto failCount = grp.readEntry<qint64>("FailedAutoRefeshCount", 0);
+ failCount += 1;
+ grp.writeEntry("FailedAutoRefeshCount", failCount);
+ grp.sync();
+
+ if(failCount <= 1 && isTransientError(error)) {
+ qDebug(PLASMA_PK_UPDATES) << "Ignoring notification for likely
transient error during automatic check";
+ return;
+ }
+ }
+
+ showError(error, details);
+}
+
+void PkUpdates::showError(PackageKit::Transaction::Error error, const QString
&details)
{
qWarning() << "PK error:" << details << "type:" <<
PackageKit::Daemon::enumToString<PackageKit::Transaction>((int)error, "Error");
if (error == PackageKit::Transaction::ErrorBadGpgSignature || error ==
PackageKit::Transaction::ErrorNoLicenseAgreement)
@@ -581,7 +613,7 @@ void PkUpdates::eulaAgreementResult(const QString &eulaID,
bool agreed)
if(!agreed) {
qCDebug(PLASMA_PK_UPDATES) << "EULA declined";
// Do the same as the failure case in onFinished
- checkUpdates(false /* force */);
+ checkUpdates(false /* force */, m_isManualCheck /* manual */);
return;
}
diff --git a/src/declarative/pkupdates.h b/src/declarative/pkupdates.h
index 0f48d2d..c1872d0 100644
--- a/src/declarative/pkupdates.h
+++ b/src/declarative/pkupdates.h
@@ -181,8 +181,9 @@ public slots:
* as a result. Consult the count() property whether there are new
updates available.
*
* @param force whether to force the cache refresh
+ * @param manual whether this check was triggered via explicit user
interaction
*/
- Q_INVOKABLE void checkUpdates(bool force = true);
+ Q_INVOKABLE void checkUpdates(bool force = true, bool manual = false);
/**
* Launch the update process
@@ -230,6 +231,7 @@ private slots:
void onPackageUpdating(PackageKit::Transaction::Info info, const QString
&packageID, const QString &summary);
void onFinished(PackageKit::Transaction::Exit status, uint runtime);
void onErrorCode(PackageKit::Transaction::Error error, const QString
&details);
+ void onRefreshErrorCode(PackageKit::Transaction::Error error, const
QString &details);
void onRequireRestart(PackageKit::Transaction::Restart type, const QString
&packageID);
void onUpdateDetail(const QString &packageID, const QStringList &updates,
const QStringList &obsoletes, const QStringList &vendorUrls,
const QStringList &bugzillaUrls, const QStringList
&cveUrls, PackageKit::Transaction::Restart restart,
@@ -249,6 +251,7 @@ private:
void setStatusMessage(const QString &message);
void setActivity(Activity act);
void setPercentage(int value);
+ void showError(PackageKit::Transaction::Error error, const QString
&details);
void promptNextEulaAgreement();
QPointer<PackageKit::Transaction> m_updatesTrans;
QPointer<PackageKit::Transaction> m_cacheTrans;
@@ -267,6 +270,8 @@ private:
bool m_lastCheckSuccessful = false;
bool m_checkUpdatesWhenNetworkOnline = false;
bool m_isOnBattery;
+ // If the current check was triggered manually
+ bool m_isManualCheck;
// If a transaction failed because of required EULAs,
// this contains a map of their IDs to their data
QMap<QString, EulaData> m_requiredEulas;
diff --git a/src/plasma/contents/ui/Full.qml b/src/plasma/contents/ui/Full.qml
index de2a47e..e612738 100644
--- a/src/plasma/contents/ui/Full.qml
+++ b/src/plasma/contents/ui/Full.qml
@@ -272,7 +272,7 @@ Item {
}
text: i18n("Check For Updates")
tooltip: i18n("Checks for any available updates")
- onClicked: PkUpdates.checkUpdates() // circumvent the checks, the
user knows what they're doing ;)
+ onClicked: PkUpdates.checkUpdates(true /* force */, true /* manual
*/) // circumvent the checks, the user knows what they're doing ;)
}
PlasmaComponents.Button {
diff --git a/src/plasma/contents/ui/main.qml b/src/plasma/contents/ui/main.qml
index b18f15d..aaec014 100644
--- a/src/plasma/contents/ui/main.qml
+++ b/src/plasma/contents/ui/main.qml
@@ -54,7 +54,7 @@ Item
interval: 1000 * 60 * 60; // 1 hour
onTriggered: {
if (needsForcedUpdate() && networkAllowed && batteryAllowed) {
- PkUpdates.checkUpdates();
+ PkUpdates.checkUpdates(true /* force */, false /* manual */);
}
}
}
--
2.23.0
++++++ plasma5-pk-updates-lang.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/po/de/plasma_applet_org.kde.plasma.pkupdates.po
new/po/de/plasma_applet_org.kde.plasma.pkupdates.po
--- old/po/de/plasma_applet_org.kde.plasma.pkupdates.po 1970-01-01
01:00:00.000000000 +0100
+++ new/po/de/plasma_applet_org.kde.plasma.pkupdates.po 2020-01-28
14:37:17.000000000 +0100
@@ -0,0 +1,148 @@
+# Copyright (C) YEAR This_file_is_part_of_KDE
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Frederik Schwarzer <[email protected]>, 2016, 2017.
+# Burkhard Lück <[email protected]>, 2017, 2020.
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
+"POT-Creation-Date: 2019-09-03 03:21+0200\n"
+"PO-Revision-Date: 2020-01-27 06:04+0100\n"
+"Last-Translator: Burkhard Lück <[email protected]>\n"
+"Language-Team: German <[email protected]>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Lokalize 18.12.3\n"
+
+#: contents/config/config.qml:26
+#, kde-format
+msgid "General"
+msgstr "Allgemein"
+
+#: contents/ui/ConfigGeneral.qml:43
+#, kde-format
+msgid "Check Interval"
+msgstr "Prüfintervall"
+
+#: contents/ui/ConfigGeneral.qml:48
+#, kde-format
+msgid "Daily"
+msgstr "Täglich"
+
+#: contents/ui/ConfigGeneral.qml:53
+#, kde-format
+msgid "Weekly"
+msgstr "Wöchentlich"
+
+#: contents/ui/ConfigGeneral.qml:58
+#, kde-format
+msgid "Monthly"
+msgstr "Monatlich"
+
+#: contents/ui/ConfigGeneral.qml:66
+#, kde-format
+msgid "Check for updates even on a mobile connection"
+msgstr "Auch über Mobilfunkverbindung auf Aktualisierungen prüfen"
+
+#: contents/ui/ConfigGeneral.qml:70
+#, kde-format
+msgid "Check for updates even when on battery"
+msgstr "Auch im Akkubetrieb auf Aktualisierungen prüfen"
+
+#: contents/ui/Full.qml:64
+#, kde-format
+msgid "License Agreement for %1"
+msgstr "Lizenzvereinbarung für %1"
+
+#: contents/ui/Full.qml:71
+#, kde-format
+msgid "License agreement required for %1 (from %2):"
+msgstr "Zustimmung zur Lizenzvereinbarung für %1 von %2 erforderlich:"
+
+#: contents/ui/Full.qml:84
+#, kde-format
+msgid "Do you accept?"
+msgstr "Akzeptieren Sie die Lizenzvereinbarung?"
+
+#: contents/ui/Full.qml:120
+#, kde-format
+msgid "Network is offline"
+msgstr "Das Netzwerk ist deaktiviert"
+
+#: contents/ui/Full.qml:151
+#, kde-format
+msgid ""
+"Updates are automatically checked %1.<br>Click the 'Check For Updates' "
+"button below to search for updates manually."
+msgstr ""
+"Es wird automatisch %1 auf Aktualisierungen geprüft.<br>Klicken Sie auf „Auf "
+"Aktualisierungen prüfen“, um manuell nach Aktualisierungen zu suchen."
+
+#: contents/ui/Full.qml:241
+#, kde-format
+msgid "Select all packages"
+msgstr "Alle Pakete auswählen"
+
+#: contents/ui/Full.qml:273
+#, kde-format
+msgid "Check For Updates"
+msgstr "Auf Aktualisierungen prüfen"
+
+#: contents/ui/Full.qml:274
+#, kde-format
+msgid "Checks for any available updates"
+msgstr "Prüft auf verfügbare Aktualisierungen"
+
+#: contents/ui/Full.qml:287
+#, kde-format
+msgid "Install Updates"
+msgstr "Aktualisierungen installieren"
+
+#: contents/ui/Full.qml:288
+#, kde-format
+msgid "Performs the software update"
+msgstr "Führt die Softwareaktualisierung durch"
+
+#: contents/ui/Full.qml:351
+#, kde-format
+msgid "weekly"
+msgstr "wöchentlich"
+
+#: contents/ui/Full.qml:353
+#, kde-format
+msgid "monthly"
+msgstr "monatlich"
+
+#: contents/ui/Full.qml:355
+#, kde-format
+msgid "daily"
+msgstr "täglich"
+
+#: contents/ui/PackageDelegate.qml:76
+#, kde-format
+msgctxt "Package Name (Version)"
+msgid "%1 (%2)"
+msgstr "%1 (%2)"
+
+#: contents/ui/PackageDelegate.qml:132
+#, kde-format
+msgctxt "description of the update"
+msgid "Update Description"
+msgstr "Beschreibung der Aktualisierung"
+
+#: contents/ui/PackageDelegate.qml:144
+#, kde-format
+msgid "No description available"
+msgstr "Keine Beschreibung verfügbar"
+
+#: contents/ui/PackageDelegate.qml:157
+#, kde-format
+msgid "Related URLs"
+msgstr "Zugehörige Adressen"
+
+#~ msgid "Updates are automatically checked %1.<br>"
+#~ msgstr "Es wird automatisch %1 auf Aktualisierungen geprüft.<br>"