[SCM] kwallet packaging branch, kubuntu_vivid_archive, updated. e70ea5aec40c61f4e5165ceac29fede7388af3d4

Jonathan Riddell jriddell-guest at moszumanska.debian.org
Thu Apr 23 13:29:56 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/frameworks/kwallet.git;a=commitdiff;h=e70ea5a

The following commit has been merged in the kubuntu_vivid_archive branch:
commit e70ea5aec40c61f4e5165ceac29fede7388af3d4
Author: Jonathan Riddell <jr at jriddell.org>
Date:   Thu Apr 23 15:29:53 2015 +0200

    add patch
---
 .../upstream_check-empty-wallet-migration.diff     | 69 ++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/debian/patches/upstream_check-empty-wallet-migration.diff b/debian/patches/upstream_check-empty-wallet-migration.diff
new file mode 100644
index 0000000..8f9aa9e
--- /dev/null
+++ b/debian/patches/upstream_check-empty-wallet-migration.diff
@@ -0,0 +1,69 @@
+From: Valentin Rusu <kde at rusu.info>
+Date: Thu, 23 Apr 2015 06:59:46 +0000
+Subject: Migration agent now also check old wallet is empty before starting
+X-Git-Url: http://quickgit.kde.org/?p=kwallet.git&a=commitdiff&h=abb22c194f3b5650f51dce97f2e7ad64c2c33861
+---
+Migration agent now also check old wallet is empty before starting
+
+BUG: 346498
+
+Some distributions provide old kwalletd along with the new kwalletd5.
+In this case, the old kwalletd do not have any data to migrate.
+---
+
+
+Index: kwallet-kf5-5.9.0/src/runtime/kwalletd/migrationagent.cpp
+===================================================================
+--- kwallet-kf5-5.9.0.orig/src/runtime/kwalletd/migrationagent.cpp
++++ kwallet-kf5-5.9.0/src/runtime/kwalletd/migrationagent.cpp
+@@ -55,10 +55,15 @@ void MigrationAgent::migrateWallets()
+   qDebug() << "Migration agent starting...";
+   if (!isAlreadyMigrated()) {
+     if (connectOldDaemon()) {
+-      if (isMigrationWizardOk()) {
+-        setAlreadyMigrated();
++      if (!isEmptyOldWallet()) {
++        if (isMigrationWizardOk()) {
++          setAlreadyMigrated();
++        } else {
++          qDebug() << "Migration wizard returned an error or has been canceled. The migration agent will resume upon next daemon start";
++        }
+       } else {
+-        qDebug() << "Migration wizard returned an error or has been canceled. The migration agent will resume upon next daemon start";
++        qDebug() << "Old wallet is empty. No need to migrate.";
++        setAlreadyMigrated();
+       }
+     } else {
+       qDebug() << "KDE4 kwalletd not present, stopping migration agent";
+@@ -145,6 +150,19 @@ template <typename R, typename F> R invo
+     }
+     return reply.value();
+ }
++
++bool MigrationAgent::isEmptyOldWallet() const {
++    QStringList wallets;
++    try {
++      wallets = invokeAndCheck<QStringList>(
++              [this] { return _kde4_daemon->wallets(); },
++              i18n("Cannot read old wallet list. Aborting."));
++    } catch (MigrationException ex) {
++        return true;
++    }
++
++    return wallets.length() == 0;
++}
+     
+ bool MigrationAgent::performMigration(WId wid)
+ {
+Index: kwallet-kf5-5.9.0/src/runtime/kwalletd/migrationagent.h
+===================================================================
+--- kwallet-kf5-5.9.0.orig/src/runtime/kwalletd/migrationagent.h
++++ kwallet-kf5-5.9.0/src/runtime/kwalletd/migrationagent.h
+@@ -34,6 +34,7 @@ class MigrationAgent : public QObject {
+ public:
+     MigrationAgent(KWalletD* kd);
+ 
++    bool isEmptyOldWallet() const;
+     bool performMigration(WId wid);
+ 
+ private Q_SLOTS:

-- 
kwallet packaging



More information about the pkg-kde-commits mailing list