[PackageKit-Qt] pickup/test upstream crash fix (kde#315009)
Rex Dieter
rdieter at fedoraproject.org
Thu Mar 7 15:50:29 UTC 2013
commit e5ae2081a988c6ba52a2f8fdcd81a9e0504dee92
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Thu Mar 7 09:50:10 2013 -0600
pickup/test upstream crash fix (kde#315009)
...e-set-an-error-if-we-fail-to-contact-Pack.patch | 79 ++++++++++++++++++++
PackageKit-Qt.spec | 10 ++-
2 files changed, 88 insertions(+), 1 deletions(-)
---
diff --git a/0005-Make-sure-we-set-an-error-if-we-fail-to-contact-Pack.patch b/0005-Make-sure-we-set-an-error-if-we-fail-to-contact-Pack.patch
new file mode 100644
index 0000000..f31c461
--- /dev/null
+++ b/0005-Make-sure-we-set-an-error-if-we-fail-to-contact-Pack.patch
@@ -0,0 +1,79 @@
+From da41de0e4a98eed232eb05a14e903666dbb21838 Mon Sep 17 00:00:00 2001
+From: Daniel Nicoletti <dantti12 at gmail.com>
+Date: Thu, 7 Mar 2013 00:40:13 -0300
+Subject: [PATCH 5/5] Make sure we set an error if we fail to contact
+ PackageKit Fixes KDE Bug: 315009
+
+---
+ src/transaction.cpp | 35 ++++++++++++++++++-----------------
+ 1 file changed, 18 insertions(+), 17 deletions(-)
+
+diff --git a/src/transaction.cpp b/src/transaction.cpp
+index 47b3c56..41884a7 100644
+--- a/src/transaction.cpp
++++ b/src/transaction.cpp
+@@ -67,19 +67,19 @@ bool Transaction::init(const QDBusObjectPath &tid)
+ // he want us to get it
+ if (tid.path().isNull()) {
+ d->tid = Daemon::global()->getTid();
++ if (d->tid.path().isEmpty()) {
++ d->error = Transaction::InternalErrorDaemonUnreachable;
++ return false;
++ }
+ } else {
+ d->tid = tid;
+ }
+
+- if (d->tid.path().isEmpty()) {
+- d->error = Transaction::InternalErrorDaemonUnreachable;
+- return false;
+- } else {
+-
+- }
+-
+ int retry = 0;
+ do {
++ if (d->p) {
++ delete d->p;
++ }
+ d->p = new TransactionProxy(QLatin1String(PK_NAME),
+ d->tid.path(),
+ QDBusConnection::systemBus(),
+@@ -95,23 +95,24 @@ bool Transaction::init(const QDBusObjectPath &tid)
+ message << qVariantFromValue(0U);
+ QDBusConnection::sessionBus().call(message, QDBus::BlockWithGui);
+
+- // The transaction was not created
+- delete d->p;
+- d->p = 0;
+ retry++;
+ } else {
+ retry = 0;
+ }
+ } while (retry == 1);
+
+- // if the transaction proxy was not created return false
+- if (!d->p) {
++ // if the transaction proxy was not created return false and set the error
++ if (!d->p->isValid()) {
++ // The transaction was not created
++ d->error = Transaction::InternalErrorCannotStartDaemon;
++ emit errorCode(Transaction::ErrorInternalError, d->p->lastError().message());
++ delete d->p;
+ return false;
+- } else {
+- d->error = Transaction::InternalErrorNone;
+- if (!Daemon::global()->hints().isEmpty()) {
+- setHints(Daemon::global()->hints());
+- }
++ }
++
++ d->error = Transaction::InternalErrorNone;
++ if (!Daemon::global()->hints().isEmpty()) {
++ setHints(Daemon::global()->hints());
+ }
+
+ connect(d->p, SIGNAL(Changed()),
+--
+1.8.1.4
+
diff --git a/PackageKit-Qt.spec b/PackageKit-Qt.spec
index ef96b3f..9be501c 100644
--- a/PackageKit-Qt.spec
+++ b/PackageKit-Qt.spec
@@ -1,12 +1,15 @@
Summary: Qt support library for PackageKit
Name: PackageKit-Qt
Version: 0.8.7
-Release: 2%{?dist}
+Release: 3%{?dist}
License: LGPLv2+
URL: http://www.packagekit.org/
Source0: http://www.packagekit.org/releases/%{name}-%{version}.tar.xz
+## upstream patches
+Patch100: 0005-Make-sure-we-set-an-error-if-we-fail-to-contact-Pack.patch
+
BuildRequires: cmake
BuildRequires: pkgconfig(QtDBus) pkgconfig(QtSql)
@@ -34,6 +37,8 @@ Development headers and libraries for PackageKit-Qt.
%prep
%setup -q
+%patch100 -p1 -b .0005
+
%build
mkdir -p %{_target_platform}
@@ -68,6 +73,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%changelog
+* Thu Mar 07 2013 Rex Dieter <rdieter at fedoraproject.org> 0.8.7-3
+- pickup/test upstream crash fix (kde#315009)
+
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
More information about the scm-commits
mailing list