Projects
openEuler:24.03:SP1:Everything:64G
PackageKit
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:PackageKit.spec
Changed
@@ -1,12 +1,13 @@ Name: PackageKit Version: 1.2.8 -Release: 2 +Release: 3 License: GPLv2+ and LGPLv2+ Summary: Package management service URL: https://www.freedesktop.org/software/PackageKit/ Source0: https://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz Patch6000: backport-pkcon-Use-appropriate-callbacks-for-client-task-asyn.patch +Patch6001: Revert-PkClient-Replace-the-GSimpleAsyncResult-with-.patch BuildRequires: glib2-devel xmlto gtk-doc sqlite-devel polkit-devel libtool gtk2-devel gtk3-devel docbook-utils BuildRequires: gnome-doc-utils intltool gettext vala gstreamer1-devel gstreamer1-plugins-base-devel pango-devel @@ -171,6 +172,12 @@ %config(noreplace) %{_sysconfdir}/PackageKit/CommandNotFound.conf %changelog +* Fri Aug 23 2024 lingsheng <lingsheng1@h-partners.com> - 1.2.8-3 +- Type: bugfix +- ID: NA +- SUG: NA +- DESC: Revert PkClient: Replace the GSimpleAsyncResult with the GTask API + * Tue Jul 23 2024 zhouyihang <zhouyihang3@h-partners.com> - 1.2.8-2 - Type: bugfix - ID: NA
View file
_service:tar_scm:Revert-PkClient-Replace-the-GSimpleAsyncResult-with-.patch
Added
@@ -0,0 +1,617 @@ +From 9756228d02e05661c15e0fc4b9a230d0d2b02d1b Mon Sep 17 00:00:00 2001 +From: lingsheng <lingsheng1@h-partners.com> +Date: Fri, 23 Aug 2024 10:53:29 +0000 +Subject: PATCH Revert PkClient: Replace the GSimpleAsyncResult with the + GTask API + +Reverted patch:https://github.com/PackageKit/Packagekit/commit/b068646d2fbb246c590a47531688c69df2699fa6 + +--- + lib/packagekit-glib2/pk-client.c | 164 ++++++++++++++++--------------- + 1 file changed, 86 insertions(+), 78 deletions(-) + +diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c +index c3eadc2..8792dd3 100644 +--- a/lib/packagekit-glib2/pk-client.c ++++ b/lib/packagekit-glib2/pk-client.c +@@ -163,7 +163,7 @@ struct _PkClientState + GDBusProxy *proxy_props; + GCancellable *cancellable; + GCancellable *cancellable_client; +- GTask *res; ++ GSimpleAsyncResult *res; + PkBitfield filters; + PkClient *client; + PkProgress *progress; +@@ -210,15 +210,11 @@ pk_client_state_remove (PkClient *client, PkClientState *state) + } + } + +-/* +- * pk_client_state_finish: +- * @state: (transfer full): the #PkClientState +- * @error: (transfer full): the #GError +- **/ + static void +-pk_client_state_finish (PkClientState *state, GError *error) ++pk_client_state_finish (PkClientState *state, const GError *error) + { + gboolean ret; ++ g_autoptr(GError) error_local = NULL; + + if (state->res == NULL) + return; +@@ -240,17 +236,15 @@ pk_client_state_finish (PkClientState *state, GError *error) + g_object_unref (G_OBJECT (state->proxy_props)); + + if (state->ret) { +- g_task_return_pointer (state->res, +- g_object_ref (state->results), +- g_object_unref); ++ g_simple_async_result_set_op_res_gpointer (state->res, ++ g_object_ref (state->results), ++ g_object_unref); + } else { +- g_task_return_error (state->res, error); ++ g_simple_async_result_set_from_error (state->res, error); + } + + /* remove any socket file */ + if (state->client_helper != NULL) { +- g_autoptr(GError) error_local = NULL; +- + if (!pk_client_helper_stop (state->client_helper, &error_local)) + g_warning ("failed to stop the client helper: %s", error_local->message); + g_object_unref (state->client_helper); +@@ -259,6 +253,9 @@ pk_client_state_finish (PkClientState *state, GError *error) + /* remove from list */ + pk_client_state_remove (state->client, state); + ++ /* complete */ ++ g_simple_async_result_complete_in_idle (state->res); ++ + /* mark the state as finished */ + g_clear_object (&state->res); + } +@@ -343,7 +340,7 @@ pk_client_cancel_cb (GObject *source_object, + g_debug ("failed to cancel: %s", error->message); + + if (state) +- pk_client_state_finish (state, g_steal_pointer (&error)); ++ pk_client_state_finish (state, error); + } + } + +@@ -370,7 +367,7 @@ pk_client_cancellable_cancel_cb (GCancellable *cancellable, + g_debug ("Cancelled, but no proxy, not sure what to do here"); + local_error = g_error_new_literal (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED, + "PackageKit transaction disappeared"); +- pk_client_state_finish (state, g_steal_pointer (&local_error)); ++ pk_client_state_finish (state, local_error); + return; + } + +@@ -396,10 +393,9 @@ pk_client_state_new (PkClient *client, + + state = g_object_new (PK_TYPE_CLIENT_STATE, NULL); + state->role = role; +- state->cancellable = g_cancellable_new (); +- state->res = g_task_new (client, state->cancellable, callback_ready, user_data); ++ state->res = g_simple_async_result_new (G_OBJECT (client), callback_ready, user_data, source_tag); + state->client = g_object_ref (client); +- g_task_set_source_tag (state->res, source_tag); ++ state->cancellable = g_cancellable_new (); + + if (cancellable != NULL) { + state->cancellable_client = g_object_ref (cancellable); +@@ -1007,7 +1003,7 @@ pk_client_copy_downloaded_finished_cb (GFile *file, GAsyncResult *res, PkClientS + + /* get the result */ + if (!g_file_copy_finish (file, res, &error)) { +- pk_client_state_finish (state, g_steal_pointer (&error)); ++ pk_client_state_finish (state, error); + return; + } + +@@ -1076,7 +1072,7 @@ pk_client_copy_downloaded_file (PkClientState *state, const gchar *package_id, c + PK_CLIENT_ERROR, + PK_ERROR_ENUM_FILE_CONFLICTS, + "file %s already exists", path); +- pk_client_state_finish (state, g_steal_pointer (&error)); ++ pk_client_state_finish (state, error); + return; + } + g_file_copy_async (source, destination, G_FILE_COPY_OVERWRITE, +@@ -1182,7 +1178,7 @@ pk_client_signal_finished (PkClientState *state, + "Failed: %s", + pk_exit_enum_to_string (exit_enum)); + } +- pk_client_state_finish (state, g_steal_pointer (&error)); ++ pk_client_state_finish (state, error); + return; + } + +@@ -1617,7 +1613,7 @@ pk_client_signal_cb (GDBusProxy *proxy, + local_error = g_error_new_literal (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED, + "PackageKit transaction disappeared"); + +- pk_client_state_finish (state, g_steal_pointer (&local_error)); ++ pk_client_state_finish (state, local_error); + return; + } + } +@@ -1638,7 +1634,7 @@ pk_client_notify_name_owner_cb (GObject *obj, + + local_error = g_error_new_literal (PK_CLIENT_ERROR, PK_CLIENT_ERROR_FAILED, + "PackageKit daemon disappeared"); +- pk_client_state_finish (state, g_steal_pointer (&local_error)); ++ pk_client_state_finish (state, local_error); + } else { + pk_client_state_unset_proxy (state); + g_cancellable_cancel (state->cancellable); +@@ -1695,7 +1691,7 @@ pk_client_method_cb (GObject *source_object, + if (value == NULL) { + /* fix up the D-Bus error */ + pk_client_fixup_dbus_error (error); +- pk_client_state_finish (state, g_steal_pointer (&error)); ++ pk_client_state_finish (state, error); + return; + } + +@@ -1740,7 +1736,7 @@ pk_client_set_hints_cb (GObject *source_object, + if (value == NULL) { + /* fix up the D-Bus error */ + pk_client_fixup_dbus_error (error); +- pk_client_state_finish (state, g_steal_pointer (&error)); ++ pk_client_state_finish (state, error); + return; + } + +@@ -2352,7 +2348,7 @@ pk_client_get_tid_cb (GObject *object, GAsyncResult *res, gpointer user_data) + + state->tid = pk_control_get_tid_finish (control, res, &error); + if (state->tid == NULL) { +- pk_client_state_finish (state, g_steal_pointer (&error)); ++ pk_client_state_finish (state, error); + return; + } + +@@ -2385,11 +2381,17 @@ pk_client_get_tid_cb (GObject *object, GAsyncResult *res, gpointer user_data) + PkResults * + pk_client_generic_finish (PkClient *client, GAsyncResult *res, GError **error) + { ++ GSimpleAsyncResult *simple; ++ + g_return_val_if_fail (PK_IS_CLIENT (client), NULL); +- g_return_val_if_fail (G_IS_TASK (res), NULL); ++ g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (res), NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + +- return g_task_propagate_pointer (G_TASK (res), error); ++ simple = G_SIMPLE_ASYNC_RESULT (res); ++ if (g_simple_async_result_propagate_error (simple, error)) ++ return NULL; ++ ++ return g_object_ref (g_simple_async_result_get_op_res_gpointer (simple)); + } + + /** +@@ -2432,7 +2434,7 @@ pk_client_resolve_async (PkClient *client, PkBitfield filters, gchar **packages,
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="scm">git</param> <param name="url">git@gitee.com:src-openeuler/PackageKit.git</param> - <param name="revision">openEuler-24.03-LTS-Next</param> + <param name="revision">openEuler-24.03-LTS-SP1</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2