From kde-devel Sun May 04 19:33:48 2014 From: Marc Schmitzer Date: Sun, 04 May 2014 19:33:48 +0000 To: kde-devel Subject: [PATCH] apperd: Restrict creation of KJobs to the more interesting transaction roles. Message-Id: <2938245.6nSgQcM6Dk () lenny> X-MARC-Message: https://marc.info/?l=kde-devel&m=139923207330126 Hi everybody, I've hacked up a patch to apperd that (for me) fixes KDE BUG #318864 [1]. The commit message and patch are inlined below, it would be awesome if this would be reviewed and merged. Please tell me if I should submit the patch any other way. Regards, Marc Schmitzer [1] https://bugs.kde.org/show_bug.cgi?id=318864 apperd: Restrict creation of KJobs to the more interesting transaction roles. Creating a job for every transaction (including e.g. fetching of update details) is way too noisy (KDE BUG #318864). The list of roles is the same as that used to filter messages from transactions in watchTransaction(). --- apperd/TransactionWatcher.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apperd/TransactionWatcher.cpp b/apperd/TransactionWatcher.cpp index 23ded5c..260625c 100644 --- a/apperd/TransactionWatcher.cpp +++ b/apperd/TransactionWatcher.cpp @@ -204,7 +204,13 @@ void TransactionWatcher::transactionChanged(Transaction *transaction, bool inter } // If the - if (!m_transactionJob.contains(tid) && interactive) { + Transaction::Role role = transaction->role(); + if (!m_transactionJob.contains(tid) && interactive && + (role == Transaction::RoleInstallPackages || + role == Transaction::RoleInstallFiles || + role == Transaction::RoleRemovePackages || + role == Transaction::RoleUpdatePackages || + role == Transaction::RoleUpgradeSystem)) { TransactionJob *job = new TransactionJob(transaction, this); connect(transaction, SIGNAL(errorCode(PackageKit::Transaction::Error,QString)), this, SLOT(errorCode(PackageKit::Transaction::Error,QString))); -- 1.9.0 >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<