PolicyKit authentication agent changes

Kevin Kofler kevin.kofler at chello.at
Sat Feb 26 10:58:33 UTC 2011

Christoph Wickert wrote:

> Am Mittwoch, den 23.02.2011, 20:08 -0500 schrieb Matthias Clasen:
>> Thats between you and the window managers... but
>> as far as gnome is concerned, we don't want to depend on anything
>> virtual, but control which agent is running.
> I can understand this very well, but I never said the DE should depend
> on the virtual provides, the applications should. A DE should depend on
> the agent of the desktop, the apps should depend on a generic agent and
> use the virtual provides.

Well, having the apps depend on the virtual Provides is only of limited use 
because what yum picks if you're lacking an agent is not necessary the 
correct agent for your desktop. The app cannot really know what agent is the 
correct one, so there's no good way to put the dependency in the app. (We 
can only have the app depend on "any PolicyKit authentication agent", which 
is what the virtual Provides does, but this still doesn't ensure that the 
correct one for your desktop is present.)

Therefore, the dependency really needs to be carried by the desktop 
environment, at which point there's no point in having the apps Require 
anything at all. IMHO, PolicyKit authentication should just be considered a 
basic desktop service which is present in ANY GUI desktop, it's up to the 
desktop environment to Require the proper agent (and up to there, I 
definitely agree with Matthias). In fact, kdebase-workspace already 
Requires: polkit-kde.

Once we're there, Matthias is saying that we can just as well have the 
desktop also START the authentication agent. I'm not entirely sure that this 
is the best approach, but at that point, this isn't really THAT important. 
You have to put in a Requires for the authentication agent anyway, so at 
that point you can just as well drop in an autostart file, too. (And in 
fact, don't some of the desktops/WMs you have in mind require their own non-
XDG autostart setup anyway?)

> Imagine you install gnome-packagekit in Xfce: It will pull in say
> polkit-gnome but still not work.

That's exactly why it's not the app's job to pull in an authentication 
agent. (Any application (as opposed to desktop environment / workspace) 
package with an explicit Requires on a specific agent is broken and needs to 
be fixed.)

> Summing it all up: I still don't see the benefit of the new packaging.
> polkit-gnome-authentication-agent-1 doesn't start on any 'random'
> desktop. Indeed this is a step in the right direction and I appreciate
> it because I'm on the receiving side of bugs [1].
> But wether or not polkit-gnome-authentication-agent-1 starts on any
> 'random' desktop has nothing to do with your new packaging but with the
> fact that you have switched from "NotShoIn" to "OnlyShowIn". The exactly
> same effect could be achieved without changing the packaging, so there
> is no benefit, but on the other hand it breaks many DEs / WMs that you
> might not care about.

The OnlyShowIn change would be breaking "random other WMs" anyway, if they 
expected polkit-gnome to run. And if not, why do you care where the 
autostart file sits? If it's OnlyShowIn=GNOME;, it'll have no effect for you 

        Kevin Kofler

More information about the devel mailing list