[packagekit] get-roles and get-old-transactions

Daniel Nicoletti dantti12 at gmail.com
Wed May 7 12:40:50 PDT 2014


hi,
I've fixed get-roles to always return get-old-transactions
since it's not backend specific, can I commit?

diff --git a/src/pk-backend.c b/src/pk-backend.c
index e839e1c..23d19fd 100644
--- a/src/pk-backend.c
+++ b/src/pk-backend.c
@@ -322,7 +322,9 @@ pk_backend_get_roles (PkBackend *backend)

        /* not compulsory, but use it if we've got it */
        if (backend->priv->desc->get_roles != NULL) {
-               backend->priv->roles = backend->priv->desc->get_roles (backend);
+               roles = backend->priv->desc->get_roles (backend);
+               pk_bitfield_add (roles, PK_ROLE_ENUM_GET_OLD_TRANSACTIONS);
+               backend->priv->roles = roles;
                goto out;
        }

@@ -388,6 +390,7 @@ pk_backend_get_roles (PkBackend *backend)
                pk_bitfield_add (roles, PK_ROLE_ENUM_GET_CATEGORIES);
        if (desc->repair_system != NULL)
                pk_bitfield_add (roles, PK_ROLE_ENUM_REPAIR_SYSTEM);
+       pk_bitfield_add (roles, PK_ROLE_ENUM_GET_OLD_TRANSACTIONS);
        backend->priv->roles = roles;

        backend->priv->backend_roles_set = TRUE;

-- 
Daniel Nicoletti

KDE Developer - http://dantti.wordpress.com


More information about the PackageKit mailing list