[packagekit] PolicyKit dbus interfacing

Aidan Skinner aidan at skinner.me.uk
Wed Aug 6 15:05:10 PDT 2008


Right, I'm probably being a numpty, but I just cannot get my head around
this.

Trying to update or install packages gets me 
"ERROR: org.freedesktop.PackageKit.Transaction.RefusedByPolicy:
org.freedesktop.packagekit.install auth_admin_keep_always"

Fair enough, so I try to auth with:

        policykit =
self.bus.get_object('org.freedesktop.PolicyKit.AuthenticationAgent',
'/',
'org.gnome.PolicyKit.AuthorizationManager.SingleInstance')
        if(policykit == None):
           print("Error: Could not get PolicyKit D-Bus Interface\n")
        granted =
policykit.ObtainAuthorization("org.freedesktop.packagekit.update-system", (dbus.UInt32)(tid), (dbus.UInt32)(os.getpid()))

which fails to find org.freedesktop.PolicyKit.AuthenticationAgent, even
though there are a couple of .service files
in /usr/share/dbus-1/services/ and the packagekit UI can find it... (I
also tried a few variations on that theme, but no joy)

halp plz?

- Aidan
            
-- 
e/msn: aidan at skinner.me.uk g:aidan.skinner aim/y!: aidans42 
http://aidan-skinner.livejournal.com/
ssh-rsa: http://aidan.skinner.me.uk/pubkey.rsa
gnupg: http://aidan.skinner.me.uk/pubkey.gpg




More information about the PackageKit mailing list