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

Richard Hughes hughsient at gmail.com
Thu May 8 00:53:46 PDT 2014


On 7 May 2014 20:40, Daniel Nicoletti <dantti12 at gmail.com> wrote:
>         /* 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;
>         }

Can't you just do:

backend->priv->roles = backend->priv->desc->get_roles (backend);
pk_bitfield_add (backend->priv->roles,
               PK_ROLE_ENUM_GET_OLD_TRANSACTIONS);

> @@ -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;

Looks fine to commit with that change -- thanks for working it out! :)

Richard.


More information about the PackageKit mailing list