Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 220383 - sys-block/gparted-0.3.7 : gksu dependancy not really needed
Summary: sys-block/gparted-0.3.7 : gksu dependancy not really needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-05 15:20 UTC by Matteo Azzali (RETIRED)
Modified: 2008-06-15 18:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gparted-0.3.7-ebuild.patch (gparted_ebuild.patch,733 bytes, patch)
2008-05-05 15:30 UTC, Matteo Azzali (RETIRED)
Details | Diff
gparted-0.3.7.ebuild (gparted-0.3.7.ebuild,1.21 KB, text/plain)
2008-05-12 00:18 UTC, Jesús Guerrero Botella (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matteo Azzali (RETIRED) gentoo-dev 2008-05-05 15:20:06 UTC
gksu is not really needed,and pulls in some gnome (not gtk!) deps:
gnome-base/gconf, gnome-base/gnome-keyring, gnome-base/orbit, gnome-base/libgtop .

Could it be made optional (under gnome use flag or whatever else you like)
please?
Comment 1 Matteo Azzali (RETIRED) gentoo-dev 2008-05-05 15:30:21 UTC
Created attachment 151939 [details, diff]
gparted-0.3.7-ebuild.patch

proposed patch to ebuild
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-05-05 16:18:09 UTC
> "GParted is the Gnome Partition Editor"

gksu has been added so that it's seemlessly integrated into the desktop like gdmsetup and some other gnome admin apps. Now why don't you want gksu ? It's lightweight compared to gtkmm. Please also add a emerge --tree gparted so I can better see your problem.
Comment 3 Matteo Azzali (RETIRED) gentoo-dev 2008-05-05 19:23:03 UTC
I don't have any problem and I just don't want any gnome dep, I'm using kdesu,
I'm using -gnome as useflag, and gparted doesn't needs any of these deps
(already tested the proposed ebuild, works flawlessy):

emerge -pv --tree gparted

[ebuild  N    ] sys-block/gparted-0.3.7  USE="fat ntfs reiserfs xfs -debug -hfs -jfs -reiser4" 0 kB
[ebuild  N    ]  x11-libs/gksu-2.0.0  USE="-debug -doc -gnome" 431 kB
[ebuild  N    ]   x11-libs/libgksu-2.0.5  USE="nls -debug -doc" 486 kB
[ebuild  N    ]    gnome-base/gnome-keyring-2.22.1  USE="hal pam -debug -doc -test" 938 kB
[ebuild  N    ]     gnome-base/gconf-2.22.0  USE="-debug -doc -ldap" 1,384 kB
[ebuild  N    ]      gnome-base/orbit-2.14.12  USE="-debug -doc" 729 kB
[ebuild  N    ]    gnome-base/libgtop-2.22.1  USE="-debug" 764 kB
[ebuild  N    ]    x11-libs/startup-notification-0.9  221 kB
Comment 4 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-05-05 20:19:56 UTC
well I don't see anything shoking in these deps besides gnome-keyring which should probably be optional (but that's another story) the rest is non gui only.

I'll probably go for USE="+gnome" but one last question just ouf of interest, why aren't you using qtparted if you don't want anything gnome ?
Comment 5 Matteo Azzali (RETIRED) gentoo-dev 2008-05-06 14:41:50 UTC
Sadly, qtparted is nearly unmaintained, just 2 releases since 2004, see: http://qtparted.sourceforge.net/changes.en.html

also, I'm using gtk apps, what I have blocked is just gconf and such
(too much ebuilds, too much little deps to keep track of, for me...)
Comment 6 Jesús Guerrero Botella (RETIRED) gentoo-dev 2008-05-12 00:02:58 UTC
Qtparted is nowhere near gparted.
Qtparted is unmaintained, and it never worked well.

To start with, why should we have dependencies installed if they are not really required? It might seem trivial for you, but this is the way I see it:

