Can't reliably fixup error code 36 in domain g-io-error-quark: No role
Get the above error in GS when trying to verify https://github.com/PackageKit/PackageKit/pull/667
This is a remote PK_TRANSACTION_ERROR
returned by packagekitd
process. There are D-bus error mappings for PK transaction errors in the below file:
GQuark
pk_transaction_error_quark (void)
{
static GQuark quark = 0;
if (!quark) {
quark = g_quark_from_static_string ("pk-transaction-error-quark");
...
...
g_dbus_error_register_error (quark,
PK_TRANSACTION_ERROR_NO_ROLE,
PK_DBUS_INTERFACE_TRANSACTION ".NoRole");
...
...
}
return quark;
}
But, since pk-transaction.h
is private to packagekit
(meaning it's not part of packagekit-glib2
), I'm not exactly sure why this mapping exists in PK. I was of the opinion that these errors mappings should be part of the public API, for them to be useful to PK clients.
Without the mapping accessible to the D-Bus client process, GIO maps the PK remote D-Bus error to a generic GError (G_IO_ERROR, G_IO_ERROR_DBUS_ERROR, "No Role")
which is not accounted for in GS, and hence the error.