[PackageKit-commit] packagekit: Branch 'master' - 2 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Fri Nov 20 05:28:13 PST 2009
backends/yum/yumBackend.py | 30 ++++++++++++++++----
client/pk-console.c | 6 ++--
contrib/command-not-found/pk-command-not-found.c | 2 -
lib/packagekit-glib/pk-catalog.c | 2 -
lib/packagekit-glib/pk-client.c | 34 +++++++++++------------
lib/packagekit-glib/pk-client.h | 6 ++--
lib/packagekit-glib/pk-task-list.c | 2 -
lib/packagekit-glib2/pk-catalog.c | 2 -
lib/packagekit-glib2/pk-client-sync.c | 20 ++++++-------
lib/packagekit-glib2/pk-client-sync.h | 6 ++--
lib/packagekit-glib2/pk-client.c | 22 +++++++-------
lib/packagekit-glib2/pk-client.h | 6 ++--
12 files changed, 79 insertions(+), 59 deletions(-)
New commits:
commit 92fcbdbcc99786098772d7014cbd9bb30fb79399
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Nov 20 13:13:18 2009 +0000
Rename three methods in the unstable glib2 library so we are ready for 0.6.x in December
diff --git a/client/pk-console.c b/client/pk-console.c
index 99173ef..1603583 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -1275,7 +1275,7 @@ main (int argc, char *argv[])
goto out;
}
/* fire off an async request */
- pk_client_search_name_async (PK_CLIENT(task), filters, argv+3, cancellable,
+ pk_client_search_names_async (PK_CLIENT(task), filters, argv+3, cancellable,
(PkProgressCallback) pk_console_progress_cb, NULL,
(GAsyncReadyCallback) pk_console_finished_cb, NULL);
@@ -1299,7 +1299,7 @@ main (int argc, char *argv[])
goto out;
}
/* fire off an async request */
- pk_client_search_group_async (PK_CLIENT(task), filters, argv+3, cancellable,
+ pk_client_search_groups_async (PK_CLIENT(task), filters, argv+3, cancellable,
(PkProgressCallback) pk_console_progress_cb, NULL,
(GAsyncReadyCallback) pk_console_finished_cb, NULL);
@@ -1311,7 +1311,7 @@ main (int argc, char *argv[])
goto out;
}
/* fire off an async request */
- pk_client_search_file_async (PK_CLIENT(task), filters, argv+3, cancellable,
+ pk_client_search_files_async (PK_CLIENT(task), filters, argv+3, cancellable,
(PkProgressCallback) pk_console_progress_cb, NULL,
(GAsyncReadyCallback) pk_console_finished_cb, NULL);
} else {
diff --git a/contrib/command-not-found/pk-command-not-found.c b/contrib/command-not-found/pk-command-not-found.c
index 88b7da7..afa22d1 100644
--- a/contrib/command-not-found/pk-command-not-found.c
+++ b/contrib/command-not-found/pk-command-not-found.c
@@ -416,7 +416,7 @@ pk_cnf_find_available (const gchar *cmd)
filters = pk_bitfield_from_enums (PK_FILTER_ENUM_NOT_INSTALLED,
PK_FILTER_ENUM_NEWEST,
PK_FILTER_ENUM_ARCH, -1);
- results = pk_client_search_file (PK_CLIENT(task), filters, values, cancellable,
+ results = pk_client_search_files (PK_CLIENT(task), filters, values, cancellable,
(PkProgressCallback) pk_cnf_progress_cb, NULL, &error);
if (results == NULL) {
/* TRANSLATORS: we failed to find the package, this shouldn't happen */
diff --git a/lib/packagekit-glib/pk-catalog.c b/lib/packagekit-glib/pk-catalog.c
index e16be87..894556f 100644
--- a/lib/packagekit-glib/pk-catalog.c
+++ b/lib/packagekit-glib/pk-catalog.c
@@ -180,7 +180,7 @@ pk_catalog_process_type (PkCatalog *catalog, const gchar *type)
packages, &error);
g_strfreev (packages);
} else if (mode == PK_CATALOG_PROGRESS_FILES) {
- ret = pk_client_search_file (catalog->priv->client,
+ ret = pk_client_search_files (catalog->priv->client,
pk_bitfield_from_enums (PK_FILTER_ENUM_NOT_INSTALLED, PK_FILTER_ENUM_NEWEST, -1),
package, &error);
} else if (mode == PK_CATALOG_PROGRESS_PROVIDES) {
diff --git a/lib/packagekit-glib/pk-client.c b/lib/packagekit-glib/pk-client.c
index 1e0124b..d9f727c 100644
--- a/lib/packagekit-glib/pk-client.c
+++ b/lib/packagekit-glib/pk-client.c
@@ -1622,7 +1622,7 @@ out:
}
/**
- * pk_client_search_name:
+ * pk_client_search_names:
* @client: a valid #PkClient instance
* @filters: a %PkBitfield such as %PK_FILTER_ENUM_GUI | %PK_FILTER_ENUM_FREE or %PK_FILTER_ENUM_NONE
* @search: free text to search for, for instance, "power"
@@ -1634,7 +1634,7 @@ out:
* Return value: %TRUE if the daemon queued the transaction
**/
gboolean
-pk_client_search_name (PkClient *client, PkBitfield filters, const gchar *search, GError **error)
+pk_client_search_names (PkClient *client, PkBitfield filters, const gchar *search, GError **error)
{
gboolean ret = FALSE;
gchar *filter_text = NULL;
@@ -1709,7 +1709,7 @@ out:
* @error: a %GError to put the error code and message in, or %NULL
*
* Search all detailed summary information to try and find a keyword.
- * Think of this as pk_client_search_name(), but trying much harder and
+ * Think of this as pk_client_search_names(), but trying much harder and
* taking longer.
*
* Return value: %TRUE if the daemon queued the transaction
@@ -1783,7 +1783,7 @@ out:
}
/**
- * pk_client_search_group:
+ * pk_client_search_groups:
* @client: a valid #PkClient instance
* @filters: a %PkBitfield such as %PK_FILTER_ENUM_GUI | %PK_FILTER_ENUM_FREE or %PK_FILTER_ENUM_NONE
* @search: a group enum to search for, for instance, "system-tools"
@@ -1794,7 +1794,7 @@ out:
* Return value: %TRUE if the daemon queued the transaction
**/
gboolean
-pk_client_search_group (PkClient *client, PkBitfield filters, const gchar *search, GError **error)
+pk_client_search_groups (PkClient *client, PkBitfield filters, const gchar *search, GError **error)
{
gboolean ret = FALSE;
gchar *filter_text = NULL;
@@ -1862,7 +1862,7 @@ out:
}
/**
- * pk_client_search_file:
+ * pk_client_search_files:
* @client: a valid #PkClient instance
* @filters: a %PkBitfield such as %PK_FILTER_ENUM_GUI | %PK_FILTER_ENUM_FREE or %PK_FILTER_ENUM_NONE
* @search: file to search for, for instance, "/sbin/service"
@@ -1873,7 +1873,7 @@ out:
* Return value: %TRUE if the daemon queued the transaction
**/
gboolean
-pk_client_search_file (PkClient *client, PkBitfield filters, const gchar *search, GError **error)
+pk_client_search_files (PkClient *client, PkBitfield filters, const gchar *search, GError **error)
{
gboolean ret = FALSE;
gchar *filter_text = NULL;
@@ -4288,11 +4288,11 @@ pk_client_requeue (PkClient *client, GError **error)
else if (priv->role == PK_ROLE_ENUM_SEARCH_DETAILS)
ret = pk_client_search_details (client, priv->cached_filters, priv->cached_search, error);
else if (priv->role == PK_ROLE_ENUM_SEARCH_FILE)
- ret = pk_client_search_file (client, priv->cached_filters, priv->cached_search, error);
+ ret = pk_client_search_files (client, priv->cached_filters, priv->cached_search, error);
else if (priv->role == PK_ROLE_ENUM_SEARCH_GROUP)
- ret = pk_client_search_group (client, priv->cached_filters, priv->cached_search, error);
+ ret = pk_client_search_groups (client, priv->cached_filters, priv->cached_search, error);
else if (priv->role == PK_ROLE_ENUM_SEARCH_NAME)
- ret = pk_client_search_name (client, priv->cached_filters, priv->cached_search, error);
+ ret = pk_client_search_names (client, priv->cached_filters, priv->cached_search, error);
else if (priv->role == PK_ROLE_ENUM_INSTALL_PACKAGES)
ret = pk_client_install_packages (client, priv->cached_only_trusted, priv->cached_package_ids, error);
else if (priv->role == PK_ROLE_ENUM_INSTALL_FILES)
@@ -5355,7 +5355,7 @@ pk_client_test (EggTest *test)
egg_test_assert (test, ret);
/* run the method */
- ret = pk_client_search_name (client, PK_FILTER_ENUM_NONE, "power", NULL);
+ ret = pk_client_search_names (client, PK_FILTER_ENUM_NONE, "power", NULL);
/************************************************************/
egg_test_title (test, "we finished?");
@@ -5378,7 +5378,7 @@ pk_client_test (EggTest *test)
/************************************************************/
egg_test_title (test, "search name sync, with a reset in finalise");
- ret = pk_client_search_name (client, PK_FILTER_ENUM_NONE, "power", NULL);
+ ret = pk_client_search_names (client, PK_FILTER_ENUM_NONE, "power", NULL);
egg_test_assert (test, ret);
/************************************************************/
@@ -5443,7 +5443,7 @@ pk_client_test (EggTest *test)
/************************************************************/
egg_test_title (test, "search for power");
- ret = pk_client_search_name (client, PK_FILTER_ENUM_NONE, "power", &error);
+ ret = pk_client_search_names (client, PK_FILTER_ENUM_NONE, "power", &error);
if (!ret) {
egg_test_failed (test, "failed: %s", error->message);
g_error_free (error);
@@ -5465,7 +5465,7 @@ pk_client_test (EggTest *test)
egg_test_failed (test, "failed: to reset: %s", error->message);
g_error_free (error);
}
- ret = pk_client_search_name (client, PK_FILTER_ENUM_NONE, "power", &error);
+ ret = pk_client_search_names (client, PK_FILTER_ENUM_NONE, "power", &error);
if (!ret) {
egg_test_failed (test, "failed to search: %s", error->message);
g_error_free (error);
@@ -5493,7 +5493,7 @@ pk_client_test (EggTest *test)
G_CALLBACK (pk_client_test_copy_package_cb), test);
/* search with the source */
- ret = pk_client_search_name (client, PK_FILTER_ENUM_NONE, "power", &error);
+ ret = pk_client_search_names (client, PK_FILTER_ENUM_NONE, "power", &error);
if (!ret) {
egg_test_failed (test, "failed: %s", error->message);
g_error_free (error);
@@ -5622,7 +5622,7 @@ pk_client_test (EggTest *test)
/************************************************************/
egg_test_title (test, "do first task (which will fail after 500ms)");
- ret = pk_client_search_name (client_copy, PK_FILTER_ENUM_NONE, "power", &error);
+ ret = pk_client_search_names (client_copy, PK_FILTER_ENUM_NONE, "power", &error);
if (ret) {
egg_test_success (test, NULL);
} else {
@@ -5632,7 +5632,7 @@ pk_client_test (EggTest *test)
/************************************************************/
egg_test_title (test, "do second task which should fail outright");
- ret = pk_client_search_name (client, PK_FILTER_ENUM_NONE, "power", &error);
+ ret = pk_client_search_names (client, PK_FILTER_ENUM_NONE, "power", &error);
if (!ret) {
egg_test_success (test, "failed (in a good way): %s", error->message);
g_error_free (error);
diff --git a/lib/packagekit-glib/pk-client.h b/lib/packagekit-glib/pk-client.h
index 4fb3b0c..419cbb8 100644
--- a/lib/packagekit-glib/pk-client.h
+++ b/lib/packagekit-glib/pk-client.h
@@ -223,7 +223,7 @@ gboolean pk_client_update_system (PkClient *client,
gboolean only_trusted,
GError **error)
G_GNUC_WARN_UNUSED_RESULT;
-gboolean pk_client_search_name (PkClient *client,
+gboolean pk_client_search_names (PkClient *client,
PkBitfield filters,
const gchar *search,
GError **error)
@@ -232,12 +232,12 @@ gboolean pk_client_search_details (PkClient *client,
PkBitfield filters,
const gchar *search,
GError **error);
-gboolean pk_client_search_group (PkClient *client,
+gboolean pk_client_search_groups (PkClient *client,
PkBitfield filters,
const gchar *search,
GError **error)
G_GNUC_WARN_UNUSED_RESULT;
-gboolean pk_client_search_file (PkClient *client,
+gboolean pk_client_search_files (PkClient *client,
PkBitfield filters,
const gchar *search,
GError **error)
diff --git a/lib/packagekit-glib/pk-task-list.c b/lib/packagekit-glib/pk-task-list.c
index 3a13211..d8ad05a 100644
--- a/lib/packagekit-glib/pk-task-list.c
+++ b/lib/packagekit-glib/pk-task-list.c
@@ -564,7 +564,7 @@ pk_task_list_test (EggTest *test)
/************************************************************/
egg_test_title (test, "search for power");
client = pk_client_new ();
- ret = pk_client_search_name (client, PK_FILTER_ENUM_NONE, "power", &error);
+ ret = pk_client_search_names (client, PK_FILTER_ENUM_NONE, "power", &error);
if (!ret) {
egg_test_failed (test, "failed: %s", error->message);
g_error_free (error);
diff --git a/lib/packagekit-glib2/pk-catalog.c b/lib/packagekit-glib2/pk-catalog.c
index b369e46..5b9cdbf 100644
--- a/lib/packagekit-glib2/pk-catalog.c
+++ b/lib/packagekit-glib2/pk-catalog.c
@@ -373,7 +373,7 @@ pk_catalog_do_search_files (PkCatalogState *state)
data = pk_ptr_array_to_strv (state->array_files);
dbg = g_strjoinv ("&", data);
egg_debug ("searching for %s", dbg);
- pk_client_search_file_async (state->catalog->priv->client, pk_bitfield_from_enums (PK_FILTER_ENUM_ARCH, PK_FILTER_ENUM_NEWEST, -1),
+ pk_client_search_files_async (state->catalog->priv->client, pk_bitfield_from_enums (PK_FILTER_ENUM_ARCH, PK_FILTER_ENUM_NEWEST, -1),
data,
state->cancellable, state->progress_callback, state->progress_user_data,
(GAsyncReadyCallback) pk_catalog_search_file_ready_cb, state);
diff --git a/lib/packagekit-glib2/pk-client-sync.c b/lib/packagekit-glib2/pk-client-sync.c
index 44a5427..f07b25f 100644
--- a/lib/packagekit-glib2/pk-client-sync.c
+++ b/lib/packagekit-glib2/pk-client-sync.c
@@ -104,7 +104,7 @@ pk_client_resolve (PkClient *client, PkBitfield filters, gchar **packages, GCanc
}
/**
- * pk_client_search_name:
+ * pk_client_search_names:
* @client: a valid #PkClient instance
* @filters: a %PkBitfield such as %PK_FILTER_ENUM_GUI | %PK_FILTER_ENUM_FREE or %PK_FILTER_ENUM_NONE
* @values: free text to search for, for instance, "power"
@@ -122,7 +122,7 @@ pk_client_resolve (PkClient *client, PkBitfield filters, gchar **packages, GCanc
* Return value: a %PkResults object, or NULL for error
**/
PkResults *
-pk_client_search_name (PkClient *client, PkBitfield filters, gchar **values, GCancellable *cancellable,
+pk_client_search_names (PkClient *client, PkBitfield filters, gchar **values, GCancellable *cancellable,
PkProgressCallback progress_callback, gpointer progress_user_data, GError **error)
{
PkClientHelper *helper;
@@ -137,7 +137,7 @@ pk_client_search_name (PkClient *client, PkBitfield filters, gchar **values, GCa
helper->error = error;
/* run async method */
- pk_client_search_name_async (client, filters, values, cancellable, progress_callback, progress_user_data,
+ pk_client_search_names_async (client, filters, values, cancellable, progress_callback, progress_user_data,
(GAsyncReadyCallback) pk_client_generic_finish_sync, helper);
g_main_loop_run (helper->loop);
@@ -162,7 +162,7 @@ pk_client_search_name (PkClient *client, PkBitfield filters, gchar **values, GCa
* @error: the #GError to store any failure, or %NULL
*
* Search all detailed summary information to try and find a keyword.
- * Think of this as pk_client_search_name(), but trying much harder and
+ * Think of this as pk_client_search_names(), but trying much harder and
* taking longer.
*
* Warning: this function is synchronous, and may block. Do not use it in GUI
@@ -201,7 +201,7 @@ pk_client_search_details (PkClient *client, PkBitfield filters, gchar **values,
}
/**
- * pk_client_search_group:
+ * pk_client_search_groups:
* @client: a valid #PkClient instance
* @filters: a %PkBitfield such as %PK_FILTER_ENUM_GUI | %PK_FILTER_ENUM_FREE or %PK_FILTER_ENUM_NONE
* @values: a group enum to search for, for instance, "system-tools"
@@ -218,7 +218,7 @@ pk_client_search_details (PkClient *client, PkBitfield filters, gchar **values,
* Return value: a %PkResults object, or NULL for error
**/
PkResults *
-pk_client_search_group (PkClient *client, PkBitfield filters, gchar **values, GCancellable *cancellable,
+pk_client_search_groups (PkClient *client, PkBitfield filters, gchar **values, GCancellable *cancellable,
PkProgressCallback progress_callback, gpointer progress_user_data, GError **error)
{
PkClientHelper *helper;
@@ -233,7 +233,7 @@ pk_client_search_group (PkClient *client, PkBitfield filters, gchar **values, GC
helper->error = error;
/* run async method */
- pk_client_search_group_async (client, filters, values, cancellable, progress_callback, progress_user_data,
+ pk_client_search_groups_async (client, filters, values, cancellable, progress_callback, progress_user_data,
(GAsyncReadyCallback) pk_client_generic_finish_sync, helper);
g_main_loop_run (helper->loop);
@@ -248,7 +248,7 @@ pk_client_search_group (PkClient *client, PkBitfield filters, gchar **values, GC
}
/**
- * pk_client_search_file:
+ * pk_client_search_files:
* @client: a valid #PkClient instance
* @filters: a %PkBitfield such as %PK_FILTER_ENUM_GUI | %PK_FILTER_ENUM_FREE or %PK_FILTER_ENUM_NONE
* @values: file to search for, for instance, "/sbin/service"
@@ -265,7 +265,7 @@ pk_client_search_group (PkClient *client, PkBitfield filters, gchar **values, GC
* Return value: a %PkResults object, or NULL for error
**/
PkResults *
-pk_client_search_file (PkClient *client, PkBitfield filters, gchar **values, GCancellable *cancellable,
+pk_client_search_files (PkClient *client, PkBitfield filters, gchar **values, GCancellable *cancellable,
PkProgressCallback progress_callback, gpointer progress_user_data, GError **error)
{
PkClientHelper *helper;
@@ -280,7 +280,7 @@ pk_client_search_file (PkClient *client, PkBitfield filters, gchar **values, GCa
helper->error = error;
/* run async method */
- pk_client_search_file_async (client, filters, values, cancellable, progress_callback, progress_user_data,
+ pk_client_search_files_async (client, filters, values, cancellable, progress_callback, progress_user_data,
(GAsyncReadyCallback) pk_client_generic_finish_sync, helper);
g_main_loop_run (helper->loop);
diff --git a/lib/packagekit-glib2/pk-client-sync.h b/lib/packagekit-glib2/pk-client-sync.h
index 607d59e..a613796 100644
--- a/lib/packagekit-glib2/pk-client-sync.h
+++ b/lib/packagekit-glib2/pk-client-sync.h
@@ -35,7 +35,7 @@ PkResults *pk_client_resolve (PkClient *client,
gpointer progress_user_data,
GError **error);
-PkResults *pk_client_search_name (PkClient *client,
+PkResults *pk_client_search_names (PkClient *client,
PkBitfield filters,
gchar **values,
GCancellable *cancellable,
@@ -51,7 +51,7 @@ PkResults *pk_client_search_details (PkClient *client,
gpointer progress_user_data,
GError **error);
-PkResults *pk_client_search_group (PkClient *client,
+PkResults *pk_client_search_groups (PkClient *client,
PkBitfield filters,
gchar **values,
GCancellable *cancellable,
@@ -59,7 +59,7 @@ PkResults *pk_client_search_group (PkClient *client,
gpointer progress_user_data,
GError **error);
-PkResults *pk_client_search_file (PkClient *client,
+PkResults *pk_client_search_files (PkClient *client,
PkBitfield filters,
gchar **values,
GCancellable *cancellable,
diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c
index ac6cc0a..bfa847f 100644
--- a/lib/packagekit-glib2/pk-client.c
+++ b/lib/packagekit-glib2/pk-client.c
@@ -1875,7 +1875,7 @@ pk_client_resolve_async (PkClient *client, PkBitfield filters, gchar **packages,
}
/**
- * pk_client_search_name_async:
+ * pk_client_search_names_async:
* @client: a valid #PkClient instance
* @filters: a %PkBitfield such as %PK_FILTER_ENUM_GUI | %PK_FILTER_ENUM_FREE or %PK_FILTER_ENUM_NONE
* @values: free text to search for, for instance, "power"
@@ -1889,7 +1889,7 @@ pk_client_resolve_async (PkClient *client, PkBitfield filters, gchar **packages,
* that matches a specific name.
**/
void
-pk_client_search_name_async (PkClient *client, PkBitfield filters, gchar **values, GCancellable *cancellable,
+pk_client_search_names_async (PkClient *client, PkBitfield filters, gchar **values, GCancellable *cancellable,
PkProgressCallback progress_callback, gpointer progress_user_data,
GAsyncReadyCallback callback_ready, gpointer user_data)
{
@@ -1899,7 +1899,7 @@ pk_client_search_name_async (PkClient *client, PkBitfield filters, gchar **value
g_return_if_fail (PK_IS_CLIENT (client));
g_return_if_fail (callback_ready != NULL);
- res = g_simple_async_result_new (G_OBJECT (client), callback_ready, user_data, pk_client_search_name_async);
+ res = g_simple_async_result_new (G_OBJECT (client), callback_ready, user_data, pk_client_search_names_async);
/* save state */
state = g_slice_new0 (PkClientState);
@@ -1934,7 +1934,7 @@ pk_client_search_name_async (PkClient *client, PkBitfield filters, gchar **value
* @user_data: the data to pass to @callback_ready
*
* Search all detailed summary information to try and find a keyword.
- * Think of this as pk_client_search_name(), but trying much harder and
+ * Think of this as pk_client_search_names(), but trying much harder and
* taking longer.
**/
void
@@ -1972,7 +1972,7 @@ pk_client_search_details_async (PkClient *client, PkBitfield filters, gchar **va
}
/**
- * pk_client_search_group_async:
+ * pk_client_search_groups_async:
* @client: a valid #PkClient instance
* @filters: a %PkBitfield such as %PK_FILTER_ENUM_GUI | %PK_FILTER_ENUM_FREE or %PK_FILTER_ENUM_NONE
* @values: a group enum to search for, for instance, "system-tools"
@@ -1985,7 +1985,7 @@ pk_client_search_details_async (PkClient *client, PkBitfield filters, gchar **va
* Return all packages in a specific group.
**/
void
-pk_client_search_group_async (PkClient *client, PkBitfield filters, gchar **values, GCancellable *cancellable,
+pk_client_search_groups_async (PkClient *client, PkBitfield filters, gchar **values, GCancellable *cancellable,
PkProgressCallback progress_callback, gpointer progress_user_data,
GAsyncReadyCallback callback_ready, gpointer user_data)
{
@@ -1995,7 +1995,7 @@ pk_client_search_group_async (PkClient *client, PkBitfield filters, gchar **valu
g_return_if_fail (PK_IS_CLIENT (client));
g_return_if_fail (callback_ready != NULL);
- res = g_simple_async_result_new (G_OBJECT (client), callback_ready, user_data, pk_client_search_group_async);
+ res = g_simple_async_result_new (G_OBJECT (client), callback_ready, user_data, pk_client_search_groups_async);
/* save state */
state = g_slice_new0 (PkClientState);
@@ -2019,7 +2019,7 @@ pk_client_search_group_async (PkClient *client, PkBitfield filters, gchar **valu
}
/**
- * pk_client_search_file_async:
+ * pk_client_search_files_async:
* @client: a valid #PkClient instance
* @filters: a %PkBitfield such as %PK_FILTER_ENUM_GUI | %PK_FILTER_ENUM_FREE or %PK_FILTER_ENUM_NONE
* @values: file to search for, for instance, "/sbin/service"
@@ -2032,7 +2032,7 @@ pk_client_search_group_async (PkClient *client, PkBitfield filters, gchar **valu
* Search for packages that provide a specific file.
**/
void
-pk_client_search_file_async (PkClient *client, PkBitfield filters, gchar **values, GCancellable *cancellable,
+pk_client_search_files_async (PkClient *client, PkBitfield filters, gchar **values, GCancellable *cancellable,
PkProgressCallback progress_callback, gpointer progress_user_data,
GAsyncReadyCallback callback_ready, gpointer user_data)
{
@@ -2042,7 +2042,7 @@ pk_client_search_file_async (PkClient *client, PkBitfield filters, gchar **value
g_return_if_fail (PK_IS_CLIENT (client));
g_return_if_fail (callback_ready != NULL);
- res = g_simple_async_result_new (G_OBJECT (client), callback_ready, user_data, pk_client_search_file_async);
+ res = g_simple_async_result_new (G_OBJECT (client), callback_ready, user_data, pk_client_search_files_async);
/* save state */
state = g_slice_new0 (PkClientState);
@@ -4444,7 +4444,7 @@ pk_client_test (gpointer user_data)
egg_test_title (test, "search by name");
cancellable = g_cancellable_new ();
values = g_strsplit ("power", "&", -1);
- pk_client_search_name_async (client, pk_bitfield_value (PK_FILTER_ENUM_NONE), values, cancellable,
+ pk_client_search_names_async (client, pk_bitfield_value (PK_FILTER_ENUM_NONE), values, cancellable,
(PkProgressCallback) pk_client_test_progress_cb, test,
(GAsyncReadyCallback) pk_client_test_search_name_cb, test);
g_timeout_add (1000, (GSourceFunc) pk_client_test_cancel, cancellable);
diff --git a/lib/packagekit-glib2/pk-client.h b/lib/packagekit-glib2/pk-client.h
index 5474906..9b16fe9 100644
--- a/lib/packagekit-glib2/pk-client.h
+++ b/lib/packagekit-glib2/pk-client.h
@@ -112,7 +112,7 @@ void pk_client_resolve_async (PkClient *client,
GAsyncReadyCallback callback_ready,
gpointer user_data);
-void pk_client_search_name_async (PkClient *client,
+void pk_client_search_names_async (PkClient *client,
PkBitfield filters,
gchar **values,
GCancellable *cancellable,
@@ -130,7 +130,7 @@ void pk_client_search_details_async (PkClient *client,
GAsyncReadyCallback callback_ready,
gpointer user_data);
-void pk_client_search_group_async (PkClient *client,
+void pk_client_search_groups_async (PkClient *client,
PkBitfield filters,
gchar **values,
GCancellable *cancellable,
@@ -139,7 +139,7 @@ void pk_client_search_group_async (PkClient *client,
GAsyncReadyCallback callback_ready,
gpointer user_data);
-void pk_client_search_file_async (PkClient *client,
+void pk_client_search_files_async (PkClient *client,
PkBitfield filters,
gchar **values,
GCancellable *cancellable,
commit 00bb6f03eac4d0b2b0fed1d0e3694ba73a0a25c3
Author: Richard Hughes <richard at hughsie.com>
Date: Fri Nov 20 12:28:17 2009 +0000
yum: Protect more against repos that get disabled
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 840cfd8..823fc72 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1457,8 +1457,15 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
'''
Finds out if the repo that contains the package is signed
'''
- repo = self.yumbase.repos.getRepo(pkg.repoid)
- return repo.gpgcheck
+ signed = False
+ try:
+ repo = self.yumbase.repos.getRepo(pkg.repoid)
+ signed = repo.gpgcheck
+ except yum.Errors.RepoError, e:
+ raise PkError(ERROR_REPO_NOT_AVAILABLE, _to_unicode(e))
+ except Exception, e:
+ raise PkError(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
+ return signed
def update_system(self, only_trusted):
'''
@@ -1494,7 +1501,11 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
if only_trusted:
for t in txmbr:
pkg = t.po
- signed = self._is_package_repo_signed(pkg)
+ try:
+ signed = self._is_package_repo_signed(pkg)
+ except PkError, e:
+ self.error(e.code, e.details, exit=False)
+ return
if not signed:
self.error(ERROR_CANNOT_UPDATE_REPO_UNSIGNED, "The package %s will not be updated from unsigned repo %s" % (pkg.name, pkg.repoid), exit=False)
return
@@ -1672,7 +1683,11 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
if only_trusted:
for t in txmbrs:
pkg = t.po
- signed = self._is_package_repo_signed(pkg)
+ try:
+ signed = self._is_package_repo_signed(pkg)
+ except PkError, e:
+ self.error(e.code, e.details, exit=False)
+ return
if not signed:
self.error(ERROR_CANNOT_INSTALL_REPO_UNSIGNED, "The package %s will not be installed from unsigned repo %s" % (pkg.name, pkg.repoid), exit=False)
return
@@ -1954,6 +1969,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
except PkError, e:
if e.code == ERROR_PACKAGE_NOT_FOUND:
self.message(MESSAGE_COULD_NOT_FIND_PACKAGE, e.details)
+ package_ids.remove(package_id)
continue
self.error(e.code, e.details, exit=True)
return
@@ -1975,7 +1991,11 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
if only_trusted:
for t in txmbrs:
pkg = t.po
- signed = self._is_package_repo_signed(pkg)
+ try:
+ signed = self._is_package_repo_signed(pkg)
+ except PkError, e:
+ self.error(e.code, e.details, exit=False)
+ return
if not signed:
self.error(ERROR_CANNOT_UPDATE_REPO_UNSIGNED, "The package %s will not be updated from unsigned repo %s" % (pkg.name, pkg.repoid), exit=False)
return
More information about the PackageKit-commit
mailing list