[SCM] Polkit Qt 1 packaging branch, master, updated. debian/0.99.0-3-3-g4a77c68
Scott Kitterman
kitterman at alioth.debian.org
Wed Dec 14 14:44:06 UTC 2011
The following commit has been merged in the master branch:
commit 4a77c6867710ebdecac98dc91c8de13d8055889c
Author: Scott Kitterman <scott at kitterman.com>
Date: Wed Dec 14 09:43:35 2011 -0500
Add fix_exit_crash.diff from upstream (Closes: #651815)
---
debian/changelog | 5 ++-
debian/patches/fix_exit_crash.diff | 103 ++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 108 insertions(+), 1 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 691f973..79a065a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,7 +4,10 @@ polkit-qt-1 (0.99.0-4) UNRELEASED; urgency=low
* Modify CFLAGS/CXXFLAGS after including debian-qt-kde.mk so the changes are
not overwritten.
- -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Wed, 14 Dec 2011 14:58:26 +0100
+ [ Scott Kitterman ]
+ * Add fix_exit_crash.diff from upstream (Closes: #651815)
+
+ -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Wed, 14 Dec 2011 09:15:10 -0500
polkit-qt-1 (0.99.0-3) unstable; urgency=low
diff --git a/debian/patches/fix_exit_crash.diff b/debian/patches/fix_exit_crash.diff
new file mode 100644
index 0000000..082be35
--- /dev/null
+++ b/debian/patches/fix_exit_crash.diff
@@ -0,0 +1,103 @@
+commit d3c337da01f3887da031fdb5c2ac784fb3e79210
+Author: Nick Shaforostoff <shafff at ukr.net>
+Date: Mon Dec 12 01:03:35 2011 +0200
+
+ BUG: 258916
+
+ use stricter refing in all places of 'identity' keeping.
+ it is interesting that it would be much harder
+ to accidentaly make same mistake if G API was C++ style and not C.
+
+ i also moved cleanup of successful sessions in time from system shutdown
+ to session completion as polkit docs say it should be
+
+Index: polkit-qt-1-0.99.0/agent/polkitqt1-agent-session.cpp
+===================================================================
+--- polkit-qt-1-0.99.0.orig/agent/polkitqt1-agent-session.cpp 2011-12-14 08:24:19.476208706 -0500
++++ polkit-qt-1-0.99.0/agent/polkitqt1-agent-session.cpp 2011-12-14 08:24:59.664207519 -0500
+@@ -46,7 +46,7 @@
+
+ Session::Private::~Private()
+ {
+- g_object_unref(polkitAgentSession);
++ // polkitAgentSession is freed in Session d'tor
+ }
+
+ Session::Session(const PolkitQt1::Identity &identity, const QString &cookie, AsyncResult *result, QObject *parent)
+@@ -74,6 +74,9 @@
+
+ Session::~Session()
+ {
++ if (d->polkitAgentSession)
++ g_object_unref(d->polkitAgentSession);
++
+ delete d;
+ }
+
+@@ -101,7 +104,11 @@
+ {
+ qDebug() << "COMPLETED";
+ Session *session = (Session *)user_data;
+- Q_EMIT((Session *)user_data)->completed(gained_authorization);
++ Q_EMIT(session)->completed(gained_authorization);
++
++ //free session here as polkit documentation asks
++ g_object_unref(session->d->polkitAgentSession);
++ session->d->polkitAgentSession = 0;
+ }
+
+ void Session::Private::request(PolkitAgentSession *s, gchar *request, gboolean echo_on, gpointer user_data)
+@@ -139,7 +146,8 @@
+
+ AsyncResult::~AsyncResult()
+ {
+- g_object_unref(d->result);
++ if (d->result)
++ g_object_unref(d->result);
+ }
+
+ void AsyncResult::setCompleted()
+Index: polkit-qt-1-0.99.0/core/polkitqt1-identity.cpp
+===================================================================
+--- polkit-qt-1-0.99.0.orig/core/polkitqt1-identity.cpp 2011-12-14 08:24:44.952207954 -0500
++++ polkit-qt-1-0.99.0/core/polkitqt1-identity.cpp 2011-12-14 08:24:59.664207519 -0500
+@@ -35,11 +35,13 @@
+ : QSharedData(other)
+ , identity(other.identity)
+ {
+- g_object_ref(identity);
++ if (identity)
++ g_object_ref(identity);
+ }
+ ~Data()
+ {
+- g_object_unref(identity);
++ if (identity)
++ g_object_unref(identity);
+ }
+
+ PolkitIdentity *identity;
+@@ -56,6 +58,8 @@
+ {
+ g_type_init();
+ d->identity = polkitIdentity;
++ if (d->identity)
++ g_object_ref(d->identity);
+ }
+
+ Identity::Identity(const PolkitQt1::Identity& other)
+@@ -86,7 +90,14 @@
+
+ void Identity::setIdentity(PolkitIdentity *identity)
+ {
++ if (d->identity == identity)
++ return;
++
++ if (d->identity)
++ g_object_unref(d->identity);
+ d->identity = identity;
++ if (d->identity)
++ g_object_ref(d->identity);
+ }
+
+ QString Identity::toString() const
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..99a8f8f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix_exit_crash.diff
--
Polkit Qt 1 packaging
More information about the pkg-kde-commits
mailing list