/[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.16 Revision 1.17
1<?xml version='1.0' encoding='UTF-8'?> 1<?xml version='1.0' encoding='UTF-8'?>
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.16 2004/07/07 19:19:26 neysx Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-use.xml,v 1.17 2004/08/01 13:08:35 swift Exp $ -->
8 8
9<sections> 9<sections>
10<section> 10<section>
11<title>What are USE-flags?</title> 11<title>What are USE-flags?</title>
12<subsection> 12<subsection>
13<title>The ideas behind USE-flags</title> 13<title>The ideas behind USE-flags</title>
14<body> 14<body>
15 15
16<p> 16<p>
17When you are installing Gentoo (or any other distribution, or even operating 17When you are installing Gentoo (or any other distribution, or even operating
18system for that matter) you make choices depending on the environment you are 18system for that matter) you make choices depending on the environment you are
19working with. A setup for a server differs from a setup for a workstation. 19working with. A setup for a server differs from a setup for a workstation.
20A gaming workstation differs from a 3D rendering workstation. 20A gaming workstation differs from a 3D rendering workstation.
21</p> 21</p>
22 22
143<c>USE</c> variable. This is done globally by defining the <c>USE</c> variable 143<c>USE</c> variable. This is done globally by defining the <c>USE</c> variable
144in <path>/etc/make.conf</path>. In this variable you add the extra USE-flags you 144in <path>/etc/make.conf</path>. In this variable you add the extra USE-flags you
145require, or remove the USE-flags you don't want. This latter is done by 145require, or remove the USE-flags you don't want. This latter is done by
146prefixing the keyword with the minus-sign ("-"). 146prefixing the keyword with the minus-sign ("-").
147</p> 147</p>
148 148
149<p> 149<p>
150For instance, to remove support for KDE and QT but add support for ldap, the 150For instance, to remove support for KDE and QT but add support for ldap, the
151following <c>USE</c> can be defined in <path>/etc/make.conf</path>: 151following <c>USE</c> can be defined in <path>/etc/make.conf</path>:
152</p> 152</p>
153 153
154<pre caption="An example USE setting in /etc/make.conf"> 154<pre caption="An example USE setting in /etc/make.conf">
155USE="-kde -qt ldap" 155USE="-kde -qt ldap"
156</pre> 156</pre>
157 157
158<p>
159Sometimes you want to declare a certain USE flag for one (or a couple) of
160applications but not system-wide. To accomplish this, you will need to create
161the <path>/etc/portage</path> directory (if it doesn't exist yet) and edit
162<path>/etc/portage/package.use</path>.
163</p>
164
165<p>
166For instance, if you don't want <c>berkdb</c> support globally but you do want
167it for <c>mysql</c>, you would add:
168</p>
169
170<pre caption="/etc/portage/package.use example">
171dev-db/mysql berkdb
172</pre>
173
174<p>
175You can of course also explicitly <e>disable</e> USE flags for a certain
176application. For instance, if you don't want <c>java</c> support in PHP:
177</p>
178
179<pre caption="/etc/portage/package.use 2nd example">
180dev-php/php -java
181</pre>
182
158</body> 183</body>
159</subsection> 184</subsection>
160<subsection> 185<subsection>
161<title>Declare temporary USE-flags</title> 186<title>Declare temporary USE-flags</title>
162<body> 187<body>
163 188
164<p> 189<p>
165Sometimes you want to set a certain USE-setting only once. Instead of editing 190Sometimes you want to set a certain USE-setting only once. Instead of editing
166<path>/etc/make.conf</path> twice (to do and undo the USE-changes) you can just 191<path>/etc/make.conf</path> twice (to do and undo the USE-changes) you can just
167declare the USE-variable as environment variable. 192declare the USE-variable as environment variable. Remember that, when you
193re-emerge or update this application (either explicitly or as part of a system
194update) your changes will be lost!
168</p> 195</p>
169 196
170<p> 197<p>
171As an example we will temporarily remove java from the USE-setting 198As an example we will temporarily remove java from the USE-setting
172during the installation of mozilla. 199during the installation of mozilla.
173</p> 200</p>
174 201
175<note> 202<note>
176The <c>emerge</c> command will be discussed more thoroughly in <uri 203The <c>emerge</c> command will be discussed more thoroughly in <uri
177link="?part=2&amp;chap=2">Portage and Software</uri>. 204link="?part=2&amp;chap=2">Portage and Software</uri>.
178</note> 205</note>
179 206
180<pre caption="Using USE as environment variable"> 207<pre caption="Using USE as environment variable">
181# <i>USE="-java" emerge mozilla</i> 208# <i>USE="-java" emerge mozilla</i>
182</pre> 209</pre>
215by priority (first has lowest priority): 242by priority (first has lowest priority):
216</p> 243</p>
217 244
218<ol> 245<ol>
219 <li> 246 <li>
220 Default USE setting declared in <path>/etc/make.profile/make.defaults</path> 247 Default USE setting declared in <path>/etc/make.profile/make.defaults</path>
221 </li> 248 </li>
222 <li> 249 <li>
223 Inherited USE setting if a package from 250 Inherited USE setting if a package from
224 <path>/etc/make.profile/use.defaults</path> is installed 251 <path>/etc/make.profile/use.defaults</path> is installed
225 </li> 252 </li>
226 <li> 253 <li>
227 User-defined USE setting in <path>/etc/make.conf</path> 254 User-defined USE setting in <path>/etc/make.conf</path>
228 </li> 255 </li>
229 <li> 256 <li>
257 User-defined USE setting in <path>/etc/portage/package.use</path>
258 </li>
259 <li>
230 User-defined USE setting as environment variable 260 User-defined USE setting as environment variable
231 </li> 261 </li>
232</ol> 262</ol>
233 263
234<p> 264<p>
235To view the final <c>USE</c> setting as seen by Portage, run <c>emerge info</c>. 265To view the final <c>USE</c> setting as seen by Portage, run <c>emerge info</c>.
236This will list all relevant variables (including the <c>USE</c> variable) with 266This will list all relevant variables (including the <c>USE</c> variable) with
237the content used by Portage. 267the content used by Portage.
238</p> 268</p>
239 269
240<pre caption="Running emerge info"> 270<pre caption="Running emerge info">
241# <i>emerge info</i> 271# <i>emerge info</i>
242</pre> 272</pre>
243 273
244</body> 274</body>

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.20