[packagekit] Support for trusted packages in InstallPackages
Richard Hughes
hughsient at gmail.com
Wed Jun 17 00:31:18 PDT 2009
On Tue, Jun 16, 2009 at 5:59 PM, Richard Hughes<hughsient at gmail.com> wrote:
> On Tue, Jun 16, 2009 at 3:35 PM, Sebastian Heinlein<liste at glatzor.de> wrote:
>> I would like to see support for separating between trusted and untrusted
>> packages in the InstallPackages method. It should behave in the same way
>> as in InstallFiles.
>
> I'm guessing we'll need to add trusted to UpdatePackages, UpdateSystem
> and InstallPackages too as well. Or we add a helper method if we don't
> want to break all that API all over again. I'll think on this tonight.
Okay, I was thinking about the right way to do this. Currently we have:
proxy: system scope, designed to track per session (still to code
session tracking bits)
locale: transaction scope, designed to track per transaction
trusted: method scope, designed to be integral to the method, and used
to get policykit action.
So although a SetTrusted api call like SetLocale would get us free
backwards compatibility with 0.4.x, I think it's the wrong thing to do
from a 40,000ft architecture POV. We can break API in 0.5.x, and
gnome-packagekit (and hopefully KPackageKit) will be ifdef'd to
support both.
For this reason I'll be adding a trusted boolean argument to
InstallPackages, UpdatePackages and UpdateSystem. I'll send a mail in
a couple of days explaining why using trusted is so important with
polkit1, but it basically comes down to a lot more things are going to
be set to "allow" by default.
Richard.
More information about the PackageKit
mailing list