========================
# emerge -uva gparted

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] sys-kernel/linux-headers-2.6.25-r2 [2.6.25-r1] 9 kB 
[ebuild  N    ] gnome-base/gnome-common-2.20.0  USE="-debug" 63 kB 
[ebuild  N    ] app-admin/eselect-esd-20060719  2 kB 
[ebuild     U ] app-editors/nano-2.1.1-r1 [2.1.1] USE="ncurses nls spell unicode -debug -justify -minimal -slang" 0 kB 
[ebuild  N    ] app-text/rarian-0.8.0-r1  USE="-debug" 331 kB 
[ebuild  N    ] app-text/scrollkeeper-9999  0 kB 
[ebuild     U ] app-admin/sudo-1.6.9_p16 [1.6.9_p15] USE="pam -ldap -offensive (-selinux) -skey" 580 kB 
[ebuild     U ] sys-apps/openrc-0.2.4 [0.2.3] USE="ncurses pam unicode -debug" 140 kB 
[ebuild     U ] dev-lang/perl-5.8.8-r5 [5.8.8-r4] USE="-berkdb -build -debug -doc -gdbm -ithreads -perlsuid" 0 kB 
[ebuild  N    ] dev-perl/XML-NamespaceSupport-1.09  8 kB 
[ebuild  N    ] perl-core/Storable-2.16  170 kB 
[ebuild  N    ] perl-core/Test-Simple-0.80  80 kB 
[ebuild     U ] perl-core/Test-Harness-3.10 [2.64] 0 kB 
[ebuild  N    ] dev-perl/XML-LibXML-Common-0.13  13 kB 
[ebuild  N    ] dev-perl/XML-SAX-0.16  59 kB 
[ebuild  N    ] virtual/perl-Test-Simple-0.80  0 kB 
[ebuild  N    ] virtual/perl-Storable-2.16  0 kB 
[ebuild  N    ] dev-perl/XML-LibXML-1.66  271 kB 
[ebuild  N    ] dev-perl/XML-Simple-2.18  70 kB 
[ebuild  N    ] x11-misc/icon-naming-utils-0.8.6  68 kB 
[ebuild  N    ] gnome-base/gnome-mime-data-2.18.0  USE="-debug" 593 kB 
[ebuild  N    ] x11-themes/gnome-icon-theme-2.22.0  USE="-debug" 3,581 kB 
[ebuild     U ] x11-misc/util-macros-1.1.6-r1 [1.1.6] 0 kB 
[ebuild     U ] dev-libs/libusb-0.1.12-r2 [0.1.12-r1] USE="-debug -doc" 0 kB 
[ebuild  N    ] sys-apps/acl-2.2.47  USE="nls (-nfs)" 152 kB 
[ebuild  N    ] app-text/sgml-common-0.6.3-r5  75 kB 
[ebuild  N    ] media-sound/esound-0.2.38-r1  USE="ipv6 -alsa -debug -doc -tcpd" 385 kB 
[ebuild     U ] net-libs/gnutls-2.2.3 [2.2.2] USE="nls zlib -bindist -doc -guile -lzo" 4,805 kB 
[ebuild     U ] x11-libs/xtrans-1.2 [1.0.4] USE="-debug" 0 kB 
[ebuild  N    ] app-text/docbook-xml-dtd-4.4-r1  94 kB 
[ebuild  N    ] app-text/gnome-doc-utils-0.12.2  USE="-debug" 582 kB 
[ebuild     U ] x11-apps/xkbcomp-1.0.5 [1.0.4] USE="-debug" 197 kB 
[ebuild  N    ] gnome-base/libgtop-2.22.1  USE="-debug" 764 kB 
[ebuild  N    ] net-libs/libsoup-2.4.1  USE="ssl -debug -doc" 614 kB 
[ebuild  N    ] gnome-base/libbonobo-2.22.0  USE="-debug -doc" 1,412 kB 
[ebuild  N    ] gnome-base/gail-1.22.1  USE="-debug -doc" 659 kB 
[ebuild     U ] x11-apps/xinit-1.0.8-r3 [1.0.8-r2] USE="hal minimal pam -debug" 0 kB 
[ebuild  N    ] gnome-base/gnome-vfs-2.22.0  USE="acl fam ipv6 kerberos -avahi -debug -doc -gnutls -hal -samba -ssl" 1,895 kB 
[ebuild  N    ] gnome-base/libgnome-2.22.0  USE="esd -debug -doc" 1,375 kB 
[ebuild  N    ] gnome-base/gvfs-0.2.3  USE="gnome hal -avahi -bluetooth -cdda -debug -doc -fuse -gnome-keyring -gphoto2 -samba" 811 kB 
[ebuild  N    ] x11-libs/libgksu-2.0.5  USE="nls -debug -doc" 486 kB 
[ebuild  N    ] gnome-base/libgnomecanvas-2.20.1.1  USE="X -debug -doc" 570 kB 
[ebuild     U ] x11-drivers/xf86-video-nv-2.1.9 [2.1.8] USE="-debug" 377 kB 
[ebuild  N    ] gnome-base/libbonoboui-2.22.0  USE="X -debug -doc" 983 kB 
[ebuild  N    ] gnome-base/libgnomeui-2.22.1  USE="jpeg -debug -doc" 1,417 kB 
[ebuild  N    ] gnome-base/gnome-desktop-2.22.1  USE="-debug -doc" 1,410 kB 
[ebuild  N    ] gnome-base/eel-2.22.1  USE="X -debug" 599 kB 
[ebuild  N    ] gnome-base/nautilus-2.22.2  USE="X -beagle -debug -gnome -tracker" 4,915 kB 
[ebuild  N    ] x11-libs/gksu-2.0.0  USE="gnome -debug -doc" 431 kB 
[ebuild     U ] sys-block/gparted-0.3.7 [0.3.6] USE="debug -fat -hfs -jfs -ntfs -reiser4 -reiserfs -xfs" 554 kB 
[ebuild     UD] x11-drivers/nvidia-drivers-169.12 [173.08] USE="acpi custom-cflags gtk (-multilib)" 15,263 kB [1=>0]

