Created attachment 301339 [details] gsu-0.ebuild Since there are already 3 solutions for graphical su (gksu, kdesu and ktsuss) I think it would be good to have a virtual package in the tree in case an app relies on any graphical su
Assigning randomly. I doubt this is going to work without a wrapper/eselect.
I don't like the look of deps You can set REQUIRED_USE="|| ( gtk kde )" RDEPEND=" gtk? ( || ( x11-libs/gksu x11-misc/ktsuss ) ) kde? ( kde-base/kdesu )" Also, what ebuilds in tree should depend on this by your design?
I don't see how a virtual can help in this case. Like Jeroen said, you need an eselect module or something. Even that is not good enough. Can you please give us a test case on where this virtual can be used?
x11-misc/spacefm provides an internal option whether to use gksu/kdesu/ktsuss for the "root window"/"root terminal" functionality. (Bug #402135 made me think about a 'virtual'-solution) gparted ebuild has some fancy lines to put either gksu or kdesu in gparted{,-kde}.desktop. wicd also depends on either gksu or kdesu... I am not sure myself what would make sense. Wouldn't an eselect/wrapper break things, because gksu/kdesu/ktsuss have different command line options? The initial idea was to provied at least one graphical sudo or a specific one depending on the useflags. I dont like "gtk? ( || ( x11-libs/gksu x11-misc/ktsuss ) )" because I can't control which one to install this way. I didn't use REQUIRED_USE because there may be packages that dont care which graphical su to install (like spacefm). I sorted the line "|| ( x11-misc/ktsuss x11-libs/gksu kde-base/kdesu )" by dependency-bloat. another approach: IUSE="gnome gtk kde" REQUIRED_USE="|| ( gtk kde )" RDEPEND=" gtk? ( !gnome? ( x11-misc/ktsuss ) gnome? ( x11-libs/gksu ) ) kde? ( kde-base/kdesu )" or without required_use IUSE="gnome gtk kde" RDEPEND=" gtk? ( !gnome? ( x11-misc/ktsuss ) gnome? ( x11-libs/gksu ) ) kde? ( kde-base/kdesu )" || ( x11-misc/ktsuss x11-libs/gksu kde-base/kdesu )"
As long as there is no specification[1] by the freedesktop community i think its not guaranteed that you can replace the dialog by another in each app. A virtual would make more troubles than just specify the deps for the provided su dialogs by the application. [1] http://www.freedesktop.org/wiki/Specifications
(In reply to comment #4) > x11-misc/spacefm provides an internal option whether to use gksu/kdesu/ktsuss > for the "root window"/"root terminal" functionality. (Bug #402135 made me think > about a 'virtual'-solution) No because you need to know which gsu is installed to fix the code appropriately. > > gparted ebuild has some fancy lines to put either gksu or kdesu in > gparted{,-kde}.desktop. Same. virtual/gsu says nothing about which gsu is installed so you can't use it to do fancy staff. An eselect module could implement a symlink say, /usr/bin/gentoo-gsu where you can point either kdesu or gksu to that. That's the only way to implement it in my opinion. Of course all packages that depend on virtual/gsu need to be patched to set the /usr/bin/gentoo-su as the default gui application. Personally I see no reason to do that just to avoid the 3 extra lines of deps.
afaik, some distros started removing graphical su/sudo programs by a polkit based solution. I never bothered to investigate but this would be a better solution imho. I'm not a big fan of polkit but it gives more flexibility for sure.
wontfix?
I guess we've collected enough comments. Wontfix.