Hello community, here is the log from the commit of package kde4-kupdateapplet checked in at Mon Oct 6 18:59:24 CEST 2008. -------- --- KDE/kde4-kupdateapplet/kde4-kupdateapplet.changes 2008-09-29 16:03:33.000000000 +0200 +++ /mounts/work_src_done/STABLE/kde4-kupdateapplet/kde4-kupdateapplet.changes 2008-10-02 15:00:57.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Oct 2 13:37:09 CEST 2008 - tgoettlicher@suse.de + +- added PolkitClient::getAuth call to packagekit plugin +- V 0.8.10 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- kde4-kupdateapplet-0.8.9.tar.bz2 New: ---- kde4-kupdateapplet-0.8.10.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kde4-kupdateapplet.spec ++++++ --- /var/tmp/diff_new_pack.Q26271/_old 2008-10-06 18:57:19.000000000 +0200 +++ /var/tmp/diff_new_pack.Q26271/_new 2008-10-06 18:57:19.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package kde4-kupdateapplet (Version 0.8.9) +# spec file for package kde4-kupdateapplet (Version 0.8.10) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -20,10 +20,11 @@ Name: kde4-kupdateapplet BuildRequires: libkde4-devel BuildRequires: cmake >= 2.4.6 +BuildRequires: PolicyKit-devel License: GPL v2 or later Group: System/YaST Summary: openSUSE System Updater Applet (KDE4) -Version: 0.8.9 +Version: 0.8.10 Release: 1 Url: http://en.opensuse.org/KDE_Updater_Applet BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -93,6 +94,7 @@ Group: System/Packages Summary: packagekit plugin for KDE updater applet Requires: PackageKit >= 0.3 +Requires: PolicyKit Provides: kupdateapplet-plugin %description -n kde4-kupdateapplet-packagekit @@ -126,6 +128,9 @@ ############################ %changelog +* Thu Oct 02 2008 tgoettlicher@suse.de +- added PolkitClient::getAuth call to packagekit plugin +- V 0.8.10 * Mon Sep 29 2008 tgoettlicher@suse.de - updated translations - V 0.8.9 ++++++ kde4-kupdateapplet-0.8.9.tar.bz2 -> kde4-kupdateapplet-0.8.10.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.9/kde4-kupdateapplet.spec.in new/kde4-kupdateapplet-0.8.10/kde4-kupdateapplet.spec.in --- old/kde4-kupdateapplet-0.8.9/kde4-kupdateapplet.spec.in 2008-09-29 16:03:31.000000000 +0200 +++ new/kde4-kupdateapplet-0.8.10/kde4-kupdateapplet.spec.in 2008-10-02 15:00:55.000000000 +0200 @@ -11,6 +11,7 @@ Name: @PACKAGE@ BuildRequires: libkde4-devel BuildRequires: cmake >= 2.4.6 +BuildRequires: PolicyKit-devel License: GPL Group: System/Management Summary: KDE updater applet @@ -96,6 +97,7 @@ Group: System/Management Summary: packagekit plugin for KDE updater applet Requires: PackageKit >= 0.3 +Requires: PolicyKit Provides: kupdateapplet-plugin %description -n kde4-kupdateapplet-packagekit diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.9/package/kde4-kupdateapplet.changes new/kde4-kupdateapplet-0.8.10/package/kde4-kupdateapplet.changes --- old/kde4-kupdateapplet-0.8.9/package/kde4-kupdateapplet.changes 2008-09-29 16:03:31.000000000 +0200 +++ new/kde4-kupdateapplet-0.8.10/package/kde4-kupdateapplet.changes 2008-10-02 15:00:55.000000000 +0200 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Oct 2 13:37:09 CEST 2008 - tgoettlicher@suse.de + +- added PolkitClient::getAuth call to packagekit plugin +- V 0.8.10 + +------------------------------------------------------------------- Mon Sep 29 16:02:49 CEST 2008 - tgoettlicher@suse.de - updated translations diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.9/src/packagekit/CMakeLists.txt new/kde4-kupdateapplet-0.8.10/src/packagekit/CMakeLists.txt --- old/kde4-kupdateapplet-0.8.9/src/packagekit/CMakeLists.txt 2008-09-29 16:03:31.000000000 +0200 +++ new/kde4-kupdateapplet-0.8.10/src/packagekit/CMakeLists.txt 2008-10-02 15:00:55.000000000 +0200 @@ -8,10 +8,17 @@ qpackagekitinterface.cpp enums.cpp pklicensedialog.cpp + polkitclient.cpp ) +include(FindPkgConfig) +pkg_check_modules(POLKIT polkit-dbus) + +include_directories( ${POLKIT_INCLUDE_DIRS}) + + kde4_add_plugin(kupdateapplet_packagekit ${kupdateapplet_packagekit_PART_SRCS}) -target_link_libraries(kupdateapplet_packagekit kupdateapplet ${KDE4_SOLID_LIBRARY}) +target_link_libraries(kupdateapplet_packagekit kupdateapplet ${KDE4_SOLID_LIBRARY} polkit-grant polkit dbus-1 polkit-dbus ) install(TARGETS kupdateapplet_packagekit DESTINATION ${PLUGIN_INSTALL_DIR} ) ########### install files ############### diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.9/src/packagekit/packagekit_updater.cpp new/kde4-kupdateapplet-0.8.10/src/packagekit/packagekit_updater.cpp --- old/kde4-kupdateapplet-0.8.9/src/packagekit/packagekit_updater.cpp 2008-09-29 16:03:31.000000000 +0200 +++ new/kde4-kupdateapplet-0.8.10/src/packagekit/packagekit_updater.cpp 2008-10-02 15:00:55.000000000 +0200 @@ -173,8 +173,6 @@ SLOT(slotDistroUpgrade( const QString &, const QString &, const QString &)) ); - - } void PackageKitUpdater::slotStatusChanged( const QString &status ) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.9/src/packagekit/pkconstants.h new/kde4-kupdateapplet-0.8.10/src/packagekit/pkconstants.h --- old/kde4-kupdateapplet-0.8.9/src/packagekit/pkconstants.h 1970-01-01 01:00:00.000000000 +0100 +++ new/kde4-kupdateapplet-0.8.10/src/packagekit/pkconstants.h 2008-10-02 15:00:55.000000000 +0200 @@ -0,0 +1,26 @@ +/* +* Copyright (C) 2007 Adrien Bustany <madcat@mymadcat.com> +* +* Licensed under the GNU General Public License Version 2 +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 See MA 02111-1307, USA. +* +*/ + +#define PK_NAME "org.freedesktop.PackageKit" +#define PK_PATH "/org/freedesktop/PackageKit" + +#define AUTH_UPDATESYSTEM "org.freedesktop.packagekit.update-system" +#define AUTH_UPDATEPACKAGE "org.freedesktop.packagekit.update-package" +#define AUTH_SETPROXY "org.freedesktop.packagekit.set-proxy" +#define AUTH_ROLLBACK "org.freedesktop.packagekit.rollback" +#define AUTH_REPOCHANGE "org.freedesktop.packagekit.repo-change" +#define AUTH_REMOVE "org.freedesktop.packagekit.remove" +#define AUTH_REFRESHCACHE "org.freedesktop.packagekit.refresh-cache" +#define AUTH_LOCALINSTALLUNTRUSTED "org.freedesktop.packagekit.localinstall-untrusted" +#define AUTH_LOCALINSTALLTRUSTED "org.freedesktop.packagekit.localinstall-trusted" +#define AUTH_INSTALLSIGNATURE "org.freedesktop.packagekit.install-signature" +#define AUTH_INSTALL "org.freedesktop.packagekit.install" +#define AUTH_ACCEPTEULA "org.freedesktop.packagekit.accept-eula" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.9/src/packagekit/polkitclient.cpp new/kde4-kupdateapplet-0.8.10/src/packagekit/polkitclient.cpp --- old/kde4-kupdateapplet-0.8.9/src/packagekit/polkitclient.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/kde4-kupdateapplet-0.8.10/src/packagekit/polkitclient.cpp 2008-10-02 15:00:55.000000000 +0200 @@ -0,0 +1,23 @@ +#include <polkit-dbus/polkit-dbus.h> +#include <polkit-grant/polkit-grant.h> + +#include "polkitclient.h" + +PolkitClient::PolkitClient(QObject *parent) + : QObject(parent) +{ +} + +bool PolkitClient::getAuth(const QString &action) +{ + DBusError e; + dbus_error_init(&e); + + bool auth = polkit_auth_obtain(action.toAscii().data(), 0, QCoreApplication::applicationPid(), &e); + if(!auth) + { + qDebug() << "Authentification error :" << e.name << ":" << e.message; + } + return auth; +} + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.9/src/packagekit/polkitclient.h new/kde4-kupdateapplet-0.8.10/src/packagekit/polkitclient.h --- old/kde4-kupdateapplet-0.8.9/src/packagekit/polkitclient.h 1970-01-01 01:00:00.000000000 +0100 +++ new/kde4-kupdateapplet-0.8.10/src/packagekit/polkitclient.h 2008-10-02 15:00:55.000000000 +0200 @@ -0,0 +1,17 @@ +#ifndef POLKITCLIENT_H +#define POLKITCLIENT_H + +#include <QtCore> + +class PolkitClient + : QObject +{ +Q_OBJECT + +public: + PolkitClient(QObject *parent = 0); + static bool getAuth(const QString& action); +}; + +#endif + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.9/src/packagekit/qpackagekitconnector.cpp new/kde4-kupdateapplet-0.8.10/src/packagekit/qpackagekitconnector.cpp --- old/kde4-kupdateapplet-0.8.9/src/packagekit/qpackagekitconnector.cpp 2008-09-29 16:03:31.000000000 +0200 +++ new/kde4-kupdateapplet-0.8.10/src/packagekit/qpackagekitconnector.cpp 2008-10-02 15:00:55.000000000 +0200 @@ -1,8 +1,10 @@ -#include "kdebug.h" +#include <kdebug.h> #include "qpackagekitinterface.h" #include "qpackagekittransactioninterface.h" #include "qpackagekitconnector.h" +#include "polkitclient.h" +#include "pkconstants.h" QPackageKitConnector::QPackageKitConnector( QObject *parent ) : QObject( parent ) @@ -307,13 +309,28 @@ QDBusReply<void> reply = transactioninterface->AcceptEula(eulaId); if(reply.isValid()) { + kDebug() << "accept eula valid"; return true; } - else - { - sendErrorMessage(transactioninterface); - return false; - } + else + { + if ( PolkitClient::getAuth( AUTH_ACCEPTEULA ) ) + { + QDBusReply<void> reply2 = transactioninterface->AcceptEula(eulaId); + if(reply2.isValid()) + { + kDebug() << "accept eula valid"; + return true; + } + else + { + kDebug() << "accept eula invalid"; + sendErrorMessage(transactioninterface); + return false; + } + } + } + return false; } bool QPackageKitConnector::getUpdates() @@ -424,12 +441,25 @@ kDebug() << "refresh replay valid"; return true; } - else - { - kDebug() << "refresh replay not valid"; - sendErrorMessage(transactioninterface); - return false; - } + else + { + if ( PolkitClient::getAuth( AUTH_REFRESHCACHE ) ) + { + QDBusReply<void> reply2 = transactioninterface->RefreshCache(force); + if(reply2.isValid()) + { + kDebug() << "refresh replay valid"; + return true; + } + else + { + kDebug() << "refresh replay not valid"; + sendErrorMessage(transactioninterface); + return false; + } + } + } + return false; } @@ -509,37 +539,61 @@ return true; } else - { - kDebug() << "install sig not valid"; - sendErrorMessage(transactioninterface); - return false; - } - + { + if ( PolkitClient::getAuth( AUTH_INSTALLSIGNATURE ) ) + { + QDBusReply<void> reply2 = transactioninterface->InstallSignature(type, key_id, package_id); + if(reply2.isValid()) + { + kDebug() << "install sig valid"; + return true; + } + else + { + kDebug() << "install sig not valid"; + sendErrorMessage(transactioninterface); + return false; + } + } + } + return false; } bool QPackageKitConnector::installPackages(QStringList packageIds) { - _lastAction = QString("installPackages"); - _lastActionArg = packageIds; - - QPackageKitTransactionInterface* transactioninterface = connectToInterface(); + _lastAction = QString("installPackages"); + _lastActionArg = packageIds; - if (!transactioninterface) - return false; + QPackageKitTransactionInterface* transactioninterface = connectToInterface(); - QDBusReply<void> reply = transactioninterface->InstallPackages(packageIds); - if(reply.isValid()) - { + if (!transactioninterface) + return false; - kDebug() << "install valid"; - return true; - } - else - { - kDebug() << "install not valid"; - sendErrorMessage(transactioninterface); - return false; - } + QDBusReply<void> reply = transactioninterface->InstallPackages(packageIds); + if(reply.isValid()) + { + kDebug() << "install valid"; + return true; + } + else + { + if ( PolkitClient::getAuth( AUTH_INSTALL ) ) + { + QDBusReply<void> reply2 = transactioninterface->InstallPackages(packageIds); + if(reply2.isValid()) + { + kDebug() << "install valid"; + return true; + } + else + { + kDebug() << "install not valid"; + sendErrorMessage(transactioninterface); + return false; + } + } + } + return false; } bool QPackageKitConnector::updatePackages(QStringList packageIds) @@ -560,12 +614,25 @@ kDebug() << "updatepackages valid"; return true; } - else - { - kDebug() << "updatepackages not valid"; - sendErrorMessage(transactioninterface); - return false; - } + else + { + if ( PolkitClient::getAuth( AUTH_UPDATEPACKAGE ) ) + { + QDBusReply<void> reply2 = transactioninterface->UpdatePackages(packageIds); + if(reply2.isValid()) + { + kDebug() << "updatepackages valid"; + return true; + } + else + { + kDebug() << "updatepackages not valid"; + sendErrorMessage(transactioninterface); + return false; + } + } + } + return false; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.9/VERSION.cmake new/kde4-kupdateapplet-0.8.10/VERSION.cmake --- old/kde4-kupdateapplet-0.8.9/VERSION.cmake 2008-09-29 16:03:31.000000000 +0200 +++ new/kde4-kupdateapplet-0.8.10/VERSION.cmake 2008-10-02 15:00:55.000000000 +0200 @@ -1,3 +1,3 @@ SET(VERSION_MAJOR "0") SET(VERSION_MINOR "8") -SET(VERSION_PATCH "9") +SET(VERSION_PATCH "10") ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org