[packagekit] libpackagekit debconf issue
David Jordan
david2 at system76.com
Mon Oct 30 16:50:03 UTC 2017
I've been trying to diagnose/fix an issue where the debconf-communicator
gui freezes instead of closing when running updates via packagekit (this
is how Elementary Appcenter/Pop Shop work). It seems the process keeps
running after sending the hangup signal. Only when the parent
application closes (or updates finish via terminal) does the debconf
window close.
I can end it by adding a command to kill the process with the client
helper recieves a hangup signal (see pk_client_helper_copy_conn_cb() in
pk-client-helper.c). However, I'm not sure if this is reasonably
correct or likely to lead to issues or if there's a better way.
/**
* pk_client_helper_copy_conn_cb:
**/
static gboolean
pk_client_helper_copy_conn_cb (GIOChannel *source, GIOCondition
condition, PkClientHelper *client_helper)
{
PkClientHelperPrivate *priv = client_helper->priv;
gchar data[1024];
gsize len = 0;
GIOStatus status;
gsize written = 0;
gboolean ret = TRUE;
g_autoptr(GError) error = NULL;
/* package manager is done processing a package */
if ((condition & G_IO_HUP) > 0) {
g_debug ("socket hung up");
+ ret = kill (priv->child_pid, SIGQUIT);
ret = g_socket_close (priv->active_conn, &error);
if (!ret)
g_warning ("failed to close socket");
g_object_unref (priv->active_conn);
priv->active_conn = NULL;
return FALSE;
}
Right now Ubuntu avoids this issue by using the update-manager
application, which doesn't use packagekit, instead of gnome-software for
updates. As far as I can tell, this is a pretty significant issue for
any debian-based distribution that wants to use packagekit for updates.
Would appreciate any assitance or suggestions here.
Thanks!
--
David Jordan
david2 at system76.com
More information about the PackageKit
mailing list