Total: 51 packages (14 upgrades, 1 downgrade, 36 new), Size of downloads: 46,845 kB
========================

Besides some updates, most stuff in that list is marked as 'N', which basically menas that it's being pulled into my system by gparted.

There's absolutely no reason that justifies installing nautilus to get gparted. It's just nonsensical. I am not allergic to gnome nor gtk apps, but I don't feel like compiling a big monolith like nautilus every time that there's an update for it.

For now, I will overlay this and add a -gnome use flag there. But this should be fixed in portage.

Remember: that a given application's name start with a 'g' doesn't mean that the name of your desktop or window manager has also to start with a 'g'. And you should not force anyone to install gnome just because you think that the integration with gksu is a must.

I kindly ask for a new use flag :)
Comment 7 Jesús Guerrero Botella (RETIRED) gentoo-dev 2008-05-12 00:18:38 UTC
Created attachment 152885 [details]
gparted-0.3.7.ebuild

Improved ebuild which also supports kdesu. Both can be turned on for those of use that don't need such things. It's a pure gtk program and it should not need gnome nor kde to run.

Regards.
Comment 8 Arun Raghavan (RETIRED) gentoo-dev 2008-05-26 11:22:22 UTC
(In reply to comment #7)
> Created an attachment (id=152885) [edit]
> gparted-0.3.7.ebuild
> 
> Improved ebuild which also supports kdesu. Both can be turned on for those of
> use that don't need such things. It's a pure gtk program and it should not need
> gnome nor kde to run.

Could you provide a patch against the current ebuild in-tree instead? It makes review a lot simpler. Thanks.
Comment 9 Konst 2008-06-14 11:25:32 UTC
Here is the patch i did with 
`diff -Naur gparted-0.3.7.ebuild gparted-0.3.7-nogksudep.ebuild > patchfile`
here is the `cat patchfile`:

--- gparted-0.3.7.ebuild        2008-05-04 13:43:14.000000000 +0200
+++ gparted-0.3.7-nogksudep.ebuild      2008-06-14 15:15:39.000000000 +0200
@@ -12,13 +12,14 @@
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-IUSE="fat hfs jfs ntfs reiserfs reiser4 xfs"
+IUSE="fat gnome hfs kde jfs ntfs reiserfs reiser4 xfs"

 common_depends=">=sys-apps/parted-1.7.1
                >=dev-cpp/gtkmm-2.8.0"

 RDEPEND="${common_depends}
-               x11-libs/gksu
+               gnome? ( x11-libs/gksu )
+               kde? ( kde-base/kdesu )
                fat? ( sys-fs/dosfstools )
                ntfs? ( sys-fs/ntfsprogs )
                hfs? ( sys-fs/hfsutils )
@@ -34,5 +35,17 @@
 src_unpack() {
        gnome2_src_unpack

-       sed -i "s:Exec=:Exec=gksu :" gparted.desktop.in.in
+       if use gnome
+       then
+               if use kde
+               then
+                       die "Only one desktop might be enabled. Disable either gnome or kde."
+               fi
+               sed -i "s:Exec=:Exec=gksu :" gparted.desktop.in.in
+       fi
+
+       if use kde
+       then
+               sed -i "s:Exec=:Exec=kdesu :" gparted.desktop.in.in
+       fi
 }
Comment 10 Arun Raghavan (RETIRED) gentoo-dev 2008-06-14 12:09:19 UTC
This is just my opinion, but I think it is a bad thing that the ebuild dies if the user has both 'gnome' and 'kde' in USE. Perhaps the default should be to pick one (I'm partial towards 'gksu') if both are selected and throow an ewarn or einfo stating that it is doing so.

Thoughts?
Comment 11 Konst 2008-06-14 13:52:37 UTC
I also got this:
[blocks B     ] =kde-base/kdebase-3.5* (is blocking kde-base/kdesu-3.5.9)
[blocks B     ] kde-base/kdesu:3.5 (is blocking kde-base/kdebase-3.5.9-r4)

I think the best way is just to remove kdesu dependency and have a system wide "su-something" script which will execute su/gksu/kdesu depending on environment or user preferences.
Comment 12 Rémi Cardona (RETIRED) gentoo-dev 2008-06-14 15:31:04 UTC
What about 2 identical .desktop launchers but each with a line specifying which DE should be allowed to present it.

I don't remember the exact syntax for it, but I'm pretty sure it can be done.
Comment 13 Konst 2008-06-14 15:33:41 UTC
The fix for my problem would be
-               kde? ( kde-base/kdesu )
+               kde? ( || ( kde-base/kdesu kde-base/kdebase ) )

Also if you think a su script would be a good idea i could try to write one.
If there is no kdesu/gksu, one can launch xterm with su prompt like that:
xterm -e /bin/su -c "program name"
Comment 14 Arun Raghavan (RETIRED) gentoo-dev 2008-06-14 16:25:44 UTC
> Also if you think a su script would be a good idea i could try to write one.
> If there is no kdesu/gksu, one can launch xterm with su prompt like that:
> xterm -e /bin/su -c "program name"

There's no guarantee that xterm will be present, really.
Comment 15 Konst 2008-06-15 12:45:53 UTC
How about this:
If there is no xterm in worst case it would leave the gparted shortcut alone.
If both gnome and kde are enabled it will use gksu. I still think the global su script would be better because it would choose correct gksu/kdesu/xterm -c or something else at runtime and even after the user changed his dektop environment or preference without the need to edit gparted shortcut.

--- gparted-0.3.7.ebuild        2008-05-04 13:43:14.000000000 +0200
+++ gparted-0.3.7-nogksudep.ebuild      2008-06-15 16:28:36.000000000 +0200
@@ -12,13 +12,14 @@
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
-IUSE="fat hfs jfs ntfs reiserfs reiser4 xfs"
+IUSE="fat gnome hfs kde jfs ntfs reiserfs reiser4 xfs"

 common_depends=">=sys-apps/parted-1.7.1
                >=dev-cpp/gtkmm-2.8.0"

 RDEPEND="${common_depends}
-               x11-libs/gksu
+               gnome? ( x11-libs/gksu )
+               kde? ( || ( kde-base/kdesu kde-base/kdebase ) )
                fat? ( sys-fs/dosfstools )
                ntfs? ( sys-fs/ntfsprogs )
                hfs? ( sys-fs/hfsutils )
@@ -34,5 +35,16 @@
 src_unpack() {
        gnome2_src_unpack

-       sed -i "s:Exec=:Exec=gksu :" gparted.desktop.in.in
+       if use gnome
+       then
+               sed -i "s:Exec=:Exec=gksu :" gparted.desktop.in.in
+
+       elif use kde
+       then
+               sed -i "s:Exec=:Exec=kdesu :" gparted.desktop.in.in
+
+       elif [[ -e "/usr/bin/xterm" ]]
+       then
+               sed -i "s:Exec=:Exec=xterm -e /bin/su -c :" parted.desktop.in.in
+       fi
 }
Comment 16 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-06-15 18:56:27 UTC
since we don't have a magic unique helper for every DE, I've only took care of kde/gnome/xfce. If you don't have any of these you won't even see the entry anymore (because it makes no sense to show something that just throw an error like message at you).

I've followed remi's suggestion which should work nicely, I hope it'll satisfy everyone. Closing for now.