/[gentoo]/xml/htdocs/doc/en/handbook/hb-working-use.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-working-use.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.20 Revision 1.25
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 5<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-use.xml,v 1.20 2004/10/10 11:09:27 swift Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-use.xml,v 1.25 2004/12/26 14:56:32 swift Exp $ -->
8 8
9<sections> 9<sections>
10
11<version>1.22</version>
12<date>2004-12-26</date>
13
10<section> 14<section>
11<title>What are USE-flags?</title> 15<title>What are USE-flags?</title>
12<subsection> 16<subsection>
13<title>The ideas behind USE-flags</title> 17<title>The ideas behind USE-flags</title>
14<body> 18<body>
123<p> 127<p>
124As previously mentioned, all USE-flags are declared inside the <c>USE</c> 128As previously mentioned, all USE-flags are declared inside the <c>USE</c>
125variable. To make it easy for users to search and pick USE-flags, we already 129variable. To make it easy for users to search and pick USE-flags, we already
126provide a <e>default</e> USE setting. This setting is a collection of USE-flags 130provide a <e>default</e> USE setting. This setting is a collection of USE-flags
127we think are commonly used by the Gentoo users. This default setting is declared 131we think are commonly used by the Gentoo users. This default setting is declared
128in the <path>/etc/make.profile/make.defaults</path> file. Let us take a look at 132in the <path>make.defaults</path> files part of your profile. Let us take a
129this default setting: 133look at this default setting:
130</p> 134</p>
131 135
132<pre caption="/etc/make.profile/make.defaults USE variable on an x86 system"> 136<pre caption="/usr/portage/profiles/default-linux/x86/2004.3/make.defaults USE variable">
137<comment>(This is an example and might have changed since it was taken)</comment>
133USE="x86 oss apm arts avi berkdb crypt cups encode foomaticdb gdbm gif gpm 138USE="x86 oss apm arts avi berkdb crypt cups encode foomaticdb gdbm gif gpm
134 gtk gtk2 imlib jpeg kde gnome libg++ libwww mad mikmod motif mpeg ncurses 139 gtk gtk2 imlib jpeg kde gnome libg++ libwww mad mikmod motif mpeg ncurses
135 nls oggvorbis opengl pam pdflib png python qt quicktime readline sdl 140 nls oggvorbis opengl pam pdflib png python qt quicktime readline sdl
136 slang spell ssl svga tcpd truetype X xml2 xmms xv zlib" 141 slang spell ssl svga tcpd truetype X xml2 xmms xv zlib"
137</pre> 142</pre>
138 143
139<p> 144<p>
140As you can see, this variable already contains quite a lot of keywords. Do 145As you can see, this variable already contains quite a lot of keywords. Do
141<b>not</b> alter the <path>/etc/make.profile/make.defaults</path> file to tailor 146<b>not</b> alter any <path>make.defaults</path> file to tailor
142the <c>USE</c> variable to your needs: changes in this file will be undone when 147the <c>USE</c> variable to your needs: changes in this file will be undone when
143you update Portage! 148you update Portage!
144</p> 149</p>
145 150
146<p> 151<p>
207 212
208<p> 213<p>
209As an example we will temporarily remove java from the USE-setting 214As an example we will temporarily remove java from the USE-setting
210during the installation of mozilla. 215during the installation of mozilla.
211</p> 216</p>
212
213<note>
214The <c>emerge</c> command will be discussed more thoroughly in <uri
215link="?part=2&amp;chap=2">Portage and Software</uri>.
216</note>
217 217
218<pre caption="Using USE as environment variable"> 218<pre caption="Using USE as environment variable">
219# <i>USE="-java" emerge mozilla</i> 219# <i>USE="-java" emerge mozilla</i>
220</pre> 220</pre>
221 221
253by priority (first has lowest priority): 253by priority (first has lowest priority):
254</p> 254</p>
255 255
256<ol> 256<ol>
257 <li> 257 <li>
258 Default USE setting declared in <path>/etc/make.profile/make.defaults</path> 258 Default USE setting declared in the <path>make.defaults</path> files part of
259 your profile
259 </li> 260 </li>
260 <li> 261 <li>
261 Inherited USE setting if a package from 262 Inherited USE setting if a package from
262 <path>/etc/make.profile/use.defaults</path> is installed 263 <path>/etc/make.profile/use.defaults</path> is installed
263 </li> 264 </li>
288<title>Adapting your Entire System to New USE Flags</title> 289<title>Adapting your Entire System to New USE Flags</title>
289<body> 290<body>
290 291
291<p> 292<p>
292If you have altered your USE flags and you wish to update your entire system to 293If you have altered your USE flags and you wish to update your entire system to
293use the new USE flags, you can try following the next steps to accomplish this. 294use the new USE flags, use <c>emerge</c>'s <c>--newuse</c> option:
294Note however that these steps will take a long time to finish and that work is
295on the way to adjust Portage to handle this behaviour quicker and automatically.
296</p>
297
298<p>
299First of all, rebuild your entire system using the new USE flags:
300</p> 295</p>
301 296
302<pre caption="Rebuilding your entire system"> 297<pre caption="Rebuilding your entire system">
303# <i>emerge --emptytree world</i> 298# <i>emerge --update --deep --newuse world</i>
304</pre> 299</pre>
305 300
306<p> 301<p>
307Next, run Portage's depclean to remove the conditional dependencies that 302Next, run Portage's depclean to remove the conditional dependencies that
308were emerged on your "old" system but that have been obsoleted by the new USE 303were emerged on your "old" system but that have been obsoleted by the new USE
319<pre caption="Removing obsoleted packages"> 314<pre caption="Removing obsoleted packages">
320# <i>emerge -p depclean</i> 315# <i>emerge -p depclean</i>
321</pre> 316</pre>
322 317
323<p> 318<p>
319When depclean has finished, run <c>revdep-rebuild</c> to rebuild the
320applications that are dynamically linked against shared objects provided by
321possibly removed packages. <c>revdep-rebuild</c> is part of the
322<c>gentoolkit</c> package; don't forget to emerge it first.
323</p>
324
325<pre caption="Running revdep-rebuild">
326# <i>revdep-rebuild</i>
327</pre>
328
329<p>
324When depclean has finished, your system is using the new USE flag settings. 330When all this is accomplished, your system is using the new USE flag settings.
325</p> 331</p>
326 332
327</body> 333</body>
328</subsection> 334</subsection>
329</section> 335</section>
332<subsection> 338<subsection>
333<title>Viewing available USE-flags</title> 339<title>Viewing available USE-flags</title>
334<body> 340<body>
335 341
336<p> 342<p>
337In the next chapter on <uri link="?part=2&amp;chap=2">Portage and Software</uri>
338we will explain how to manage your installed software and how to work with
339<c>emerge</c>. However, we will give you a primer on <c>emerge</c> by showing
340you how to view what USE-flags a package uses.
341</p>
342
343<p>
344Let us take the example of <c>mozilla</c>: what USE-flags does it listen to? To 343Let us take the example of <c>mozilla</c>: what USE-flags does it listen to? To
345find out, we use <c>emerge</c> with the <c>--pretend</c> (don't really do 344find out, we use <c>emerge</c> with the <c>--pretend</c> and <c>--verbose</c>
346anything) and <c>--verbose</c> (give more output) options: 345options:
347</p> 346</p>
348 347
349<pre caption="Viewing the used USE-flags"> 348<pre caption="Viewing the used USE-flags">
350# <i>emerge --pretend --verbose mozilla</i> 349# <i>emerge --pretend --verbose mozilla</i>
351These are the packages that I would merge, in order: 350These are the packages that I would merge, in order:
361dedicated to package information called <c>etcat</c> which resides in the 360dedicated to package information called <c>etcat</c> which resides in the
362<c>gentoolkit</c> package. First, install <c>gentoolkit</c>: 361<c>gentoolkit</c> package. First, install <c>gentoolkit</c>:
363</p> 362</p>
364 363
365<pre caption="Installing gentoolkit"> 364<pre caption="Installing gentoolkit">
366# <i>emerge --usepkg gentoolkit</i> 365# <i>emerge gentoolkit</i>
367</pre> 366</pre>
368 367
369<p> 368<p>
370Now run <c>etcat</c> with the <c>uses</c> argument to view the USE-flags of a 369Now run <c>etcat</c> with the <c>uses</c> argument to view the USE-flags of a
371certain package. For instance, for the <c>gnumeric</c> package: 370certain package. For instance, for the <c>gnumeric</c> package:

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.20