| 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.24 2004/11/20 22:23:30 neysx 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 | |
10 | |
| 11 | <version>1.21</version> |
11 | <version>1.22</version> |
| 12 | <date>2004-10-21</date> |
12 | <date>2004-12-26</date> |
| 13 | |
13 | |
| 14 | <section> |
14 | <section> |
| 15 | <title>What are USE-flags?</title> |
15 | <title>What are USE-flags?</title> |
| 16 | <subsection> |
16 | <subsection> |
| 17 | <title>The ideas behind USE-flags</title> |
17 | <title>The ideas behind USE-flags</title> |
| 18 | <body> |
18 | <body> |
| 19 | |
19 | |
| 20 | <p> |
20 | <p> |
| 21 | When you are installing Gentoo (or any other distribution, or even operating |
21 | When you are installing Gentoo (or any other distribution, or even operating |
| 22 | system for that matter) you make choices depending on the environment you are |
22 | system for that matter) you make choices depending on the environment you are |
| 23 | working with. A setup for a server differs from a setup for a workstation. |
23 | working with. A setup for a server differs from a setup for a workstation. |
| 24 | A gaming workstation differs from a 3D rendering workstation. |
24 | A gaming workstation differs from a 3D rendering workstation. |
| 25 | </p> |
25 | </p> |
| 26 | |
26 | |
| 27 | <p> |
27 | <p> |
| … | |
… | |
| 117 | <title>Using USE-flags</title> |
117 | <title>Using USE-flags</title> |
| 118 | <subsection> |
118 | <subsection> |
| 119 | <title>Declare permanent USE-flags</title> |
119 | <title>Declare permanent USE-flags</title> |
| 120 | <body> |
120 | <body> |
| 121 | |
121 | |
| 122 | <p> |
122 | <p> |
| 123 | In the hope you are convinced of the importance of USE-flags we will now inform |
123 | In the hope you are convinced of the importance of USE-flags we will now inform |
| 124 | you how to declare USE-flags. |
124 | you how to declare USE-flags. |
| 125 | </p> |
125 | </p> |
| 126 | |
126 | |
| 127 | <p> |
127 | <p> |
| 128 | As previously mentioned, all USE-flags are declared inside the <c>USE</c> |
128 | As previously mentioned, all USE-flags are declared inside the <c>USE</c> |
| 129 | variable. To make it easy for users to search and pick USE-flags, we already |
129 | variable. To make it easy for users to search and pick USE-flags, we already |
| 130 | provide a <e>default</e> USE setting. This setting is a collection of USE-flags |
130 | provide a <e>default</e> USE setting. This setting is a collection of USE-flags |
| 131 | we think are commonly used by the Gentoo users. This default setting is declared |
131 | we think are commonly used by the Gentoo users. This default setting is declared |
| 132 | in the <path>/etc/make.profile/make.defaults</path> file. Let us take a look at |
132 | in the <path>make.defaults</path> files part of your profile. Let us take a |
| 133 | this default setting: |
133 | look at this default setting: |
| 134 | </p> |
134 | </p> |
| 135 | |
135 | |
| 136 | <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> |
| 137 | USE="x86 oss apm arts avi berkdb crypt cups encode foomaticdb gdbm gif gpm |
138 | USE="x86 oss apm arts avi berkdb crypt cups encode foomaticdb gdbm gif gpm |
| 138 | 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 |
| 139 | nls oggvorbis opengl pam pdflib png python qt quicktime readline sdl |
140 | nls oggvorbis opengl pam pdflib png python qt quicktime readline sdl |
| 140 | slang spell ssl svga tcpd truetype X xml2 xmms xv zlib" |
141 | slang spell ssl svga tcpd truetype X xml2 xmms xv zlib" |
| 141 | </pre> |
142 | </pre> |
| 142 | |
143 | |
| 143 | <p> |
144 | <p> |
| 144 | As you can see, this variable already contains quite a lot of keywords. Do |
145 | As you can see, this variable already contains quite a lot of keywords. Do |
| 145 | <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 |
| 146 | the <c>USE</c> variable to your needs: changes in this file will be undone when |
147 | the <c>USE</c> variable to your needs: changes in this file will be undone when |
| 147 | you update Portage! |
148 | you update Portage! |
| 148 | </p> |
149 | </p> |
| 149 | |
150 | |
| 150 | <p> |
151 | <p> |
| 151 | To change this default setting, you need to add or remove keywords to the |
152 | To change this default setting, you need to add or remove keywords to the |
| 152 | <c>USE</c> variable. This is done globally by defining the <c>USE</c> variable |
153 | <c>USE</c> variable. This is done globally by defining the <c>USE</c> variable |
| 153 | in <path>/etc/make.conf</path>. In this variable you add the extra USE-flags you |
154 | in <path>/etc/make.conf</path>. In this variable you add the extra USE-flags you |
| 154 | require, or remove the USE-flags you don't want. This latter is done by |
155 | require, or remove the USE-flags you don't want. This latter is done by |
| 155 | prefixing the keyword with the minus-sign ("-"). |
156 | prefixing the keyword with the minus-sign ("-"). |
| 156 | </p> |
157 | </p> |
| 157 | |
158 | |
| 158 | <p> |
159 | <p> |
| 159 | For instance, to remove support for KDE and QT but add support for ldap, the |
160 | For instance, to remove support for KDE and QT but add support for ldap, the |
| 160 | following <c>USE</c> can be defined in <path>/etc/make.conf</path>: |
161 | following <c>USE</c> can be defined in <path>/etc/make.conf</path>: |
| … | |
… | |
| 242 | </body> |
243 | </body> |
| 243 | </subsection> |
244 | </subsection> |
| 244 | <subsection> |
245 | <subsection> |
| 245 | <title>Precedence</title> |
246 | <title>Precedence</title> |
| 246 | <body> |
247 | <body> |
| 247 | |
248 | |
| 248 | <p> |
249 | <p> |
| 249 | Of course there is a certain precedence on what setting has priority over the |
250 | Of course there is a certain precedence on what setting has priority over the |
| 250 | USE setting. You don't want to declare <c>USE="-java"</c> only to see that |
251 | USE setting. You don't want to declare <c>USE="-java"</c> only to see that |
| 251 | <c>java</c> is declared anyway. The precedence for the USE setting is, ordered |
252 | <c>java</c> is declared anyway. The precedence for the USE setting is, ordered |
| 252 | by priority (first has lowest priority): |
253 | by priority (first has lowest priority): |
| 253 | </p> |
254 | </p> |
| 254 | |
255 | |
| 255 | <ol> |
256 | <ol> |
| 256 | <li> |
257 | <li> |
| 257 | 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 |
| 258 | </li> |
260 | </li> |
| 259 | <li> |
261 | <li> |
| 260 | Inherited USE setting if a package from |
262 | Inherited USE setting if a package from |
| 261 | <path>/etc/make.profile/use.defaults</path> is installed |
263 | <path>/etc/make.profile/use.defaults</path> is installed |
| 262 | </li> |
264 | </li> |
| 263 | <li> |
265 | <li> |
| 264 | User-defined USE setting in <path>/etc/make.conf</path> |
266 | User-defined USE setting in <path>/etc/make.conf</path> |
| 265 | </li> |
267 | </li> |
| 266 | <li> |
268 | <li> |
| 267 | User-defined USE setting in <path>/etc/portage/package.use</path> |
269 | User-defined USE setting in <path>/etc/portage/package.use</path> |
| 268 | </li> |
270 | </li> |
| 269 | <li> |
271 | <li> |
| 270 | User-defined USE setting as environment variable |
272 | User-defined USE setting as environment variable |
| 271 | </li> |
273 | </li> |
| 272 | </ol> |
274 | </ol> |