From 0115dea8d30cc7521df2c6ba0c1eb58a6b462c5e Mon Sep 17 00:00:00 2001 From: sibel Date: Mon, 11 Oct 2010 15:04:15 +0200 Subject: correction de polkit-qt#0.96.1-2 --- extra/polkit-qt/.md5sum | 2 ++ extra/polkit-qt/Pkgfile | 12 ++++---- extra/polkit-qt/fix-deprecated-warnings.patch | 41 +++++++++++++++++++++++++++ extra/polkit-qt/null-checking.patch | 14 +++++++++ 4 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 extra/polkit-qt/fix-deprecated-warnings.patch create mode 100644 extra/polkit-qt/null-checking.patch (limited to 'extra/polkit-qt') diff --git a/extra/polkit-qt/.md5sum b/extra/polkit-qt/.md5sum index 831797db1..0a476edbf 100644 --- a/extra/polkit-qt/.md5sum +++ b/extra/polkit-qt/.md5sum @@ -1 +1,3 @@ +2ff7e14cfa198eaca9189c15158adf37 fix-deprecated-warnings.patch +a34dfa8408cf7add41dd2c9c522a61ce null-checking.patch 7d122aa67c6786ea7d0bb023701693a1 polkit-qt-1-0.96.1.tar.bz2 diff --git a/extra/polkit-qt/Pkgfile b/extra/polkit-qt/Pkgfile index 72c926227..c247e7624 100755 --- a/extra/polkit-qt/Pkgfile +++ b/extra/polkit-qt/Pkgfile @@ -6,19 +6,17 @@ name=polkit-qt version=0.96.1 -release=1 -source=(ftp://ftp.kde.org/pub/kde/stable/apps/KDE4.x/admin/$name-1-$version.tar.bz2) +release=2 +source=(ftp://ftp.kde.org/pub/kde/stable/apps/KDE4.x/admin/$name-1-$version.tar.bz2) build() { - cd $SRC + cd $name-1-$version + mkdir build cd build - cmake ../$name-1-$version \ - -DCMAKE_INSTALL_PREFIX=/usr \ + cmake ../ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=ON make make DESTDIR=$PKG install } - - diff --git a/extra/polkit-qt/fix-deprecated-warnings.patch b/extra/polkit-qt/fix-deprecated-warnings.patch new file mode 100644 index 000000000..fa136b0ff --- /dev/null +++ b/extra/polkit-qt/fix-deprecated-warnings.patch @@ -0,0 +1,41 @@ +Index: core/polkitqt1-authority.cpp +=================================================================== +--- core/polkitqt1-authority.cpp (revision 1183413) ++++ core/polkitqt1-authority.cpp (working copy) +@@ -177,12 +177,17 @@ + m_revokeTemporaryAuthorizationsCancellable = g_cancellable_new(); + m_revokeTemporaryAuthorizationCancellable = g_cancellable_new(); + ++ GError *gerror = NULL; + if (pkAuthority == NULL) { +- pkAuthority = polkit_authority_get(); ++ pkAuthority = polkit_authority_get_sync(NULL, &gerror); ++ if (gerror != NULL) { ++ setError(E_GetAuthority, gerror->message); ++ g_error_free(gerror); ++ return; ++ } + } + + if (pkAuthority == NULL) { +- (E_GetAuthority); + return; + } + +Index: agent/polkitqt1-agent-listener.cpp +=================================================================== +--- agent/polkitqt1-agent-listener.cpp (revision 1183413) ++++ agent/polkitqt1-agent-listener.cpp (working copy) +@@ -73,9 +73,11 @@ + { + GError *error = NULL; + +- bool r = polkit_agent_register_listener(d->listener, ++ bool r = polkit_agent_listener_register(d->listener, ++ POLKIT_AGENT_REGISTER_FLAGS_RUN_IN_THREAD, + subject->subject(), + objectPath.toAscii().data(), ++ NULL, + &error); + if (error != NULL) { + qWarning() << QString("Cannot register authentication agent: %1").arg(error->message); diff --git a/extra/polkit-qt/null-checking.patch b/extra/polkit-qt/null-checking.patch new file mode 100644 index 000000000..0ec2a8e38 --- /dev/null +++ b/extra/polkit-qt/null-checking.patch @@ -0,0 +1,14 @@ +Index: agent/polkitqt1-agent-listener.cpp +=================================================================== +--- agent/polkitqt1-agent-listener.cpp (revision 1183495) ++++ agent/polkitqt1-agent-listener.cpp (working copy) +@@ -66,7 +66,8 @@ + qDebug("Destroying listener"); + + ListenerAdapter::instance()->removeListener(this); +- g_object_unref(d->listener); ++ if (d->listener != NULL) ++ g_object_unref(d->listener); + } + + bool Listener::registerListener(PolkitQt1::Subject *subject, const QString &objectPath) -- cgit v1.2.3-70-g09d2