Gentoo Archives: gentoo-user

From: Holly Bostick <motub@××××××.nl>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Need help with USE options.
Date: Sat, 31 Dec 2005 14:41:01
Message-Id: 43B6975E.2000804@planet.nl
In Reply to: [gentoo-user] Need help with USE options. by Dale
1 Dale schreef:
2 > Hi again,
3 >
4 > I read a thread that was talking about the global USE pulling some
5 > things a user may not want installed. I am going to do a reinstall
6 > and mostly copy some things over from my current install but I do
7 > want to change my USE line. I am a bit worried about using the
8 > option they posted, the "-*" at the beginning of the USE line. I may
9 > disable something that I need then.
10
11 The first thing you need to understand is that USE flags enable/disable
12 *optional* support for supplemental applications. USE flags will never
13 affect anything that you "need" (to run the system), though it may
14 affect things that you "want" (for your own ease and comfort).
15
16 For example:
17
18 I run fvwm-crystal (not KDE, thus, and also not GNOME, though GNOME is
19 installed). However, I do use the KDE program K3b for CD burning.
20
21
22 emerge -pv k3b
23
24 These are the packages that I would merge, in order:
25
26 Calculating dependencies ...done!
27 [ebuild R ] app-cdr/k3b-0.12.10 +alsa -arts +css -debug +dvdr
28 +encode +ffmpeg +flac +hal -kde +kdeenablefinal +mp3 +musepack
29 +musicbrainz +sndfile +vcd +vorbis -xinerama 0 kB
30
31
32 As you can see, I have kde and arts support diasabled. Since I do not
33 use KDE (or even have more than a minimal KDE installed), adding such
34 support would be pointless (bloat), since enabling the "arts" USE flag
35 would bring in aRTs (the KDE sound server, which I wouldn't use even if
36 I did use KDE), and enabling the "kde" USE flag would bring in
37 "k3bSetup2", which is a nice little utility to correct the permissions
38 on the CD/DVD burner if necessary, but it's not really "mission
39 critical" enough to warrant bringing in the additional KDE backend
40 required to support it (if the permissions need to be changed, I can do
41 it myself in 15 seconds, I don't need a GUI from a DE that I don't even
42 use just to do that).
43
44 But you can see from the dependency list that in order to install K3b, I
45 must install kde-env, kdebase, kdelibs, and kdesu; those are /hard/
46 dependencies, requried by the application in order for it to run at all;
47 the applications/libraries installed by the *USE* flags noted are optional:
48
49 Runtime Dependencies
50 k3b-0.12.9
51
52 | >= app-cdr/cdrdao - 1.1.7-r3
53 kde-base/kde-env3
54 kde-base/kdebase
55 | >= kde-base/kdelibs - 3.3
56 kde-base/kdesu
57 media-libs/libsamplerate
58 media-libs/taglib
59 | >= media-sound/cdparanoia - 3.9.8
60 media-sound/normalize
61 = x11-libs/qt - 3.3*
62 *css* media-libs/libdvdcss
63 *encode* media-sound/lame
64 *encode* media-sound/sox
65 *ffmpeg* media-video/ffmpeg
66 *flac* media-libs/flac
67 *hal* sys-apps/dbus
68 *mp3* media-libs/libmad
69 *musepack* media-libs/libmpcdec
70 *musicbrainz* media-libs/musicbrainz
71 *sndfile* media-libs/libsndfile
72 *vcd* media-video/vcdimager
73 *vorbis* media-libs/libvorbis
74 virtual/cdrtools
75 *alsa* media-libs/alsalib
76 *dvdr* app-cdr/dvd+rwtools
77
78 So the necessary KDE backend for the program to run is installed, just
79 not any "extras" that I don't necessarily want to use. That's what USE
80 flags do.
81
82 >
83 > I use KDE for my desktop. I plan to have OOc installed along with
84 > java and that sort of thing. I don't have any database software
85 > installed, that I know of anyway. I want to make this a reasonable
86 > install this time. I have a lot of gnome stuff installed right now
87 > and I don't use gnome at all.
88
89 So, add "-gnome" to your global USE flags-- oh, I see you already do--
90 and then do an emerge -uaDNtv world (to recompile all apps compiled with
91 "gnome" support without it), and then an emerge depclean -p and then an
92 emerge depclean (or unmerge various packages individually) to remove the
93 now-unnecessary GNOME libs that were previously installed. You might
94 also want to disable "gtk", and "gtk2".
95
96 When you say you "have a lot of gnome stuff installed", what precisely
97 do you mean, anyway? You seem to have -gnome in your USE flags, so it's
98 not as if you have applications installing unnecessary (for you) GNOME
99 libs and such. And surely you did not explicitly install GNOME-- or did
100 you? If so, unmerge it (if you emerged gnome or gnome-light, this will
101 only unmerge the meta packages, not the applications installed by the
102 meta packages), and then do an emerge depclean -p (and then an emerge
103 depclean, or unmerge the packages individually) to remove the
104 now-orphaned GNOME dependencies.
105
106 But you may have a number of packages that depend natively on GNOME/GTK
107 libs; and if so, then you're just stuck with those, in the same way I'm
108 stuck with kdebase and qt if I want to use K3b. If that's a real problem
109 for you, investigate what programs those may be and see if you can find
110 a KDE or generic X-based alternative (for example, if you use gcolor2, a
111 GTK/GNOME color-chooser, you may want to switch to kcoloredit, the KDE
112 color chooser).
113
114
115 > This is my current USE line:
116 >
117 >> USE="acl acpi alsa amd arts artsd artswrappersuid -bonobo cdr
118 >> chroot clanJavaScript -crypt dbus doc -eds ethereal f-prot fdftk
119 >> gaim gcj gimpprint gkrellm -gnome gphoto2 gtk -gtkhtml hal hbci
120 >> hpijs gif innodb java javascript jbig justify kde mmx mozdomi
121 >> mozilla nsplugin ofx offensive openoffice -oss parse-clocks ppds
122 >> pysol scanner scribus sse tcltk tiff tkinter truetype tuxracer udev
123 >> usb X xml xprint yahoo 3dnow "
124
125 This means nothing to me, since I have no idea what your system does or
126 what you do with it.
127
128 Do you need optional "java" and "javascript" support globally, for
129 example? Do you develop java or javascript? Maybe you do; I don't know--
130 at least then having the "gcj" USE flag enabled would make sense (since
131 "gcj" is the gcc support for a java compiler, afaik).
132
133 Myself, I don't, so I disabled that globally, and only enabled it in
134 /etc/portage/package.use for those programs I know I want java and
135 javascript support for (firefox, basically).
136
137 Do you do desktop publishing? Do you even use scribus? Do all
138 applications you may or may not have installed that *can* use Scribus
139 actually *need* to have *optional* "scribus" support enabled?
140
141 And if you don't use a database, why do you have the innodb USE flag
142 enabled?
143
144 USE flags customize your system to your personal needs, and I cannot
145 know your personal needs-- only you can.
146
147 So I would suggest reading through /usr/portage/profiles/use.desc and
148 /usr/portage/profiles/use.local.desc to understand what the USE flags
149 you have enabled actually do. Myself, I have an alias in ~/.bashrc,
150 "stolen" from this list, to quickly scan USE flag definitions:
151
152 alias useflag="grep /usr/portage/profiles/use.*desc -e"
153
154 So if I do an emerge -uaDNtv world and see a USE flag I don't
155 understand, I can just do a
156 (taken from the k3b USE flags above):
157
158 useflag sndfile
159 /usr/portage/profiles/use.desc:sndfile - Adds support for libsndfile
160
161 and make my own decision about whether I want libsndfile support enabled
162 or not.
163
164 I've gotta say, that when I install Gentoo, the longest part of the
165 installation for me is in fact not the kernel compilation (that's the
166 second longest), but the scanning of the USE flags and reading of the
167 notes, to make sure I disable what I don't want and enable what I do. I
168 could, of course, just leave everything be, and then fix it all later as
169 you are now doing (that's easy enough), but I'm a recovering
170 perfectionist as well, so I like to take the time and get it closer to
171 right the first time.
172
173 My USE flags are pretty generic
174
175 USE="-kde -arts -eds -esd 16bit 3dnow acpi -apm audiofile -berkdb
176 bigger-fonts caps cddb dbus dga dv dvd fbcon firefox font-server
177 gimpprint glut gtkhtml gnutls hal iconv inkjar -ipv6 jack jikes
178 kdeenablefinal kdexdeltas lcms libcaca maildir mmx mng -mozilla mpi nfs
179 nptl offensive openexr -pam pic portaudio povray sndfile socks5 sqlite
180 sse -sse2 svg threads toolbar unicode v4l wmf xprint xvid yv12"
181
182 but my /etc/portage/package.use is 115 lines.
183
184 I'm happy with that because even looking at it now, I can see that my
185 global USE flags really */are/* global, enabling support for things I
186 don't want to have to worry about (I want everything that could have
187 unicode support to actually have it enabled without me worrying about
188 it) and disabling support for things I know I don't want (if any package
189 I may choose to compile could have KDE
190 support, I know I don't want it, without having to worry about it, and I
191 don't think I even have ipv6, so I know I don't want that), and
192 so I know the reason that my package.use is so long is because it
193 enables/disables *specific* options in *specific* applications, which is
194 what it's supposed to do.
195
196 Such as
197
198 media-video/ffmpeg -mmx
199
200 Globally, I want mmx support, but ffmpeg won't compile on my system if
201 such support is enabled, so the support is disabled for that particular
202 program.
203
204 On the other hand, "extra" documentation support (the "doc" USE flag) is
205 usually disabled by default if it appears at all, but I've enabled it
206 for imagemagick:
207
208 media-gfx/imagemagick doc
209
210 because I consider imagemagick complex enough that I want to have the
211 docs available (because I will surely need them).
212
213 I use Samba, but I don't necessarily want everything that can have Samba
214 support to have Samba support, so for certain packages, "samba" is
215 specifically enabled in package.use, but not globally.
216
217 That's the way it's supposed to work, afaik. It does mean you have to
218 buckle down and think about what you specifically want/need, but
219 "customization" always requires that, whether it's because you're
220 detailing your hotrod (I've clearly seen too much "American Chopper",
221 "Pimp My Ride" and "Wheeler Dealers" this week, damn boyfriend, damn
222 Discovery and MTV) or because you're fine-tuning Gentoo.
223
224 HTH,
225 Holly
226 --
227 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Need help with USE options. Dale <dalek@××××××××××.net>
Re: [gentoo-user] Need help with USE options. Dale <dalek@××××××××××.net>