[PackageKit-commit] packagekit: Branch 'master' - 19 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Fri Nov 14 00:45:07 PST 2008
RELEASE | 16 +-
backends/conary/pk-backend-conary.c | 2
backends/yum/pk-backend-yum.c | 2
backends/yum/yumBackend.py | 93 ++++++++++++----
backends/yum/yumComps.py | 38 +++---
backends/zypp/zypp-events.h | 6 -
client/pk-tools-common.c | 10 +
configure.ac | 2
lib/packagekit-glib/pk-client.c | 10 -
lib/packagekit-qt/src/CMakeLists.txt | 7 +
lib/packagekit-qt/src/config.h.cmake | 1
lib/python/packagekit/client.py | 130 +++++++++++++----------
po/it.po | 192 ++++++++++++++++++-----------------
src/pk-transaction.c | 67 +++++-------
14 files changed, 333 insertions(+), 243 deletions(-)
New commits:
commit 0cd77f708b6996439745cc5489cf9121ec8dba07
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Nov 14 08:38:37 2008 +0000
trivial: make the error messages more clear when we fail a transaction
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 590ab8b..a207833 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -1427,7 +1427,7 @@ pk_transaction_cancel (PkTransaction *transaction, GError **error)
if (transaction->priv->backend->desc->cancel == NULL) {
egg_debug ("Not implemented yet: Cancel");
g_set_error (error, PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "Cancel not yet supported by backend");
return FALSE;
}
@@ -1479,7 +1479,7 @@ pk_transaction_download_packages (PkTransaction *transaction, gchar **package_id
/* not implemented yet */
if (transaction->priv->backend->desc->download_packages == NULL) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "DownloadPackages not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -1568,7 +1568,7 @@ pk_transaction_get_categories (PkTransaction *transaction, DBusGMethodInvocation
/* not implemented yet */
if (transaction->priv->backend->desc->get_categories == NULL) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "GetCategories not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -1629,7 +1629,7 @@ pk_transaction_get_depends (PkTransaction *transaction, const gchar *filter, gch
if (transaction->priv->backend->desc->get_depends == NULL) {
egg_debug ("Not implemented yet: GetDepends");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "GetDepends not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -1706,7 +1706,7 @@ pk_transaction_get_details (PkTransaction *transaction, gchar **package_ids, DBu
if (transaction->priv->backend->desc->get_details == NULL) {
egg_debug ("Not implemented yet: GetDetails");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "GetDetails not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -1770,7 +1770,7 @@ pk_transaction_get_distro_upgrades (PkTransaction *transaction, DBusGMethodInvoc
if (transaction->priv->backend->desc->get_distro_upgrades == NULL) {
egg_debug ("Not implemented yet: GetDistroUpgrades");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "GetDistroUpgrades not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -1825,7 +1825,7 @@ pk_transaction_get_files (PkTransaction *transaction, gchar **package_ids, DBusG
if (transaction->priv->backend->desc->get_files == NULL) {
egg_debug ("Not implemented yet: GetFiles");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "GetFiles not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -1889,7 +1889,7 @@ pk_transaction_get_packages (PkTransaction *transaction, const gchar *filter, DB
if (transaction->priv->backend->desc->get_packages == NULL) {
egg_debug ("Not implemented yet: GetPackages");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "GetPackages not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -2006,7 +2006,7 @@ pk_transaction_get_repo_list (PkTransaction *transaction, const gchar *filter, D
if (transaction->priv->backend->desc->get_repo_list == NULL) {
egg_debug ("Not implemented yet: GetRepoList");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "GetRepoList not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -2070,7 +2070,7 @@ pk_transaction_get_requires (PkTransaction *transaction, const gchar *filter, gc
if (transaction->priv->backend->desc->get_requires == NULL) {
egg_debug ("Not implemented yet: GetRequires");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "GetRequires not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -2199,7 +2199,7 @@ pk_transaction_get_update_detail (PkTransaction *transaction, gchar **package_id
if (transaction->priv->backend->desc->get_update_detail == NULL) {
egg_debug ("Not implemented yet: GetUpdateDetail");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "GetUpdateDetail not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -2313,7 +2313,7 @@ pk_transaction_get_updates (PkTransaction *transaction, const gchar *filter, DBu
if (transaction->priv->backend->desc->get_updates == NULL) {
egg_debug ("Not implemented yet: GetUpdates");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "GetUpdates not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -2410,7 +2410,7 @@ pk_transaction_install_files (PkTransaction *transaction, gboolean trusted,
/* not implemented yet */
if (transaction->priv->backend->desc->install_files == NULL) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "InstallFiles not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -2504,7 +2504,7 @@ pk_transaction_install_packages (PkTransaction *transaction, gchar **package_ids
/* not implemented yet */
if (transaction->priv->backend->desc->install_packages == NULL) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "InstallPackages not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -2572,12 +2572,12 @@ pk_transaction_install_signature (PkTransaction *transaction, const gchar *sig_t
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != NULL);
- egg_debug ("method called: %s, %s", key_id, package_id);
+ egg_debug ("InstallSignature method called: %s, %s", key_id, package_id);
/* not implemented yet */
if (transaction->priv->backend->desc->install_signature == NULL) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "InstallSignature not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -2672,7 +2672,7 @@ pk_transaction_refresh_cache (PkTransaction *transaction, gboolean force, DBusGM
/* not implemented yet */
if (transaction->priv->backend->desc->refresh_cache == NULL) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "RefreshCache not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -2739,7 +2739,7 @@ pk_transaction_remove_packages (PkTransaction *transaction, gchar **package_ids,
/* not implemented yet */
if (transaction->priv->backend->desc->remove_packages == NULL) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "RemovePackages not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -2812,7 +2812,7 @@ pk_transaction_repo_enable (PkTransaction *transaction, const gchar *repo_id, gb
/* not implemented yet */
if (transaction->priv->backend->desc->repo_enable == NULL) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "RepoEnable not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -2884,7 +2884,7 @@ pk_transaction_repo_set_data (PkTransaction *transaction, const gchar *repo_id,
/* not implemented yet */
if (transaction->priv->backend->desc->repo_set_data == NULL) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "RepoSetData not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -2962,7 +2962,7 @@ pk_transaction_resolve (PkTransaction *transaction, const gchar *filter,
if (transaction->priv->backend->desc->resolve == NULL) {
egg_debug ("Not implemented yet: Resolve");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "Resolve not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -3036,7 +3036,7 @@ pk_transaction_rollback (PkTransaction *transaction, const gchar *transaction_id
/* not implemented yet */
if (transaction->priv->backend->desc->rollback == NULL) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "Rollback not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -3107,7 +3107,7 @@ pk_transaction_search_details (PkTransaction *transaction, const gchar *filter,
if (transaction->priv->backend->desc->search_details == NULL) {
egg_debug ("Not implemented yet: SearchDetails");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "SearchDetails not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -3177,7 +3177,7 @@ pk_transaction_search_file (PkTransaction *transaction, const gchar *filter,
if (transaction->priv->backend->desc->search_file == NULL) {
egg_debug ("Not implemented yet: SearchFile");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "SearchFile not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -3247,7 +3247,7 @@ pk_transaction_search_group (PkTransaction *transaction, const gchar *filter,
if (transaction->priv->backend->desc->search_group == NULL) {
egg_debug ("Not implemented yet: SearchGroup");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "SearchGroup not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -3317,7 +3317,7 @@ pk_transaction_search_name (PkTransaction *transaction, const gchar *filter,
if (transaction->priv->backend->desc->search_name == NULL) {
egg_debug ("Not implemented yet: SearchName");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "SearchName not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -3410,7 +3410,7 @@ pk_transaction_update_packages (PkTransaction *transaction, gchar **package_ids,
/* not implemented yet */
if (transaction->priv->backend->desc->update_packages == NULL) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "UpdatePackages not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -3481,7 +3481,7 @@ pk_transaction_update_system (PkTransaction *transaction, DBusGMethodInvocation
/* not implemented yet */
if (transaction->priv->backend->desc->update_system == NULL) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "UpdateSystem not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
@@ -3550,7 +3550,7 @@ pk_transaction_what_provides (PkTransaction *transaction, const gchar *filter, c
if (transaction->priv->backend->desc->what_provides == NULL) {
egg_debug ("Not implemented yet: WhatProvides");
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_NOT_SUPPORTED,
- "Operation not yet supported by backend");
+ "WhatProvides not yet supported by backend");
pk_transaction_release_tid (transaction);
dbus_g_method_return_error (context, error);
return;
commit facc17b64b87c0a28741f41c10743254c72c0f86
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Nov 14 08:37:39 2008 +0000
bugfix: add GetDistroUpgrades to pk_client_requeue as this may be required with a repo signature
diff --git a/lib/packagekit-glib/pk-client.c b/lib/packagekit-glib/pk-client.c
index e6d04c4..b3cce8a 100644
--- a/lib/packagekit-glib/pk-client.c
+++ b/lib/packagekit-glib/pk-client.c
@@ -3677,6 +3677,8 @@ pk_client_requeue (PkClient *client, GError **error)
ret = pk_client_get_repo_list (client, priv->cached_filters, error);
else if (priv->role == PK_ROLE_ENUM_GET_CATEGORIES)
ret = pk_client_get_categories (client, error);
+ else if (priv->role == PK_ROLE_ENUM_GET_DISTRO_UPGRADES)
+ ret = pk_client_get_distro_upgrades (client, error);
else {
pk_client_error_set (error, PK_CLIENT_ERROR_ROLE_UNKNOWN, "role unknown for reque");
return FALSE;
commit 9c25a0936c3c5127664496ad071409b9673b3e35
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Nov 14 08:31:16 2008 +0000
bugfix: when we do pkcon update, don't attempt to do what-provides if it's not implemented
diff --git a/client/pk-tools-common.c b/client/pk-tools-common.c
index 659e9ba..282e70b 100644
--- a/client/pk-tools-common.c
+++ b/client/pk-tools-common.c
@@ -38,9 +38,15 @@ pk_console_resolve (PkBitfield filter, const gchar *package, GError **error)
gboolean ret;
guint length;
PkPackageList *list = NULL;
+ PkControl *control;
PkClient *client;
gchar **packages;
GError *error_local = NULL;
+ PkBitfield roles;
+
+ /* get roles supported */
+ control = pk_control_new ();
+ roles = pk_control_get_actions (control, NULL);
/* get new client */
client = pk_client_new ();
@@ -62,9 +68,8 @@ pk_console_resolve (PkBitfield filter, const gchar *package, GError **error)
length = pk_package_list_get_size (list);
/* didn't resolve to anything, try to get a provide */
- if (length == 0) {
+ if (length == 0 && pk_bitfield_contain (roles, PK_ROLE_ENUM_WHAT_PROVIDES)) {
- /* nothing contains */
g_object_unref (list);
list = NULL;
@@ -87,6 +92,7 @@ pk_console_resolve (PkBitfield filter, const gchar *package, GError **error)
list = pk_client_get_package_list (client);
}
out:
+ g_object_unref (control);
g_object_unref (client);
return list;
}
commit 933fd5ac9f8befc03a54cded23e5ee562707be9c
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Nov 14 08:08:16 2008 +0000
trivial: fix the ordering in conaryBackend option struct
diff --git a/backends/conary/pk-backend-conary.c b/backends/conary/pk-backend-conary.c
index ece06c7..d09af36 100644
--- a/backends/conary/pk-backend-conary.c
+++ b/backends/conary/pk-backend-conary.c
@@ -298,8 +298,8 @@ PK_BACKEND_OPTIONS (
NULL, /* repo_enable */
NULL, /* repo_set_data */
backend_resolve, /* resolve */
- NULL, /* search_details */
NULL, /* rollback */
+ NULL, /* search_details */
NULL, /* search_file */
NULL, /* search_group */
backend_search_name, /* search_name */
commit e208b60ddc608e7e4fd8a031e144547cb46f02a5
Merge: 5670dcf... 931c942...
Author: sebastian Heinlein <devel at glatzor.de>
Date: Fri Nov 14 06:12:33 2008 +0100
Merge branch 'master' of git+ssh://glatzor@git.packagekit.org/srv/git/PackageKit
commit 5670dcf0721b289b8d66a45f303ecedda1cbc02e
Author: sebastian Heinlein <devel at glatzor.de>
Date: Fri Nov 14 06:11:41 2008 +0100
Python client: don't use CamelStyle for methods
diff --git a/lib/python/packagekit/client.py b/lib/python/packagekit/client.py
index 078e41f..51fa676 100644
--- a/lib/python/packagekit/client.py
+++ b/lib/python/packagekit/client.py
@@ -160,27 +160,27 @@ class PackageKitTransaction:
raise PackageKitError(self._error_enum, self._error_desc)
return self.result
- def SetLocale(self, code):
+ def set_locale(self, code):
'''Set the language to the given locale code'''
return self._iface.SetLocale(code)
- def Cancel(self):
+ def cancel(self):
'''Cancel the transaction'''
return self._iface.Cancel()
- def GetStatus(self):
+ def get_status(self):
'''Get the status of the transaction'''
return self._status
- def GetProgress(self):
+ def get_progress(self):
'''Get the progress of the transaction'''
return self._iface.GetProgress()
- def GetFinishedState(self):
+ def get_finished_state(self):
'''Return the finished status'''
return self._finished_status
- def IsCallerActive(self):
+ def is_caller_active(self):
'''
This method allows us to find if the original caller of the method is
still connected to the session bus. This is usually an indication that
@@ -212,7 +212,7 @@ class PackageKitClient:
self.bus = dbus.SystemBus()
self._locale = locale.getdefaultlocale()[0]
- def SuggestDaemonQuit(self):
+ def suggest_daemon_quit(self):
'''Ask the PackageKit daemon to shutdown.'''
try:
self.pk_control.SuggestDaemonQuit()
@@ -220,59 +220,59 @@ class PackageKitClient:
# not initialized, or daemon timed out
pass
- def Resolve(self, filters, names, exit_handler=None):
+ def resolve(self, filters, names, exit_handler=None):
'''Resolve package names'''
names_list = self._to_list(names)
return self._run_transaction("Resolve", [filters, names_list],
exit_handler)
- def GetDetails(self, packages, exit_handler=None):
+ def get_details(self, packages, exit_handler=None):
'''Get details about the given packages'''
package_ids = self._to_package_id_list(packages)
return self._run_transaction("GetDetails", [package_ids],
exit_handler)
- def SearchName(self, filters, search, exit_handler=None):
+ def search_name(self, filters, search, exit_handler=None):
'''Search for packages by name'''
return self._run_transaction("SearchName", [filters, search],
exit_handler)
- def SearchGroup(self, filters, search, exit_handler=None):
+ def search_group(self, filters, search, exit_handler=None):
'''Search for packages by their group'''
return self._run_transaction("SearchGroup", [filters, search],
exit_handler)
- def SearchDetails(self, filters, search, exit_handler=None):
+ def search_details(self, filters, search, exit_handler=None):
'''Search for packages by their details'''
return self._run_transaction("SearchDetails", [filters],
exit_handler)
- def SearchFile(self, filters, search, exit_handler=None):
+ def search_file(self, filters, search, exit_handler=None):
'''Search for packages by their files'''
return self._run_transaction("SearchFile", [filters],
exit_handler)
- def InstallPackages(self, packages, exit_handler=None):
+ def install_packages(self, packages, exit_handler=None):
'''Install the packages of the given package ids'''
package_ids = self._to_package_id_list(packages)
return self._run_transaction("InstallPackages", [package_ids],
exit_handler)
- def UpdatePackages(self, packages, exit_handler=None):
+ def update_packages(self, packages, exit_handler=None):
'''Update the packages of the given package ids'''
package_ids = self._to_package_id_list(packages)
return self._run_transaction("UpdatePackages", [package_ids],
exit_handler)
- def RemovePackages(self, packages, allow_deps=False, auto_remove=True,
- exit_handler=None):
+ def remove_packages(self, packages, allow_deps=False, auto_remove=True,
+ exit_handler=None):
'''Remove the packages of the given package ids'''
package_ids = self._to_package_id_list(packages)
return self._run_transaction("RemovePackages",
[package_ids, allow_deps, auto_remove],
exit_handler)
- def RefreshCache(self, force=False, exit_handler=None):
+ def refresh_cache(self, force=False, exit_handler=None):
'''
Refresh the cache, i.e. download new metadata from a
remote URL so that package lists are up to date. This action
@@ -281,11 +281,11 @@ class PackageKitClient:
'''
return self._run_transaction("RefreshCache", (force,), exit_handler)
- def GetRepoList(self, filters=FILTER_NONE, exit_handler=None):
+ def get_repo_list(self, filters=FILTER_NONE, exit_handler=None):
'''Get the repositories'''
return self._run_transaction("GetRepoList", (filters,), exit_handler)
- def RepoEnable(self, repo_id, enabled):
+ def repo_enable(self, repo_id, enabled):
'''
Enable the repository specified.
repo_id is a repository identifier, e.g. fedora-development-debuginfo
@@ -294,7 +294,7 @@ class PackageKitClient:
return self._run_transaction("RepoEnable", (repo_id, enabled),
exit_handler)
- def GetUpdates(self, filters=FILTER_NONE, exit_handler=None):
+ def get_updates(self, filters=FILTER_NONE, exit_handler=None):
'''
This method should return a list of packages that are installed and
are upgradable.
@@ -303,88 +303,88 @@ class PackageKitClient:
'''
return self._run_transaction("GetUpdates", [filters], exit_handler)
- def GetCategories(self, exit_handler=None):
+ def get_categories(self, exit_handler=None):
'''Return available software categories'''
return self._run_transaction("GetCategories", [], exit_handler)
- def GetPackages(self, filters=FILTER_NONE, exit_handler=None):
+ def get_packages(self, filters=FILTER_NONE, exit_handler=None):
'''Return all packages'''
return self._run_transaction("GetUpdates", [filters], exit_handler)
- def UpdateSystem(self, exit_handler=None):
+ def update_system(self, exit_handler=None):
'''Update the system'''
return self._run_transaction("UpdateSystem", [], exit_handler)
- def DownloadPackages(self, packages, exit_handler=None):
+ def download_packages(self, packages, exit_handler=None):
'''Download package files'''
package_ids = self._to_package_id_list(packages)
return self._run_transaction("DownloadPackages", [package_ids], exit_handler)
- def GetDepends(self, filters, packages, recursive=False,
- exit_handler=None):
+ def get_depends(self, filters, packages, recursive=False,
+ exit_handler=None):
'''Search for dependencies for packages'''
package_ids = self._to_package_id_list(packages)
return self._run_transaction("GetDepends",
[filters, package_ids, recursive],
exit_handler)
- def GetFiles(self, packages, exit_handler=None):
+ def get_files(self, packages, exit_handler=None):
'''Get files of the given packages'''
package_ids = self._to_package_id_list(packages)
return self._run_transaction("GetFiles", [package_ids], exit_handler)
- def GetRequires(self, filters, packages, recursive=False,
- exit_handler=None):
+ def get_requires(self, filters, packages, recursive=False,
+ exit_handler=None):
'''Search for requirements for packages'''
package_ids = self._to_package_id_list(packages)
return self._run_transaction("GetRequires",
[filters, package_ids, recursive],
exit_handler)
- def GetUpdateDetail(self, packages, exit_handler=None):
+ def get_update_detail(self, packages, exit_handler=None):
'''Get details for updates'''
package_ids = self._to_package_id_list(packages)
return self._run_transaction("GetUpdateDetail", [package_ids],
exit_handler)
- def GetDistroUpgrades(self, exit_handler=None):
+ def get_distro_upgrades(self, exit_handler=None):
'''Query for later distribution releases'''
return self._run_transaction("GetDistroUpgrades", [],
exit_handler)
- def InstallFiles(self, trusted, files, exit_handler=None):
+ def install_files(self, trusted, files, exit_handler=None):
'''Install the given local packages'''
return self._run_transaction("InstallFiles", [trusted, files],
exit_handler)
- def InstallSignature(self, sig_type, key_id, package_id,
- exit_handler=None):
+ def install_signature(self, sig_type, key_id, package_id,
+ exit_handler=None):
'''Install packages signing keys used to validate packages'''
return self._run_transaction("InstallSignature",
[sig_type, key_id, package_id],
exit_handler)
- def RepoSetData(self, repo_id, parameter, value, exit_handler=None):
+ def set_repo_data(self, repo_id, parameter, value, exit_handler=None):
'''Change custom parameter of a repository'''
return self._run_transaction("RepoSetData",
[repo_id, parameter, value],
exit_handler)
- def Rollback(self, transaction_id, exit_handler=None):
+ def rollback(self, transaction_id, exit_handler=None):
'''Roll back to a previous transaction'''
return self._run_transaction("Rollback", [transaction_id],
exit_handler)
- def WhatProvides(self, provides, search, exit_handler=None):
+ def what_provides(self, provides, search, exit_handler=None):
'''Search for packages that provide the supplied attributes'''
return self._run_transaction("WhatProvides", [provides, search],
exit_handler)
- def SetLocale(self, code):
+ def set_locale(self, code):
'''Set the language of the client'''
self._locale = code
- def AcceptEula(self, eula_id, exit_handler=None):
+ def accept_eula(self, eula_id, exit_handler=None):
'''Accept the given end user licence aggreement'''
return self._run_transaction("AcceptEula", [eula_id], exit_handler)
commit 931c9426eefe902d98593eefae449f00230e778e
Author: Adrien BUSTANY <madcat at mymadcat.com>
Date: Thu Nov 13 18:10:42 2008 +0100
Add a config.h to allow disabling polkit
diff --git a/lib/packagekit-qt/src/CMakeLists.txt b/lib/packagekit-qt/src/CMakeLists.txt
index 289ebb0..dea923c 100644
--- a/lib/packagekit-qt/src/CMakeLists.txt
+++ b/lib/packagekit-qt/src/CMakeLists.txt
@@ -4,6 +4,13 @@ project(packagekit-qt)
include(FindPkgConfig)
pkg_check_modules(POLKIT polkit-dbus)
+if(POLKIT_FOUND)
+ set(USE_SECURITY_POLKIT 1)
+else(POLKIT_FOUND)
+ set(USE_SECURITY_POLKIT 0)
+endif(POLKIT_FOUND)
+configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+
include_directories(
${QT_INCLUDES}
${POLKIT_INCLUDE_DIRS}
diff --git a/lib/packagekit-qt/src/config.h.cmake b/lib/packagekit-qt/src/config.h.cmake
new file mode 100644
index 0000000..b1114da
--- /dev/null
+++ b/lib/packagekit-qt/src/config.h.cmake
@@ -0,0 +1 @@
+#cmakedefine USE_SECURITY_POLKIT
commit d484a292dd291deafe956bd54009f18de8661937
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Nov 13 11:01:49 2008 +0000
bugfix: make sure the repos are setup before we run any command else yum does odd things when the repo is not setup
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index c2b7d2b..6c6db3d 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1943,6 +1943,12 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
repo.metadata_expire = 60 * 60 * 1.5 # 1.5 hours, the default
repo.mdpolicy = "group:primary"
+ # make sure repos are set up
+ try:
+ self.yumbase.repos.doSetup()
+ except yum.Errors.RepoError, e:
+ self.error(ERROR_NO_CACHE, _to_unicode(e))
+
def _refresh_yum_cache(self):
self.status(STATUS_REFRESH_CACHE)
old_cache_setting = self.yumbase.conf.cache
commit c9fbcf5248e8717f95096a0246ec59783e1607ca
Author: Richard Hughes <richard at hughsie.com>
Date: Thu Nov 13 11:01:01 2008 +0000
bugfix: allow single charicter package names
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 7c85c60..590ab8b 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -1240,11 +1240,6 @@ pk_transaction_search_check (const gchar *search, GError **error)
"Invalid search containing '?'");
return FALSE;
}
- if (size < 2) {
- *error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_SEARCH_INVALID,
- "The search string length is too small");
- return FALSE;
- }
if (size == 1024) {
*error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_SEARCH_INVALID,
"The search string length is too large");
commit fcd4688b80acc5c90f4cb6bec5e30d5a864e4f89
Author: Francesco Tombolini <tombo at adamantio.net>
Date: Thu Nov 13 05:52:30 2008 +0000
Updated italian translation
Transmitted-via: Transifex (translate.fedoraproject.org)
diff --git a/po/it.po b/po/it.po
index 66d7820..c27a091 100644
--- a/po/it.po
+++ b/po/it.po
@@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: packagekit.master.it\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-10-19 02:08+0000\n"
-"PO-Revision-Date: 2008-10-23 20:57+0200\n"
+"POT-Creation-Date: 2008-10-28 13:38+0000\n"
+"PO-Revision-Date: 2008-11-13 06:50+0100\n"
"Last-Translator: Francesco Tombolini <tombo at adamantio.net>\n"
"Language-Team: Italiano <fedora-trans-it at redhat.com>\n"
"MIME-Version: 1.0\n"
@@ -36,240 +36,246 @@ msgstr "Si prega di eseguire il logout ed il login per completare l'aggiornament
msgid "Please restart the application as it is being used."
msgstr "Si prega di riavviare l'applicazione in uso."
+#. TRANSLATORS: The package is already installed on the system
+#: ../client/pk-console.c:580
+#, c-format
+msgid "The package '%s' is already installed"
+msgstr "Il pacchetto '%s' è già installato"
+
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:553
+#: ../client/pk-console.c:588
#, c-format
msgid "The package '%s' could not be installed: %s"
msgstr "Il pacchetto '%s' non può essere installato: %s"
#. TRANSLATORS: There was a programming error that shouldn't happen. The detailed error follows
-#: ../client/pk-console.c:578 ../client/pk-console.c:605
-#: ../client/pk-console.c:701 ../client/pk-console.c:818
-#: ../client/pk-tools-common.c:48 ../client/pk-tools-common.c:58
-#: ../client/pk-tools-common.c:76 ../client/pk-tools-common.c:83
+#: ../client/pk-console.c:613 ../client/pk-console.c:640
+#: ../client/pk-console.c:736 ../client/pk-console.c:853
+#: ../client/pk-tools-common.c:55 ../client/pk-tools-common.c:74
+#: ../client/pk-tools-common.c:81
#, c-format
msgid "Internal error: %s"
msgstr "Errore interno: %s"
#. TRANSLATORS: There was an error installing the packages. The detailed error follows
-#: ../client/pk-console.c:586
+#: ../client/pk-console.c:621
#, c-format
msgid "This tool could not install the packages: %s"
msgstr "Questo strumento non può installare i pacchetti: %s"
#. TRANSLATORS: There was an error installing the files. The detailed error follows
-#: ../client/pk-console.c:613
+#: ../client/pk-console.c:648
#, c-format
msgid "This tool could not install the files: %s"
msgstr "Questo strumento non può installare i file: %s"
#. TRANSLATORS: The package name was not found in the installed list. The detailed error follows
-#: ../client/pk-console.c:669
+#: ../client/pk-console.c:704
#, c-format
msgid "This tool could not remove '%s': %s"
msgstr "Questo strumento non può rimuovere '%s': %s"
#. TRANSLATORS: There was an error removing the packages. The detailed error follows
-#: ../client/pk-console.c:692 ../client/pk-console.c:763
+#: ../client/pk-console.c:727 ../client/pk-console.c:798
#, c-format
msgid "This tool could not remove the packages: %s"
msgstr "Questo strumento non può rimuovere i pacchetti: %s"
#. TRANSLATORS: There was an error removing the packages. The detailed error follows
-#: ../client/pk-console.c:730
+#: ../client/pk-console.c:765
#, c-format
msgid "This tool could not remove the packages: '%s'"
msgstr "Questo strumento non può rimuovere i pacchetti: '%s'"
#. TRANSLATORS: When removing, we might have to remove other dependencies
-#: ../client/pk-console.c:742
+#: ../client/pk-console.c:777
msgid "The following packages have to be removed:"
msgstr "I seguenti pacchetti devono essere rimossi:"
#. TRANSLATORS: We are checking if it's okay to remove a list of packages
-#: ../client/pk-console.c:749
+#: ../client/pk-console.c:784
msgid "Proceed removing additional packages?"
msgstr "Si conferma la rimozione dei pacchetti aggiuntivi?"
#. TRANSLATORS: We did not remove any packages
-#: ../client/pk-console.c:754
+#: ../client/pk-console.c:789
msgid "The package removal was canceled!"
msgstr "La rimozione dei pacchetti è stata annullata!"
#. TRANSLATORS: The package name was not found in any software sources
-#: ../client/pk-console.c:795
+#: ../client/pk-console.c:830
#, c-format
msgid "This tool could not download the package '%s' as it could not be found"
msgstr "Questo strumento non può scaricare il pacchetto '%s' poiché non si trova"
#. TRANSLATORS: Could not download the packages for some reason. The detailed error follows
-#: ../client/pk-console.c:826
+#: ../client/pk-console.c:861
#, c-format
msgid "This tool could not download the packages: %s"
msgstr "Questo strumento non può scaricare i pacchetti: %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:853 ../client/pk-console.c:862
+#: ../client/pk-console.c:888 ../client/pk-console.c:897
#, c-format
msgid "This tool could not update '%s': %s"
msgstr "Questo strumento non può aggiornare '%s': %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:884 ../client/pk-console.c:892
+#: ../client/pk-console.c:919 ../client/pk-console.c:927
#, c-format
msgid "This tool could not get the requirements for '%s': %s"
msgstr "Questo strumento non può soddisfare i requisiti per '%s': %s"
#. TRANSLATORS: There was an error getting the dependencies for the package. The detailed error follows
-#: ../client/pk-console.c:914 ../client/pk-console.c:922
+#: ../client/pk-console.c:949 ../client/pk-console.c:957
#, c-format
msgid "This tool could not get the dependencies for '%s': %s"
msgstr "Questo strumento non può soddisfare le dipendenze per '%s': %s"
#. TRANSLATORS: There was an error getting the details about the package. The detailed error follows
-#: ../client/pk-console.c:944 ../client/pk-console.c:952
+#: ../client/pk-console.c:979 ../client/pk-console.c:987
#, c-format
msgid "This tool could not get package details for '%s': %s"
msgstr "Questo strumento non può ottenere i dettagli del pacchetto per '%s': %s"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:974
+#: ../client/pk-console.c:1009
#, c-format
msgid "This tool could not find the files for '%s': %s"
msgstr "Questo strumento non può trovare i file per '%s': %s"
#. TRANSLATORS: There was an error getting the list of files for the package. The detailed error follows
-#: ../client/pk-console.c:982
+#: ../client/pk-console.c:1017
#, c-format
msgid "This tool could not get the file list for '%s': %s"
msgstr "Questo strumento non può ottenere l'elenco dei file per '%s': %s"
#. TRANSLATORS: The package name was not found in any software sources. The detailed error follows
-#: ../client/pk-console.c:1004
+#: ../client/pk-console.c:1039
#, c-format
msgid "This tool could not find the update details for '%s': %s"
msgstr "Questo strumento non può trovare i dettagli di aggiornamento per '%s': %s"
#. TRANSLATORS: There was an error getting the details about the update for the package. The detailed error follows
-#: ../client/pk-console.c:1012
+#: ../client/pk-console.c:1047
#, c-format
msgid "This tool could not get the update details for '%s': %s"
msgstr "Questo strumento non può ottenere i dettagli di aggiornamento per '%s': %s"
#. TRANSLATORS: This was an unhandled error, and we don't have _any_ context
-#: ../client/pk-console.c:1058
+#: ../client/pk-console.c:1093
msgid "Error:"
msgstr "Errore:"
#. TRANSLATORS: This a list of details about the package
-#: ../client/pk-console.c:1072
+#: ../client/pk-console.c:1107
msgid "Package description"
msgstr "Descrizione del pacchetto"
#. TRANSLATORS: This a list files contained in the package
-#: ../client/pk-console.c:1105
+#: ../client/pk-console.c:1140
msgid "Package files"
msgstr "File del pacchetto"
#. TRANSLATORS: This where the package has no files
-#: ../client/pk-console.c:1114
+#: ../client/pk-console.c:1149
msgid "No files"
msgstr "Nessun file"
#. TRANSLATORS: This a request for a GPG key signature from the backend, which the client will prompt for later
-#: ../client/pk-console.c:1137
+#: ../client/pk-console.c:1172
msgid "Repository signature required"
msgstr "Firma del repository necessaria"
#. TRANSLATORS: This a prompt asking the user to import the security key
-#: ../client/pk-console.c:1147
-msgid "You you accept this signature?"
-msgstr "Si accetta questa firma?"
+#: ../client/pk-console.c:1182
+msgid "Do you accept this signature?"
+msgstr "Accettare questa firma?"
#. TRANSLATORS: This is where the user declined the security key
-#: ../client/pk-console.c:1151
+#: ../client/pk-console.c:1186
msgid "The signature was not accepted."
msgstr "La firma non è stata accettata."
#. TRANSLATORS: This a request for a EULA
-#: ../client/pk-console.c:1185
+#: ../client/pk-console.c:1220
msgid "End user license agreement required"
msgstr "Accordo di licenza per l'utente finale necessario"
#. TRANSLATORS: This a prompt asking the user to agree to the license
-#: ../client/pk-console.c:1192
+#: ../client/pk-console.c:1227
msgid "Do you agree to this license?"
msgstr "Si è d'accordo con questa licenza?"
#. TRANSLATORS: This is where the user declined the license
-#: ../client/pk-console.c:1196
+#: ../client/pk-console.c:1231
msgid "The license was refused."
msgstr "La licenza è stata rifiutata."
#. TRANSLATORS: This is when the daemon crashed, and we are up shit creek without a paddle
-#: ../client/pk-console.c:1225
+#: ../client/pk-console.c:1260
msgid "The daemon crashed mid-transaction!"
msgstr "Il demone e' andato in crash a metà transazione!"
#. TRANSLATORS: This is the header to the --help menu
-#: ../client/pk-console.c:1278
+#: ../client/pk-console.c:1313
msgid "PackageKit Console Interface"
msgstr "PackageKit Console Interface"
-#: ../client/pk-console.c:1278
+#: ../client/pk-console.c:1313
msgid "Subcommands:"
msgstr "Sottocomandi:"
-#: ../client/pk-console.c:1369 ../client/pk-generate-pack.c:138
+#: ../client/pk-console.c:1404 ../client/pk-generate-pack.c:183
#: ../client/pk-monitor.c:115 ../src/pk-main.c:196
msgid "Show extra debugging information"
msgstr "Mostrare informazioni extra di debugging"
-#: ../client/pk-console.c:1371 ../client/pk-monitor.c:117
+#: ../client/pk-console.c:1406 ../client/pk-monitor.c:117
msgid "Show the program version and exit"
msgstr "Mostrare la versione del programma ed uscire"
-#: ../client/pk-console.c:1373
+#: ../client/pk-console.c:1408
msgid "Set the filter, e.g. installed"
msgstr "Impostare il filtro, es. installato"
-#: ../client/pk-console.c:1375
+#: ../client/pk-console.c:1410
msgid "Exit without waiting for actions to complete"
msgstr "Uscire senza attendere il completamento delle azioni in corso"
#. TRANSLATORS: This is when we could not connect to the system bus, and is fatal
-#: ../client/pk-console.c:1397
+#: ../client/pk-console.c:1432
msgid "This tool could not connect to system DBUS."
msgstr "Questo strumento non può connettersi al DBUS di sistema."
-#: ../client/pk-console.c:1492
+#: ../client/pk-console.c:1527
msgid "You need to specify a search type, e.g. name"
msgstr "E' necessario specificare un criterio di ricerca, es. nome"
-#: ../client/pk-console.c:1497 ../client/pk-console.c:1504
-#: ../client/pk-console.c:1511 ../client/pk-console.c:1518
-#: ../client/pk-console.c:1629 ../client/pk-console.c:1639
-#: ../client/pk-console.c:1646 ../client/pk-console.c:1653
+#: ../client/pk-console.c:1532 ../client/pk-console.c:1539
+#: ../client/pk-console.c:1546 ../client/pk-console.c:1553
+#: ../client/pk-console.c:1664 ../client/pk-console.c:1674
+#: ../client/pk-console.c:1681 ../client/pk-console.c:1688
msgid "You need to specify a search term"
msgstr "E' necessario specificare un termine per la ricerca"
-#: ../client/pk-console.c:1523
+#: ../client/pk-console.c:1558
msgid "Invalid search type"
msgstr "Tipo di ricerca non valida"
-#: ../client/pk-console.c:1528
+#: ../client/pk-console.c:1563
msgid "You need to specify a package or file to install"
msgstr "E' necessario specificare un pacchetto o un file da installare"
-#: ../client/pk-console.c:1535
+#: ../client/pk-console.c:1570
msgid "You need to specify a type, key_id and package_id"
msgstr "E' necessario speficare un tipo, un key_id ed un package_id"
-#: ../client/pk-console.c:1542
+#: ../client/pk-console.c:1577
msgid "You need to specify a package to remove"
msgstr "E' necessario specificare un pacchetto da rimuovere"
-#: ../client/pk-console.c:1548
+#: ../client/pk-console.c:1583
msgid ""
"You need to specify the destination directory and then the packages to "
"download"
@@ -277,137 +283,147 @@ msgstr ""
"E' necessario specificare la directory di destinazione e poi i pacchetti da "
"scaricare"
-#: ../client/pk-console.c:1553
+#: ../client/pk-console.c:1588
msgid "Directory not found"
msgstr "Directory non trovata"
-#: ../client/pk-console.c:1559
+#: ../client/pk-console.c:1594
msgid "You need to specify a licence identifier (eula-id)"
msgstr "E' necessario specificare un identificatore di licenza (eula-id)"
-#: ../client/pk-console.c:1575
+#: ../client/pk-console.c:1610
msgid "You need to specify a package name to resolve"
msgstr "E necessario specificare un nome del pacchetto da risolvere"
-#: ../client/pk-console.c:1584 ../client/pk-console.c:1591
+#: ../client/pk-console.c:1619 ../client/pk-console.c:1626
msgid "You need to specify a repository name"
msgstr "E' necessario specificare un nome per il repositorio"
-#: ../client/pk-console.c:1598
+#: ../client/pk-console.c:1633
msgid "You need to specify a repo name/parameter and value"
msgstr "E' necessario specificare un nome/parametro e un valore per il repositorio"
-#: ../client/pk-console.c:1611
+#: ../client/pk-console.c:1646
msgid "You need to specify an action, e.g. 'update-system'"
msgstr "E' necessario specificare un azione, es. 'update-system'"
-#: ../client/pk-console.c:1616
+#: ../client/pk-console.c:1651
msgid "You need to specify a correct role"
msgstr "E' necessario specificare un ruolo corretto"
-#: ../client/pk-console.c:1621
+#: ../client/pk-console.c:1656
msgid "Failed to get last time"
msgstr "Impossibile ottenere l'ultimo tempo"
-#: ../client/pk-console.c:1660
+#: ../client/pk-console.c:1695
msgid "You need to specify a package to find the details for"
msgstr "E' necessario specificare un pacchetto per trovarne i dettagli"
-#: ../client/pk-console.c:1667
+#: ../client/pk-console.c:1702
msgid "You need to specify a package to find the files for"
msgstr "E' necessario specificare un pacchetto per trovarne i file"
#. TRANSLATORS: The user tried to use an unsupported option on the command line
-#: ../client/pk-console.c:1720
+#: ../client/pk-console.c:1755
#, c-format
msgid "Option '%s' is not supported"
msgstr "L'opzione '%s' non è supportata"
#. TRANSLATORS: User does not have permission to do this
-#: ../client/pk-console.c:1733
+#: ../client/pk-console.c:1768
msgid "You don't have the necessary privileges for this operation"
msgstr "Non si dispone dei privilegi necessari per questa operazione"
#. TRANSLATORS: Generic failure of what they asked to do
-#: ../client/pk-console.c:1736
+#: ../client/pk-console.c:1771
msgid "Command failed"
msgstr "Comando non riuscito"
#. TRANSLATORS: This is the state of the transaction
-#: ../client/pk-generate-pack.c:96
+#: ../client/pk-generate-pack.c:99
msgid "Downloading"
msgstr "Download in corso"
-#: ../client/pk-generate-pack.c:140
+#. TRANSLATORS: This is when the main packages are being downloaded
+#: ../client/pk-generate-pack.c:119
+msgid "Downloading packages"
+msgstr "Download dei pacchetti in corso"
+
+#. TRANSLATORS: This is when the dependency packages are being downloaded
+#: ../client/pk-generate-pack.c:124
+msgid "Downloading dependencies"
+msgstr "Download delle dipendenze in corso"
+
+#: ../client/pk-generate-pack.c:185
msgid "Set the file name of dependencies to be excluded"
msgstr "Impostare il nome del file delle dipendenze da escludere"
-#: ../client/pk-generate-pack.c:142
+#: ../client/pk-generate-pack.c:187
msgid "The output directory (the current directory is used if ommitted)"
msgstr "La directory di output (sarà usata la directory corrente se omessa)"
-#: ../client/pk-generate-pack.c:144
+#: ../client/pk-generate-pack.c:189
msgid "The package to be put into the service pack"
msgstr "Il pacchetto da mettere nel service pack"
-#: ../client/pk-generate-pack.c:146
+#: ../client/pk-generate-pack.c:191
msgid "Put all updates available in the service pack"
msgstr "Porre tutti gli aggiornamenti disponibili nel service pack"
#. TRANSLATORS: This is when the user fails to supply the correct arguments
-#: ../client/pk-generate-pack.c:166
+#: ../client/pk-generate-pack.c:214
msgid "Neither --package or --updates option selected."
msgstr "Non è stata selezionata ne l'opzione --package o --updates."
#. TRANSLATORS: This is when the user fails to supply just one argument
-#: ../client/pk-generate-pack.c:174
+#: ../client/pk-generate-pack.c:222
msgid "Both options selected."
msgstr "Sono state selezionate entrambe le opzioni."
#. TRANSLATORS: This is when file already exists
-#: ../client/pk-generate-pack.c:207
+#: ../client/pk-generate-pack.c:255
msgid "A pack with the same name already exists, do you want to overwrite it?"
msgstr "Un pack con lo stesso nome esiste già , si desidera sovrascriverlo?"
#. TRANSLATORS: This is when the pack was not overwritten
-#: ../client/pk-generate-pack.c:210
+#: ../client/pk-generate-pack.c:258
msgid "The pack was not overwritten."
msgstr "Il pack non è stato sovrascritto."
#. TRANSLATORS: This is when the temporary directory cannot be created, the directory name follows
-#: ../client/pk-generate-pack.c:222
+#: ../client/pk-generate-pack.c:270
msgid "Failed to create directory:"
msgstr "Impossibile creare la directory:"
#. TRANSLATORS: This is when the list of packages from the remote computer cannot be opened
-#: ../client/pk-generate-pack.c:231
+#: ../client/pk-generate-pack.c:279
msgid "Failed to open package list."
msgstr "Impossibile aprire l'elenco dei pacchetti."
#. TRANSLATORS: The package name is being matched up to available packages
-#: ../client/pk-generate-pack.c:241
+#: ../client/pk-generate-pack.c:289
msgid "Finding package name."
msgstr "Ricerca del nome del pacchetto."
#. TRANSLATORS: This is when the package cannot be found in any software source. The detailed error follows
-#: ../client/pk-generate-pack.c:245
+#: ../client/pk-generate-pack.c:293
#, c-format
msgid "Failed to find package '%s': %s"
msgstr "Impossibile trovare il pacchetto '%s': %s"
#. TRANSLATORS: This is telling the user we are in the process of making the pack
-#: ../client/pk-generate-pack.c:260
+#: ../client/pk-generate-pack.c:309
msgid "Creating service pack..."
msgstr "Creazione del service pack..."
#. TRANSLATORS: we succeeded in making the file
-#: ../client/pk-generate-pack.c:267
+#: ../client/pk-generate-pack.c:316
#, c-format
msgid "Service pack created '%s'"
msgstr "Service pack '%s' creato"
#. TRANSLATORS: we failed to make te file
-#: ../client/pk-generate-pack.c:271
+#: ../client/pk-generate-pack.c:320
#, c-format
msgid "Failed to create '%s': %s"
msgstr "Impossibile creare '%s': %s"
@@ -417,21 +433,21 @@ msgid "PackageKit Monitor"
msgstr "PackageKit Monitor"
#. TRANSLATORS: The package was not found in any software sources
-#: ../client/pk-tools-common.c:109
+#: ../client/pk-tools-common.c:108
msgid "The package could not be found"
msgstr "Impossibile trovare il pacchetto"
#. TRANSLATORS: more than one package could be found that matched, to follow is a list of possible packages
-#: ../client/pk-tools-common.c:120
+#: ../client/pk-tools-common.c:119
msgid "More than one package matches:"
msgstr "Corrisponde più di un pacchetto:"
#. TRANSLATORS: This finds out which package in the list to use
-#: ../client/pk-tools-common.c:127
+#: ../client/pk-tools-common.c:126
msgid "Please choose the correct package: "
msgstr "Si prega di scegliere il pacchetto corretto: "
-#: ../client/pk-tools-common.c:154
+#: ../client/pk-tools-common.c:152
#, c-format
msgid "Please enter a number from 1 to %i: "
msgstr "Inserire un numero compreso tra 1 e %i: "
commit 398250949c9a9b635bc66efa06e6450310d6a2c1
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Nov 12 14:54:35 2008 +0000
trivial: add something else to the stderr blacklist for the yum plugin
diff --git a/backends/yum/pk-backend-yum.c b/backends/yum/pk-backend-yum.c
index 918795b..7b77f6f 100644
--- a/backends/yum/pk-backend-yum.c
+++ b/backends/yum/pk-backend-yum.c
@@ -35,6 +35,8 @@ backend_stderr_cb (PkBackend *backend, const gchar *output)
/* unsigned rpm, this will be picked up by yum and and exception will be thrown */
if (strstr (output, "NOKEY") != NULL)
return FALSE;
+ if (strstr (output, "GPG") != NULL)
+ return FALSE;
return TRUE;
}
commit 4f36bd8a9c76b14007739c30df0fe04a0c0e82ab
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Nov 12 14:37:13 2008 +0000
trivial: fix the installSignature method to understand repo keys
diff --git a/lib/packagekit-glib/pk-client.c b/lib/packagekit-glib/pk-client.c
index eb4e6f8..e6d04c4 100644
--- a/lib/packagekit-glib/pk-client.c
+++ b/lib/packagekit-glib/pk-client.c
@@ -2844,14 +2844,6 @@ pk_client_install_signature (PkClient *client, PkSigTypeEnum type, const gchar *
return FALSE;
}
- /* check the PackageID here to avoid a round trip if invalid */
- ret = pk_package_id_check (package_id);
- if (!ret) {
- pk_client_error_set (error, PK_CLIENT_ERROR_INVALID_INPUT,
- "package_id '%s' is not valid", package_id);
- return FALSE;
- }
-
/* get and set a new ID */
ret = pk_client_allocate_transaction_id (client, error);
if (!ret)
diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index f7765c7..7c85c60 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -2598,9 +2598,9 @@ pk_transaction_install_signature (PkTransaction *transaction, const gchar *sig_t
return;
}
- /* check package_id */
+ /* check package_id (';;;repo-id' is used for the repo key) */
ret = pk_package_id_check (package_id);
- if (!ret) {
+ if (!ret && !g_str_has_prefix (package_id, ";;;")) {
error = g_error_new (PK_TRANSACTION_ERROR, PK_TRANSACTION_ERROR_PACKAGE_ID_INVALID,
"The package id '%s' is not valid", package_id);
pk_transaction_release_tid (transaction);
commit 0c39c9438d8a583ace5fce8b3d1097dedfa413ef
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Nov 12 14:28:30 2008 +0000
trivial: various pylint fixes
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 6f837da..c2b7d2b 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -627,19 +627,19 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
if grp:
grps.append(grp)
for grp in sorted(grps):
- grp_id = grp.groupid
- cat_id_name = "@%s" % (grp_id)
- name = grp.nameByLang(self._lang)
- summary = grp.descriptionByLang(self._lang)
- icon = "image-missing"
- fn = "/usr/share/pixmaps/comps/%s.png" % grp_id
+ grp_id = grp.groupid
+ cat_id_name = "@%s" % (grp_id)
+ name = grp.nameByLang(self._lang)
+ summary = grp.descriptionByLang(self._lang)
+ icon = "image-missing"
+ fn = "/usr/share/pixmaps/comps/%s.png" % grp_id
+ if os.access(fn, os.R_OK):
+ icon = grp_id
+ else:
+ fn = "/usr/share/pixmaps/comps/%s.png" % cat_id
if os.access(fn, os.R_OK):
- icon = grp_id
- else:
- fn = "/usr/share/pixmaps/comps/%s.png" % cat_id
- if os.access(fn, os.R_OK):
- icon = cat_id
- self.category(cat, cat_id_name, name, summary, icon)
+ icon = cat_id
+ self.category(cat, cat_id_name, name, summary, icon)
def download_packages(self, directory, package_ids):
'''
@@ -1308,10 +1308,10 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
# read the file
pkg = YumLocalPackage(ts=self.yumbase.rpmdb.readOnlyTS(), filename=inst_file)
pkgs_local = self.yumbase.rpmdb.searchNevra(name=pkg.name)
- except yum.Errors.YumBaseError, e:
- self.error(ERROR_INVALID_PACKAGE_FILE, 'Package could not be decompressed')
except yum.Errors.MiscError:
self.error(ERROR_INVALID_PACKAGE_FILE, "%s does not appear to be a valid package." % inst_file)
+ except yum.Errors.YumBaseError, e:
+ self.error(ERROR_INVALID_PACKAGE_FILE, 'Package could not be decompressed')
except:
self.error(ERROR_UNKNOWN, "Failed to open local file -- please report")
else:
@@ -1910,7 +1910,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.allow_cancel(True)
self.percentage(None)
self.status(STATUS_INFO)
- if package.startswith(';;;'): #This is a repo signature
+ if package.startswith(';;;'): #This is a repo signature
repoid = package.split(';')[-1]
repo = self.yumbase.repos.getRepo(repoid)
if repo:
@@ -2190,7 +2190,7 @@ class PackageKitYumBase(yum.YumBase):
self.repos.confirm_func = self._repo_gpg_confirm
self.repos.gpg_import_func = self._repo_gpg_import
- def _repo_gpg_confirm(self,keyData):
+ def _repo_gpg_confirm(self, keyData):
""" Confirm Repo GPG signature import """
if not keyData:
self.backend.error(ERROR_BAD_GPG_SIGNATURE,
@@ -2210,7 +2210,7 @@ class PackageKitYumBase(yum.YumBase):
'gpg')
self.backend.error(ERROR_GPG_FAILURE, "GPG key %s required" % keyData['hexkeyid'])
- def _repo_gpg_import(self,repo,confirm):
+ def _repo_gpg_import(self, repo, confirm):
""" Repo GPG signature importer"""
self.getKeyForRepo(repo, callback=confirm)
diff --git a/backends/yum/yumComps.py b/backends/yum/yumComps.py
index ee2a2da..044bc86 100755
--- a/backends/yum/yumComps.py
+++ b/backends/yum/yumComps.py
@@ -267,25 +267,25 @@ class yumComps:
return True
def _add_groups_to_db(self, grps, cat_id):
- for group in grps:
- # strip out rpmfusion from the group name
- group_name = group.groupid
- group_name = group_name.replace('rpmfusion_nonfree-', '')
- group_name = group_name.replace('rpmfusion_free-', '')
- group_id = "%s;%s" % (cat_id, group_name)
+ for group in grps:
+ # strip out rpmfusion from the group name
+ group_name = group.groupid
+ group_name = group_name.replace('rpmfusion_nonfree-', '')
+ group_name = group_name.replace('rpmfusion_free-', '')
+ group_id = "%s;%s" % (cat_id, group_name)
- group_enum = GROUP_OTHER
- if groupMap.has_key(group_id):
- group_enum = groupMap[group_id]
- else:
- print 'unknown group enum', group_id
+ group_enum = GROUP_OTHER
+ if groupMap.has_key(group_id):
+ group_enum = groupMap[group_id]
+ else:
+ print 'unknown group enum', group_id
- for package in group.mandatory_packages:
- self._add_db(package, cat_id, group_name, group_enum, 'mandatory')
- for package in group.default_packages:
- self._add_db(package, cat_id, group_name, group_enum, 'default')
- for package in group.optional_packages:
- self._add_db(package, cat_id, group_name, group_enum, 'optional')
+ for package in group.mandatory_packages:
+ self._add_db(package, cat_id, group_name, group_enum, 'mandatory')
+ for package in group.default_packages:
+ self._add_db(package, cat_id, group_name, group_enum, 'default')
+ for package in group.optional_packages:
+ self._add_db(package, cat_id, group_name, group_enum, 'optional')
def _add_non_catagorized_groups(self):
@@ -342,9 +342,9 @@ class yumComps:
break
return category
- def get_groups(self,cat_id):
+ def get_groups(self, cat_id):
grps = set()
- self.cursor.execute('SELECT groupid FROM groups WHERE category = ?',[cat_id])
+ self.cursor.execute('SELECT groupid FROM groups WHERE category = ?', [cat_id])
for row in self.cursor:
grps.add(row[0])
return list(grps)
commit df52c0c76ee652e2d8718caecfc54313648fdaca
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date: Wed Nov 12 15:03:52 2008 +0100
yum: add support for signed repository metadata
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 66907f0..6f837da 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1305,7 +1305,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
if fn.endswith('.rpm'):
inst_file = os.path.join(tempdir, fn)
try:
- # read the file
+ # read the file
pkg = YumLocalPackage(ts=self.yumbase.rpmdb.readOnlyTS(), filename=inst_file)
pkgs_local = self.yumbase.rpmdb.searchNevra(name=pkg.name)
except yum.Errors.YumBaseError, e:
@@ -1910,14 +1910,27 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
self.allow_cancel(True)
self.percentage(None)
self.status(STATUS_INFO)
- pkg, inst = self._findPackage(package)
- if pkg:
- try:
- self.yumbase.getKeyForPackage(pkg, askcb = lambda x, y, z: True)
- except yum.Errors.YumBaseError, e:
- self.error(ERROR_UNKNOWN, "cannot install signature: %s" % _to_unicode(e))
- except:
- self.error(ERROR_GPG_FAILURE, "Error importing GPG Key for %s" % pkg)
+ if package.startswith(';;;'): #This is a repo signature
+ repoid = package.split(';')[-1]
+ repo = self.yumbase.repos.getRepo(repoid)
+ if repo:
+ try:
+ self.yumbase.repos.doSetup(thisrepo=repoid)
+ self.yumbase.getKeyForRepo(repo, callback= lambda x: True)
+ except yum.Errors.YumBaseError, e:
+ self.error(ERROR_UNKNOWN, "cannot install signature: %s" % str(e))
+ except:
+ self.error(ERROR_GPG_FAILURE, "Error importing GPG Key for the %s repository" % repo)
+ else: # This is a package signature
+ pkg, inst = self._findPackage(package)
+ if pkg:
+ try:
+ self.yumbase.getKeyForPackage(pkg, askcb = lambda x, y, z: True)
+ except yum.Errors.YumBaseError, e:
+ self.error(ERROR_UNKNOWN, "cannot install signature: %s" % str(e))
+ except:
+ self.error(ERROR_GPG_FAILURE, "Error importing GPG Key for %s" % pkg)
+
def _check_init(self, lazy_cache=False):
'''Just does the caching tweaks'''
@@ -2172,6 +2185,34 @@ class PackageKitYumBase(yum.YumBase):
yum.YumBase.__init__(self)
self.missingGPGKey = None
self.dsCallback = DepSolveCallback(backend)
+ self.backend = backend
+ # Setup Repo GPG support callbacks
+ self.repos.confirm_func = self._repo_gpg_confirm
+ self.repos.gpg_import_func = self._repo_gpg_import
+
+ def _repo_gpg_confirm(self,keyData):
+ """ Confirm Repo GPG signature import """
+ if not keyData:
+ self.backend.error(ERROR_BAD_GPG_SIGNATURE,
+ "GPG key not imported, and no GPG information was found.")
+ repo = keyData['repo']
+ fingerprint = keyData['fingerprint']()
+ hex_fingerprint = "%02x" * len(fingerprint) % tuple(map(ord, fingerprint))
+ # Borrowed from http://mail.python.org/pipermail/python-list/2000-September/053490.html
+
+ self.backend.repo_signature_required(";;;%s" % repo.id,
+ repo.id,
+ keyData['keyurl'].replace("file://", ""),
+ keyData['userid'],
+ keyData['hexkeyid'],
+ hex_fingerprint,
+ time.ctime(keyData['timestamp']),
+ 'gpg')
+ self.backend.error(ERROR_GPG_FAILURE, "GPG key %s required" % keyData['hexkeyid'])
+
+ def _repo_gpg_import(self,repo,confirm):
+ """ Repo GPG signature importer"""
+ self.getKeyForRepo(repo, callback=confirm)
def _checkSignatures(self, pkgs, callback):
''' The the signatures of the downloaded packages '''
commit d941bf0ada997bfb9a7f58c3742ee3f48ef7dd6f
Author: Stefan Haas <shaas at suse.de>
Date: Wed Nov 12 14:51:58 2008 +0100
zypp: minor bugfix
diff --git a/backends/zypp/zypp-events.h b/backends/zypp/zypp-events.h
index e29c469..fa8f52e 100644
--- a/backends/zypp/zypp-events.h
+++ b/backends/zypp/zypp-events.h
@@ -361,7 +361,7 @@ struct DigestReportReceiver : public zypp::callback::ReceiveReport<zypp::DigestR
{
virtual bool askUserToAcceptNoDigest (const zypp::Pathname &file)
{
- gboolean ok = zypp_signature_required(_backend, file);
+ gboolean ok = zypp_signature_required(_backend, file.asString ());
return ok;
}
@@ -369,7 +369,7 @@ struct DigestReportReceiver : public zypp::callback::ReceiveReport<zypp::DigestR
virtual bool askUserToAccepUnknownDigest (const zypp::Pathname &file, const std::string &name)
{
pk_backend_error_code(_backend, PK_ERROR_ENUM_GPG_FAILURE, "Repo: %s Digest: %s", file.c_str (), name.c_str ());
- gboolean ok = zypp_signature_required(_backend, file);
+ gboolean ok = zypp_signature_required(_backend, file.asString ());
return ok;
}
@@ -378,7 +378,7 @@ struct DigestReportReceiver : public zypp::callback::ReceiveReport<zypp::DigestR
{
pk_backend_error_code(_backend, PK_ERROR_ENUM_GPG_FAILURE, "For repo %s %s is requested but %s was found!",
file.c_str (), requested.c_str (), found.c_str ());
- gboolean ok = zypp_signature_required(_backend, file);
+ gboolean ok = zypp_signature_required(_backend, file.asString ());
return ok;
}
commit ac8c4bf4a244a2de089f8d210e253a9b383e4b4c
Author: sebastian Heinlein <devel at glatzor.de>
Date: Wed Nov 12 12:48:38 2008 +0100
Python client: Add PackageKitTransaction.get_error method which returns
the PackageKitError exception of a failed transaction.
diff --git a/lib/python/packagekit/client.py b/lib/python/packagekit/client.py
index 0299a65..078e41f 100644
--- a/lib/python/packagekit/client.py
+++ b/lib/python/packagekit/client.py
@@ -189,6 +189,13 @@ class PackageKitTransaction:
'''
return self._iface.IsCallerActive()
+ def get_error(self):
+ '''Returns the PackageKitError of a failed transaction'''
+ if self._error_enum:
+ return PackageKitError(self._error_enum, self._error_desc)
+ else:
+ return None
+
class PackageKitClient:
'''PackageKit client wrapper class.
commit 03f42ab0733931c5abf5d73162ad1f994ffcbe44
Author: sebastian Heinlein <devel at glatzor.de>
Date: Wed Nov 12 12:44:04 2008 +0100
Raise api version number of the python client
diff --git a/lib/python/packagekit/client.py b/lib/python/packagekit/client.py
index 1bffaa0..0299a65 100644
--- a/lib/python/packagekit/client.py
+++ b/lib/python/packagekit/client.py
@@ -38,7 +38,7 @@ import gobject
from enums import *
from misc import *
-__api_version__ = '0.1.1'
+__api_version__ = '0.1.2'
class PackageKitError(Exception):
'''PackageKit error.
commit fde89299fa48e8bb357817652ca9df15ab7b4d7b
Author: sebastian Heinlein <devel at glatzor.de>
Date: Wed Nov 12 12:42:23 2008 +0100
Python client: Instead of only package ids allow to use PackageKitPackage instances as parameter.
diff --git a/lib/python/packagekit/client.py b/lib/python/packagekit/client.py
index 7f51e61..1bffaa0 100644
--- a/lib/python/packagekit/client.py
+++ b/lib/python/packagekit/client.py
@@ -213,15 +213,15 @@ class PackageKitClient:
# not initialized, or daemon timed out
pass
- def Resolve(self, filters, packages, exit_handler=None):
+ def Resolve(self, filters, names, exit_handler=None):
'''Resolve package names'''
- packages = self._to_list(packages)
- return self._run_transaction("Resolve", [filters, packages],
+ names_list = self._to_list(names)
+ return self._run_transaction("Resolve", [filters, names_list],
exit_handler)
- def GetDetails(self, package_ids, exit_handler=None):
+ def GetDetails(self, packages, exit_handler=None):
'''Get details about the given packages'''
- package_ids = self._to_list(package_ids)
+ package_ids = self._to_package_id_list(packages)
return self._run_transaction("GetDetails", [package_ids],
exit_handler)
@@ -245,22 +245,22 @@ class PackageKitClient:
return self._run_transaction("SearchFile", [filters],
exit_handler)
- def InstallPackages(self, package_ids, exit_handler=None):
+ def InstallPackages(self, packages, exit_handler=None):
'''Install the packages of the given package ids'''
- package_ids = self._to_list(package_ids)
+ package_ids = self._to_package_id_list(packages)
return self._run_transaction("InstallPackages", [package_ids],
exit_handler)
- def UpdatePackages(self, package_ids, exit_handler=None):
+ def UpdatePackages(self, packages, exit_handler=None):
'''Update the packages of the given package ids'''
- package_ids = self._to_list(package_ids)
+ package_ids = self._to_package_id_list(packages)
return self._run_transaction("UpdatePackages", [package_ids],
exit_handler)
- def RemovePackages(self, package_ids, allow_deps=False, auto_remove=True,
+ def RemovePackages(self, packages, allow_deps=False, auto_remove=True,
exit_handler=None):
'''Remove the packages of the given package ids'''
- package_ids = self._to_list(package_ids)
+ package_ids = self._to_package_id_list(packages)
return self._run_transaction("RemovePackages",
[package_ids, allow_deps, auto_remove],
exit_handler)
@@ -308,35 +308,35 @@ class PackageKitClient:
'''Update the system'''
return self._run_transaction("UpdateSystem", [], exit_handler)
- def DownloadPackages(self, package_ids, exit_handler=None):
+ def DownloadPackages(self, packages, exit_handler=None):
'''Download package files'''
- package_ids = self._to_list(package_ids)
+ package_ids = self._to_package_id_list(packages)
return self._run_transaction("DownloadPackages", [package_ids], exit_handler)
- def GetDepends(self, filters, package_ids, recursive=False,
+ def GetDepends(self, filters, packages, recursive=False,
exit_handler=None):
'''Search for dependencies for packages'''
- package_ids = self._to_list(package_ids)
+ package_ids = self._to_package_id_list(packages)
return self._run_transaction("GetDepends",
[filters, package_ids, recursive],
exit_handler)
- def GetFiles(self, package_ids, exit_handler=None):
+ def GetFiles(self, packages, exit_handler=None):
'''Get files of the given packages'''
- package_ids = self._to_list(package_ids)
+ package_ids = self._to_package_id_list(packages)
return self._run_transaction("GetFiles", [package_ids], exit_handler)
- def GetRequires(self, filters, package_ids, recursive=False,
+ def GetRequires(self, filters, packages, recursive=False,
exit_handler=None):
'''Search for requirements for packages'''
- package_ids = self._to_list(package_ids)
+ package_ids = self._to_package_id_list(packages)
return self._run_transaction("GetRequires",
[filters, package_ids, recursive],
exit_handler)
- def GetUpdateDetail(self, package_ids, exit_handler=None):
+ def GetUpdateDetail(self, packages, exit_handler=None):
'''Get details for updates'''
- package_ids = self._to_list(package_ids)
+ package_ids = self._to_package_id_list(packages)
return self._run_transaction("GetUpdateDetail", [package_ids],
exit_handler)
@@ -347,7 +347,7 @@ class PackageKitClient:
def InstallFiles(self, trusted, files, exit_handler=None):
'''Install the given local packages'''
- return self._run_transaction("InstallFiles", [trusted, files],
+ return self._run_transaction("InstallFiles", [trusted, files],
exit_handler)
def InstallSignature(self, sig_type, key_id, package_id,
@@ -386,10 +386,25 @@ class PackageKitClient:
#
def _to_list(self, obj):
'''convert obj to list'''
- if isinstance(obj, str):
+ if not isinstance(obj, list):
obj = [obj]
return obj
+ def _to_package_id_list(self, obj):
+ '''convert to list of package ids'''
+ ids = []
+ if not isinstance(obj, list):
+ obj = [obj]
+ for o in obj:
+ if isinstance(o, PackageKitPackage):
+ ids.append(o.id)
+ elif isinstance(o, str) and len(o.split(";")) == 4:
+ ids.append(o)
+ else:
+ raise Exception("Wrong Type: %s has to be a PackageKit id "
+ "string or a PackageKitPackage instance" % o)
+ return ids
+
def _run_transaction(self, method_name, args, exit_handler):
'''Run the given method in a new transaction'''
try:
commit eb90128a27d9b2cce8881907acca6208ba5da7be
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Nov 10 15:42:54 2008 +0000
trivial: post release version bump
diff --git a/RELEASE b/RELEASE
index 348dc58..3ba93fa 100644
--- a/RELEASE
+++ b/RELEASE
@@ -3,8 +3,8 @@ PackageKit Release Notes
1. Write NEWS entries for PackageKit and gnome-packagekit in the same
format as usual. Ignore any trivial commits.
-git-shortlog PACKAGEKIT_0_3_9.. | grep -v trivial | grep -v Merge > NEWS.new
-git-shortlog GNOME_PACKAGEKIT_0_3_9.. | grep -v trivial | grep -v Merge > NEWS.new
+git-shortlog PACKAGEKIT_0_3_10.. | grep -v trivial | grep -v Merge > NEWS.new
+git-shortlog GNOME_PACKAGEKIT_0_3_10.. | grep -v trivial | grep -v Merge > NEWS.new
2. Add download date to docs/html/pk-download.html, save file.
@@ -12,8 +12,8 @@ git-shortlog GNOME_PACKAGEKIT_0_3_9.. | grep -v trivial | grep -v Merge > NEWS.n
4. Commit changes in PackageKit git:
-git commit -a -m "Release version 0.3.10"
-git tag -a -f -m "Release 0.3.10" PACKAGEKIT_0_3_10
+git commit -a -m "Release version 0.3.11"
+git tag -a -f -m "Release 0.3.11" PACKAGEKIT_0_3_11
git push --tags
git push
git push git+ssh://hughsient@git.freedesktop.org/git/packagekit
@@ -21,8 +21,8 @@ git push --tags git+ssh://hughsient@git.freedesktop.org/git/packagekit
5. Commit changes in gnome-packagekit git:
-git commit -a -m "Release version 0.3.10"
-git-tag GNOME_PACKAGEKIT_0_3_10
+git commit -a -m "Release version 0.3.11"
+git-tag GNOME_PACKAGEKIT_0_3_11
git push --tags
git push
@@ -44,9 +44,9 @@ git push
11. Send an email to packagekit at lists.freedesktop.org
=================================================
-Subject: PackageKit and gnome-packagekit 0.3.10 released!
+Subject: PackageKit and gnome-packagekit 0.3.11 released!
-Today I released PackageKit and gnome-packagekit 0.3.10.
+Today I released PackageKit and gnome-packagekit 0.3.11.
PackageKit release notes: http://gitweb.freedesktop.org/?p=packagekit.git;a=blob;f=NEWS
diff --git a/configure.ac b/configure.ac
index 221683f..72749d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ(2.52)
-AC_INIT(PackageKit, 0.3.10)
+AC_INIT(PackageKit, 0.3.11)
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
More information about the PackageKit-commit
mailing list