Hello community,
here is the log from the commit of package kde4-kupdateapplet
checked in at Mon Nov 3 12:13:59 CET 2008.
--------
--- KDE/kde4-kupdateapplet/kde4-kupdateapplet.changes 2008-10-27 15:13:16.000000000 +0100
+++ /mounts/work_src_done/STABLE/kde4-kupdateapplet/kde4-kupdateapplet.changes 2008-10-31 15:08:48.000000000 +0100
@@ -1,0 +2,25 @@
+Fri Oct 31 14:07:27 CET 2008 - tgoettlicher@suse.de
+
+- Fixed notifications
+- V 0.8.18
+
+-------------------------------------------------------------------
+Thu Oct 30 17:19:21 CET 2008 - tgoettlicher@suse.de
+
+- Fixed dependencies
+- V 0.8.17
+
+-------------------------------------------------------------------
+Thu Oct 30 15:36:39 CET 2008 - tgoettlicher@suse.de
+
+- Improved PolicyKit getAuth call
+- V 0.8.16
+
+-------------------------------------------------------------------
+Wed Oct 29 11:23:07 CET 2008 - tgoettlicher@suse.de
+
+- Fixed error handling in packagkit plugin
+- Fixed dependencies in spec file
+- V 0.8.15
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
kde4-kupdateapplet-0.8.14.tar.bz2
New:
----
kde4-kupdateapplet-0.8.18.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kde4-kupdateapplet.spec ++++++
--- /var/tmp/diff_new_pack.U12680/_old 2008-11-03 12:13:47.000000000 +0100
+++ /var/tmp/diff_new_pack.U12680/_new 2008-11-03 12:13:47.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package kde4-kupdateapplet (Version 0.8.14)
+# spec file for package kde4-kupdateapplet (Version 0.8.18)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -24,12 +24,12 @@
License: GPL v2 only
Group: System/YaST
Summary: openSUSE System Updater Applet (KDE4)
-Version: 0.8.14
+Version: 0.8.18
Release: 1
Url: http://en.opensuse.org/KDE_Updater_Applet
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
-Requires: kupdateapplet-plugin
+Requires: kde4-kupdateapplet-plugin = 0.8.18
Requires: oxygen-icon-theme
Recommends: smolt
# last used in 11.0
@@ -96,7 +96,7 @@
Summary: packagekit plugin for KDE updater applet
Requires: PackageKit >= 0.3
Requires: PolicyKit
-Provides: kupdateapplet-plugin
+Provides: kde4-kupdateapplet-plugin = 0.8.18
%description -n kde4-kupdateapplet-packagekit
PackageKit plugin for KDE updater applet for OpenSUSE
@@ -115,7 +115,7 @@
Group: System/Packages
Summary: zypp plugin for KDE updater applet
Requires: zypper >= 0.12.11
-Provides: kupdateapplet-plugin
+Provides: kde4-kupdateapplet-plugin = 0.8.18
%description -n kde4-kupdateapplet-zypp
zypp plugin for KDE updater applet for OpenSUSE
@@ -129,6 +129,19 @@
############################
%changelog
+* Fri Oct 31 2008 tgoettlicher@suse.de
+- Fixed notifications
+- V 0.8.18
+* Thu Oct 30 2008 tgoettlicher@suse.de
+- Fixed dependencies
+- V 0.8.17
+* Thu Oct 30 2008 tgoettlicher@suse.de
+- Improved PolicyKit getAuth call
+- V 0.8.16
+* Wed Oct 29 2008 tgoettlicher@suse.de
+- Fixed error handling in packagkit plugin
+- Fixed dependencies in spec file
+- V 0.8.15
* Mon Oct 27 2008 tgoettlicher@suse.de
- Added --no-cd option to zypper backend (bnc #336211)
- Fixed missing dependency for oxygen icon theme
++++++ kde4-kupdateapplet-0.8.14.tar.bz2 -> kde4-kupdateapplet-0.8.18.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.14/kde4-kupdateapplet.spec.in new/kde4-kupdateapplet-0.8.18/kde4-kupdateapplet.spec.in
--- old/kde4-kupdateapplet-0.8.14/kde4-kupdateapplet.spec.in 2008-10-27 15:13:14.000000000 +0100
+++ new/kde4-kupdateapplet-0.8.18/kde4-kupdateapplet.spec.in 2008-10-31 15:08:46.000000000 +0100
@@ -20,7 +20,7 @@
URL: http://en.opensuse.org/KDE_Updater_Applet
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
-Requires: kupdateapplet-plugin
+Requires: kde4-kupdateapplet-plugin = @VERSION@
Requires: oxygen-icon-theme
Recommends: smolt
@@ -100,7 +100,7 @@
Summary: packagekit plugin for KDE updater applet
Requires: PackageKit >= 0.3
Requires: PolicyKit
-Provides: kupdateapplet-plugin
+Provides: kde4-kupdateapplet-plugin = @VERSION@
%description -n kde4-kupdateapplet-packagekit
PackageKit plugin for KDE updater applet for OpenSUSE
@@ -119,7 +119,7 @@
Group: System/Management
Summary: zypp plugin for KDE updater applet
Requires: zypper >= 0.12.11
-Provides: kupdateapplet-plugin
+Provides: kde4-kupdateapplet-plugin = @VERSION@
%description -n kde4-kupdateapplet-zypp
zypp plugin for KDE updater applet for OpenSUSE
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.14/package/kde4-kupdateapplet.changes new/kde4-kupdateapplet-0.8.18/package/kde4-kupdateapplet.changes
--- old/kde4-kupdateapplet-0.8.14/package/kde4-kupdateapplet.changes 2008-10-27 15:13:14.000000000 +0100
+++ new/kde4-kupdateapplet-0.8.18/package/kde4-kupdateapplet.changes 2008-10-31 15:08:46.000000000 +0100
@@ -1,4 +1,29 @@
-------------------------------------------------------------------
+Fri Oct 31 14:07:27 CET 2008 - tgoettlicher@suse.de
+
+- Fixed notifications
+- V 0.8.18
+
+-------------------------------------------------------------------
+Thu Oct 30 17:19:21 CET 2008 - tgoettlicher@suse.de
+
+- Fixed dependencies
+- V 0.8.17
+
+-------------------------------------------------------------------
+Thu Oct 30 15:36:39 CET 2008 - tgoettlicher@suse.de
+
+- Improved PolicyKit getAuth call
+- V 0.8.16
+
+-------------------------------------------------------------------
+Wed Oct 29 11:23:07 CET 2008 - tgoettlicher@suse.de
+
+- Fixed error handling in packagkit plugin
+- Fixed dependencies in spec file
+- V 0.8.15
+
+-------------------------------------------------------------------
Mon Oct 27 14:44:39 CET 2008 - tgoettlicher@suse.de
- Added --no-cd option to zypper backend (bnc #336211)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.14/src/kupdateapplet.notifyrc new/kde4-kupdateapplet-0.8.18/src/kupdateapplet.notifyrc
--- old/kde4-kupdateapplet-0.8.14/src/kupdateapplet.notifyrc 2008-10-27 15:13:14.000000000 +0100
+++ new/kde4-kupdateapplet-0.8.18/src/kupdateapplet.notifyrc 2008-10-31 15:08:46.000000000 +0100
@@ -11,37 +11,42 @@
[Event/appletmessage]
Name=A Message
-Comment=a message from the applet
-Action=PassivePopup
+Comment=A message
+Action=Popup
[Event/appletproblem]
Name=A Problem
-Comment=an error occured
-Action=PassivePopup
+Comment=An error occured
+Action=Popup
[Event/newupdates]
Name=New Updates
-Comment=New Software is available
-Action=PassivePopup
+Comment=New software is available
+Action=Popup
[Event/noupdaterepo]
Name=No Update Repo
-Comment=No Update Repo
-Action=PassivePopup
+Comment=No update repository available
+Action=Popup
[Event/newhardware]
Name=New Hardware
-Comment=New Hardware
-Action=PassivePopup
+Comment=New hardware attached
+Action=Popup
-#[Event/progress]
-#Name=Progress
-#Comment=Progress
-#Action=None
+[Event/progress]
+Name=Progress
+Comment=Progress information
+Action=None
[Event/distroupgrade]
Name=Distro Upgrade
-Comment=Distro Upgrade
-Action=PassivePopup
+Comment=Distribution upgrade available
+Action=Popup
+
+[Event/systemprofile]
+Name=System Profile
+Comment=Send your system profile
+Action=Popup
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.14/src/notification.cpp new/kde4-kupdateapplet-0.8.18/src/notification.cpp
--- old/kde4-kupdateapplet-0.8.14/src/notification.cpp 2008-10-27 15:13:14.000000000 +0100
+++ new/kde4-kupdateapplet-0.8.18/src/notification.cpp 2008-10-31 15:08:46.000000000 +0100
@@ -77,7 +77,7 @@
else if (_logics->state() == APPLET_NO_UPDATE_REPO )
{
KNotification *notification= new KNotification ( "noupdaterepo", _widget );
- notification->setText( i18n("Take part in the openSUSE community.") );
+ notification->setText( i18n("Please configure an update repository.") );
notification->setActions( QStringList( i18n( "more ..." ) ) );
connect(notification, SIGNAL(activated(unsigned int )), this , SLOT(slotPopupActivated(unsigned int)) );
notification->sendEvent();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.14/src/packagekit/pkconstants.h new/kde4-kupdateapplet-0.8.18/src/packagekit/pkconstants.h
--- old/kde4-kupdateapplet-0.8.14/src/packagekit/pkconstants.h 2008-10-27 15:13:14.000000000 +0100
+++ new/kde4-kupdateapplet-0.8.18/src/packagekit/pkconstants.h 2008-10-31 15:08:46.000000000 +0100
@@ -1,26 +1,33 @@
/*
-* Copyright (C) 2007 Adrien Bustany
+* This file is part of the QPackageKit project
+* Copyright (C) 2008 Adrien Bustany
*
-* Licensed under the GNU General Public License Version 2
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Library General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
*
-* 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.
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Library General Public License for more details.
*
+* You should have received a copy of the GNU Library General Public License
+* along with this library; see the file COPYING.LIB. If not, write to
+* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+* Boston, MA 02110-1301, USA.
*/
-#define PK_NAME "org.freedesktop.PackageKit"
-#define PK_PATH "/org/freedesktop/PackageKit"
+#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"
+#define AUTH_PACKAGE_INSTALL "org.freedesktop.packagekit.package-install"
+#define AUTH_PACKAGE_INSTALL_UNTRUSTED "org.freedesktop.packagekit.package-install-untrusted"
+#define AUTH_SYSTEM_TRUST_SIGNING_KEY "org.freedesktop.packagekit.system-trust-signing-key"
+#define AUTH_PACKAGE_EULA_ACCEPT "org.freedesktop.packagekit.package-eula-accept"
+#define AUTH_PACKAGE_REMOVE "org.freedesktop.packagekit.package-remove"
+#define AUTH_SYSTEM_UPDATE "org.freedesktop.packagekit.system-update"
+#define AUTH_SYSTEM_ROLLBACK "org.freedesktop.packagekit.system-rollback"
+#define AUTH_SYSTEM_SOURCES_CONFIGURE "org.freedesktop.packagekit.system-sources-configure"
+#define AUTH_SYSTEM_SOURCES_REFRESH "org.freedesktop.packagekit.system-sources-refresh"
+#define AUTH_SYSTEM_NETWORK_PROXY_CONFIGURE "org.freedesktop.packagekit.system-network-proxy-configure"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.14/src/packagekit/polkitclient.cpp new/kde4-kupdateapplet-0.8.18/src/packagekit/polkitclient.cpp
--- old/kde4-kupdateapplet-0.8.14/src/packagekit/polkitclient.cpp 2008-10-27 15:13:14.000000000 +0100
+++ new/kde4-kupdateapplet-0.8.18/src/packagekit/polkitclient.cpp 2008-10-31 15:08:46.000000000 +0100
@@ -1,23 +1,54 @@
+/*
+ * This file is part of the QPackageKit project
+ * Copyright (C) 2008 Adrien Bustany
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
#include
-#include
#include "polkitclient.h"
-PolkitClient::PolkitClient(QObject *parent)
- : QObject(parent)
+using namespace PackageKit;
+
+PolkitClient* PolkitClient::m_instance = NULL;
+PolkitClient* PolkitClient::instance()
{
+ if(!m_instance)
+ m_instance = new PolkitClient(qApp);
+ return m_instance;
}
-bool PolkitClient::getAuth(const QString &action)
-{
- DBusError e;
- dbus_error_init(&e);
+PolkitClient::PolkitClient(QObject *parent) : QObject(parent) {
+}
- bool auth = polkit_auth_obtain(action.toAscii().data(), 0, QCoreApplication::applicationPid(), &e);
- if(!auth)
- {
- qDebug() << "Authentification error :" << e.name << ":" << e.message;
- }
- return auth;
+bool PolkitClient::getAuth(const QString &action) {
+ DBusError e;
+ dbus_error_init(&e);
+
+ if(polkit_check_auth(QCoreApplication::applicationPid(), action.toAscii().data(), NULL))
+ return true;
+
+ bool auth = polkit_auth_obtain(action.toAscii().data(), 0, QCoreApplication::applicationPid(), &e);
+ if(!auth) {
+ qDebug() << "Authentification error :" << e.name << ":" << e.message;
+ }
+
+ return auth;
}
+#include "polkitclient.moc"
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.14/src/packagekit/polkitclient.h new/kde4-kupdateapplet-0.8.18/src/packagekit/polkitclient.h
--- old/kde4-kupdateapplet-0.8.14/src/packagekit/polkitclient.h 2008-10-27 15:13:14.000000000 +0100
+++ new/kde4-kupdateapplet-0.8.18/src/packagekit/polkitclient.h 2008-10-31 15:08:46.000000000 +0100
@@ -1,17 +1,43 @@
+/*
+ * This file is part of the QPackageKit project
+ * Copyright (C) 2008 Adrien Bustany
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
#ifndef POLKITCLIENT_H
#define POLKITCLIENT_H
#include <QtCore>
-class PolkitClient
- : QObject
-{
-Q_OBJECT
+namespace PackageKit {
+
+class PolkitClient : QObject{
+
+ Q_OBJECT
public:
- PolkitClient(QObject *parent = 0);
- static bool getAuth(const QString& action);
+ static PolkitClient* instance();
+ bool getAuth(const QString& action);
+private:
+ static PolkitClient* m_instance;
+ PolkitClient(QObject *parent = 0);
+
};
-#endif
+} // End namespace PackageKit
+#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.14/src/packagekit/qpackagekitconnector.cpp new/kde4-kupdateapplet-0.8.18/src/packagekit/qpackagekitconnector.cpp
--- old/kde4-kupdateapplet-0.8.14/src/packagekit/qpackagekitconnector.cpp 2008-10-27 15:13:14.000000000 +0100
+++ new/kde4-kupdateapplet-0.8.18/src/packagekit/qpackagekitconnector.cpp 2008-10-31 15:08:46.000000000 +0100
@@ -1,10 +1,12 @@
#include
+#include <KLocale>
#include "qpackagekitinterface.h"
#include "qpackagekittransactioninterface.h"
#include "qpackagekitconnector.h"
#include "polkitclient.h"
#include "pkconstants.h"
+#include "pkconstants.h"
QPackageKitConnector::QPackageKitConnector( QObject *parent )
: QObject( parent )
@@ -149,14 +151,14 @@
);
connect(transactioninterface,
- SIGNAL( Finished(const QString, uint ) ),
- this,
- SLOT( proxy_Finished(const QString, uint ) )
+ SIGNAL( Finished(const QString, uint ) ),
+ this,
+ SLOT( proxy_Finished(const QString, uint ) )
);
connect(transactioninterface,
- SIGNAL( Transaction(const QString &, const QString &, bool, const QString &, uint, const QString &) ),
- SLOT(proxy_Transaction(const QString &, const QString &, bool, const QString &, uint, const QString &) )
+ SIGNAL( Transaction(const QString &, const QString &, bool, const QString &, uint, const QString &) ),
+ SLOT(proxy_Transaction(const QString &, const QString &, bool, const QString &, uint, const QString &) )
);
connect(transactioninterface,
@@ -250,7 +252,7 @@
void QPackageKitConnector::sendErrorMessage(QDBusAbstractInterface* interface)
{
- emit ErrorMessage( "DBus error : "
+ emit ErrorMessage( "DBus error : "
+ interface->lastError().name() + " : "
+ interface->lastError().message() );
@@ -301,6 +303,12 @@
bool QPackageKitConnector::acceptEula(QString eulaId)
{
+ if(!PackageKit::PolkitClient::instance()->getAuth(AUTH_PACKAGE_EULA_ACCEPT))
+ {
+ emit ErrorMessage( i18n( "User is not permitted: ") + AUTH_PACKAGE_EULA_ACCEPT );
+ return false;
+ }
+
QPackageKitTransactionInterface* transactioninterface = connectToInterface();
if (!transactioninterface)
@@ -314,21 +322,9 @@
}
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;
- }
- }
+ kDebug() << "accept eula invalid";
+ sendErrorMessage(transactioninterface);
+ return false;
}
return false;
}
@@ -340,9 +336,11 @@
QPackageKitTransactionInterface* transactioninterface = connectToInterface();
+ kDebug() << "try to get updates1";
if (!transactioninterface)
return false;
- QDBusReply<void> reply = transactioninterface->GetUpdates("none"); // TODO
+ kDebug() << "try to get updates2";
+ QDBusReply<void> reply = transactioninterface->GetUpdates("none");
if(reply.isValid())
{
kDebug() << "updates replay valid";
@@ -428,13 +426,21 @@
bool QPackageKitConnector::refreshCache(bool force)
{
+ if(!PackageKit::PolkitClient::instance()->getAuth(AUTH_SYSTEM_SOURCES_REFRESH))
+ {
+ emit ErrorMessage( i18n( "User is not permitted: ") + AUTH_SYSTEM_SOURCES_REFRESH );
+ return false;
+ }
+
_lastAction = QString("refreshCache");
_lastActionArg = force;
QPackageKitTransactionInterface* transactioninterface = connectToInterface();
+ kDebug() << "try to refresh1";
if (!transactioninterface)
return false;
+ kDebug() << "try to refresh2";
QDBusReply<void> reply = transactioninterface->RefreshCache(force);
if(reply.isValid())
{
@@ -443,21 +449,9 @@
}
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;
- }
- }
+ kDebug() << "refresh replay not valid";
+ sendErrorMessage(transactioninterface);
+ return false;
}
return false;
}
@@ -488,6 +482,7 @@
QString::fromAscii(PK_DBUS_PATH),
QDBusConnection::systemBus() );
+ kDebug() << "try get a tid.";
QDBusReply<QString> tid = interface->GetTid();
if(tid.isValid())
{
@@ -526,6 +521,13 @@
bool QPackageKitConnector::installSignature(QString type, QString key_id, QString package_id)
{
+ if(!PackageKit::PolkitClient::instance()->getAuth(AUTH_SYSTEM_TRUST_SIGNING_KEY))
+ {
+ emit ErrorMessage( i18n( "User is not permitted: ") + AUTH_SYSTEM_TRUST_SIGNING_KEY );
+ return false;
+ }
+
+
QPackageKitTransactionInterface* transactioninterface = connectToInterface();
if (!transactioninterface)
@@ -540,27 +542,23 @@
}
else
{
- 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;
- }
- }
+ kDebug() << "install sig not valid";
+ sendErrorMessage(transactioninterface);
+ return false;
}
+ sendErrorMessage(transactioninterface);
return false;
}
bool QPackageKitConnector::installPackages(QStringList packageIds)
{
+ if(!PackageKit::PolkitClient::instance()->getAuth(AUTH_PACKAGE_INSTALL))
+ {
+ emit ErrorMessage( i18n( "User is not permitted: ") + AUTH_PACKAGE_INSTALL );
+ return false;
+ }
+
+
_lastAction = QString("installPackages");
_lastActionArg = packageIds;
@@ -577,27 +575,22 @@
}
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;
- }
- }
+ kDebug() << "install not valid";
+ sendErrorMessage(transactioninterface);
+ return false;
}
return false;
}
bool QPackageKitConnector::updatePackages(QStringList packageIds)
{
+ if(!PackageKit::PolkitClient::instance()->getAuth(AUTH_SYSTEM_UPDATE))
+ {
+ emit ErrorMessage( i18n( "User is not permitted: ") + AUTH_SYSTEM_UPDATE );
+ return false;
+ }
+
+
_lastAction = QString("updatePackages");
_lastActionArg = packageIds;
@@ -616,21 +609,9 @@
}
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;
- }
- }
+ kDebug() << "updatepackages not valid";
+ sendErrorMessage(transactioninterface);
+ return false;
}
return false;
}
@@ -686,7 +667,7 @@
QDBusReply<QString> reply = transactioninterface->GetRole(param);
if(reply.isValid())
{
- kDebug() << "updates replay valid: " << param << " " << reply.value();
+ kDebug() << "role replay valid: " << param << " " << reply.value();
}
else
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.14/src/rc.cpp new/kde4-kupdateapplet-0.8.18/src/rc.cpp
--- old/kde4-kupdateapplet-0.8.14/src/rc.cpp 2008-10-27 15:13:14.000000000 +0100
+++ new/kde4-kupdateapplet-0.8.18/src/rc.cpp 1970-01-01 01:00:00.000000000 +0100
@@ -1,71 +0,0 @@
-//i18n: tag string
-//i18n: file ../src/configwidgetui.ui line 21
-i18n("Check for updates every:");
-//i18n: tag string
-//i18n: file ../src/configwidgetui.ui line 31
-i18n(" Hours");
-//i18n: tag string
-//i18n: file ../src/configwidgetui.ui line 48
-i18n("Show recurring notification when updates are available every:");
-//i18n: tag string
-//i18n: file ../src/configwidgetui.ui line 58
-i18n(" Minutes");
-//i18n: tag string
-//i18n: file ../src/configwidgetui.ui line 75
-i18n("Backend:");
-//i18n: tag string
-//i18n: file ../src/configwidgetui.ui line 111
-i18n("Automa&tically start updater on login");
-//i18n: tag string
-//i18n: file ../src/configwidgetui.ui line 118
-i18n("Show available upgrades when backend provides them (for experts only)");
-//i18n: tag string
-//i18n: file ../src/configwidgetui.ui line 126
-i18n("Show notifications");
-//i18n: tag string
-//i18n: file ../src/configwidgetui.ui line 134
-i18n("Always show detailed view");
-//i18n: tag string
-//i18n: file ../src/configwidgetui.ui line 142
-i18n("Animated icon on check");
-//i18n: tag string
-//i18n: file ../src/configwidgetui.ui line 150
-i18n("Check for updates only when the system is connected to charger");
-//i18n: tag string
-//i18n: file ../src/configwidgetui.ui line 157
-i18n("Check for updates only when the system is under low load");
-//i18n: tag string
-//i18n: file ../src/configwidgetui.ui line 164
-i18n("Search for drivers when new hardware is attached");
-//i18n: tag label
-i18n("How often to check for updates.");
-//i18n: tag label
-i18n("How often show recurring warning when updates are available.");
-//i18n: tag label
-i18n("Automatically start the applet on login");
-//i18n: tag label
-i18n("The backend for connecting to package database.");
-//i18n: tag label
-i18n("Show available upgrades (for experts only).");
-//i18n: tag label
-i18n("Show notifications.");
-//i18n: tag label
-i18n("Always show detailed view.");
-//i18n: tag label
-i18n("Show animated tray icon on check.");
-//i18n: tag label
-i18n("Last check for updates.");
-//i18n: tag label
-i18n("Last check for distro updates.");
-//i18n: tag label
-i18n("Last applet state.");
-//i18n: tag label
-i18n("System's maximum load when checking for updates");
-//i18n: tag label
-i18n("Check for updates only when the system is under low load");
-//i18n: tag label
-i18n("Check for updates only when the system is connected to charger");
-//i18n: tag label
-i18n("Search for drivers when new hardware is attached");
-//i18n: tag label
-i18n("Show popup to send system profile next time");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kde4-kupdateapplet-0.8.14/VERSION.cmake new/kde4-kupdateapplet-0.8.18/VERSION.cmake
--- old/kde4-kupdateapplet-0.8.14/VERSION.cmake 2008-10-27 15:13:14.000000000 +0100
+++ new/kde4-kupdateapplet-0.8.18/VERSION.cmake 2008-10-31 15:08:46.000000000 +0100
@@ -1,3 +1,3 @@
SET(VERSION_MAJOR "0")
SET(VERSION_MINOR "8")
-SET(VERSION_PATCH "14")
+SET(VERSION_PATCH "18")
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org