Update emerge --autounmask docs to indicate support for LICENSE
[portage.git] / man / emerge.1
1 .TH "EMERGE" "1" "Aug 2008" "Portage VERSION" "Portage"
2 .SH "NAME"
3 emerge \- Command\-line interface to the Portage system
4 .SH "SYNOPSIS"
5 .TP
6 .BR emerge
7 [\fIoptions\fR] [\fIaction\fR] [\fIebuild\fR | \fItbz2file\fR | \fIfile\fR | \fI@set\fR | \fIatom\fR] ...
8 .TP
9 .BR emerge
10 \fB\-\-sync\fR | \fB\-\-version\fR
11 .TP
12 .BR emerge
13 \fB\-\-info\fR [\fIatom\fR]
14 .TP
15 .BR emerge
16 \fB\-\-search\fR \fIsomestring\fR
17 .TP
18 .BR emerge
19 \fB\-\-help\fR [\fB\-\-verbose\fR]
20 .SH "DESCRIPTION"
21 \fBemerge\fR is the definitive command\-line interface to the Portage
22 system.  It is primarily used for installing packages, and \fBemerge\fR
23 can automatically handle any dependencies that the desired package has.
24 \fBemerge\fR can also update the \fBportage tree\fR, making new and
25 updated packages available.  \fBemerge\fR gracefully handles updating
26 installed packages to newer releases as well.  It handles both source
27 and binary packages, and it can be used to create binary packages for
28 distribution.
29 .SH "EBUILDS, TBZ2S, SETS AND ATOMS"
30 \fBemerge\fR primarily installs packages.  You can specify
31 packages to install in one of four main ways: an \fIebuild\fR,
32 a \fItbz2file\fR, a \fIset\fR, or an \fIatom\fR.
33 .LP
34 .TP
35 .BR ebuild
36 An \fIebuild\fR must be, at a minimum, a valid Portage
37 package directory name without a version or category, such as
38 \fBportage\fR or \fBpython\fR.
39 Both categories and version numbers may be used in addition, such
40 as \fBsys\-apps/portage\fR or \fB=python\-2.2.1\-r2\fR.
41 \fBemerge\fR
42 ignores a trailing slash so that filename completion can be used.
43 The \fIebuild\fR may also be an actual filename, such as
44 \fB/usr/portage/app\-admin/python/python\-2.2.1\-r2.ebuild\fR.
45 \fBWARNING:\fR The implementation of \fBemerge /path/to/ebuild\fR is broken and
46 so this syntax shouldn't be used.
47 .TP
48 .BR tbz2file
49 A \fItbz2file\fR must be a valid .tbz2 created with \fBebuild
50 <package>\-<version>.ebuild package\fR or \fBemerge \-\-buildpkg 
51 [category/]<package>\fR or \fBquickpkg /var/db/pkg/<category>/<package>\fR.
52 .TP
53 .BR file
54 A \fIfile\fR must be a file or directory that has been installed by one or
55 more packages. For directories that are owned by multiple packages, all
56 owning packages to be selected. See the portageq(1) owners command if you
57 would like to query the owners of one or more files or directories.
58 .TP
59 .BR set
60 A \fIset\fR is a convenient shorthand for a large group of
61 packages. Three sets are currently always available: \fBselected\fR,
62 \fBsystem\fR and \fBworld\fR. \fBselected\fR contains the user-selected
63 "world" packages that are listed in \fB/var/lib/portage/world\fR,
64 and nested sets that may be listed
65 in \fB/var/lib/portage/world_sets\fR. \fBsystem\fR refers to a set of
66 packages deemed necessary for your system to run properly. \fBworld\fR
67 encompasses both the \fBselected\fR and \fBsystem\fR sets. [See
68 \fBFILES\fR below for more information.] Other sets can exist depending
69 on the current configuration. The default set configuration is located
70 in the \fB/usr/share/portage/config/sets\fR directory. Note that a \fIset\fR
71 is generally used in conjunction with \fB\-\-update\fR. When used as 
72 arguments to \fBemerge\fR sets have to be prefixed with \fB@\fR to be
73 recognized. Use the \fB\-\-list\-sets\fR action to display a list of
74 available package sets.
75 .TP
76 .BR atom
77 An \fIatom\fR describes bounds on a package that you wish to install.  
78 \fISee portage(5) for the details on atom syntax.\fR  For example, 
79 \fB>=dev\-lang/python\-2.2.1\-r2\fR matches the latest available version of 
80 Python greater than or equal to 2.2.1\-r2.  Similarly, 
81 \fB<dev\-lang/python\-2.0\fR matches the latest available version of Python 
82 before 2.0.  Note that in many shells you will need to escape characters such 
83 as '<' and '='; use single\- or double\-quotes around the \fIatom\fR 
84 to get around escaping problems.
85 .SH "ACTIONS"
86 .TP
87 .BR "No action"
88 If no action is specified, the action is to merge in the specified
89 packages, satisfying any dependencies that they may have.  The
90 arguments can be \fIebuilds\fR, \fItbz2s\fR, \fIsets\fR, or
91 \fIatoms\fR.  \fBNote that you need to use the \-\-usepkg 
92 option if you want to install a tbz2\fR.  The packages are added
93 to the \fBworld\fR file at the end, so that they are considered for
94 later updating.
95 .TP
96 .BR \-\-clean
97 Cleans up the system by examining the installed packages and removing older
98 packages.  This is accomplished by looking at each installed package and separating
99 the installed versions by \fBslot\fR.  Clean will \fBremove all but the most recently
100 installed version in each \fbslot\fR.  Clean should not remove unslotted packages.
101 Note: Most recently installed means most \fBrecent\fR, not highest version.
102 .TP
103 .BR "\-\-config "
104 Run package specific actions needed to be executed after the emerge process 
105 has completed.  This usually entails configuration file setup or other similar 
106 setups that the user may wish to run.
107 .TP
108 .BR "\-\-depclean (-c)"
109 Cleans the system by removing packages that are not associated
110 with explicitly merged packages. Depclean works by creating the
111 full dependency tree from the @world set,
112 then comparing it to installed packages. Packages installed, but
113 not part of the dependency tree, will be uninstalled by depclean.
114 See \fB\-\-with\-bdeps\fR for behavior with respect to build time dependencies
115 that are not strictly required. Packages that are part of the world set will
116 always be kept. They can be manually added to this set with \fIemerge
117 \-\-noreplace <atom>\fR. As a safety measure, depclean will not remove any
118 packages unless *all* required dependencies have been resolved. As a
119 consequence, it is often necessary to run \fIemerge \-\-update \-\-newuse
120 \-\-deep @world\fR prior to depclean. 
121
122 \fBWARNING:\fR
123 Inexperienced users are advised to use \fB\-\-pretend\fR with this
124 option in order to see a preview of which packages
125 will be uninstalled. Always study the list of packages
126 to be cleaned for any obvious mistakes. Note that packages listed in
127 package.provided (see \fBportage\fR(5)) may be removed by
128 depclean, even if they are part of the world set.
129
130 Depclean serves as a dependency aware
131 version of \fB\-\-unmerge\fR. When given one or more atoms, it will
132 unmerge matched packages that have no reverse dependencies. Use
133 \fB\-\-depclean\fR together with \fB\-\-verbose\fR to show reverse
134 dependencies.
135 .TP
136 .BR "\-\-deselect[=n]"
137 Remove atoms and/or sets from the world file. This action is implied
138 by uninstall actions, including \fB-\-depclean\fR,
139 \fB-\-prune\fR and \fB-\-unmerge\fR. Use \fB-\-deselect=n\fR
140 in order to prevent uninstall actions from removing
141 atoms from the world file.
142 .TP
143 .BR "\-\-help " (\fB\-h\fR)
144 Displays help information for emerge.  Adding one of the additional
145 arguments listed above will give you more specific help information
146 on that subject.  The internal \fBemerge\fR help documentation is
147 updated more frequently than this man page; check it out if you
148 are having problems that this man page does not help resolve.
149 .TP
150 .BR \-\-info
151 Produces a list of information to include in bug reports which aids the 
152 developers when fixing the reported problem.  \fBPlease include this 
153 information when submitting a bug report.\fR  Expanded output can be obtained 
154 with the \fI\-\-verbose\fR option.
155 .TP
156 .BR \-\-list\-sets
157 Displays a list of available package sets.
158 .TP
159 .BR \-\-metadata
160 Transfers metadata cache from ${PORTDIR}/metadata/cache/ to
161 /var/cache/edb/dep/ as is normally done on the
162 tail end of an rsync update using \fBemerge \-\-sync\fR.  This process
163 populates the cache database that portage uses for pre-parsed lookups of
164 package data.  It does not populate cache for the overlays listed in
165 PORTDIR_OVERLAY.  In order to generate cache for overlays, use \fB\-\-regen\fR.
166 In versions of portage >=2.1.5 the \-\-metadata action is totally unnecessary
167 unless the user has enabled FEATURES="metadata-transfer" in \fBmake.conf\fR(5).
168 .TP
169 .BR "\-\-prune " (\fB\-P\fR)
170 \fBWARNING: This action can remove important packages!\fR  Removes all but the
171 highest installed version of a package from your system. Use \fB\-\-prune\fR
172 together with \fB\-\-verbose\fR to show reverse dependencies or with
173 \fB\-\-nodeps\fR to ignore all dependencies.
174 .TP
175 .BR \-\-regen
176 Causes portage to check and update the dependency cache of all ebuilds in the 
177 portage tree.  The cache is used to speed up searches and the building of 
178 dependency trees.  This command is not recommended for rsync users as rsync 
179 updates the cache using server\-side caches.  If you do not know the 
180 differences between a 'rsync user' and some other user, then you are a 'rsync 
181 user' :).  Rsync users should simply run \fBemerge \-\-sync\fR to regenerate 
182 the cache.  After a portage update, rsync users may find it convenient to run 
183 \fBemerge \-\-metadata\fR to rebuild the cache as portage does at the end of 
184 a sync operation. In order to specify parallel \fB\-\-regen\fR behavior, use
185 the \fB\-\-jobs\fR and \fB\-\-load\-average\fR options. If you would like to
186 generate and distribute cache for use by others, use \fBegencache\fR(1).
187 .TP
188 .BR "\-\-resume" (\fB\-r\fR)
189 Resumes the most recent merge list that has been aborted due to an error.
190 Please note that this operation will only return an error on failure.  If there
191 is nothing for portage to do, then portage will exit with a message and a
192 success condition. A resume list will persist until it has been completed in
193 entirety or until another aborted merge list replaces it.  The resume history
194 is capable of storing two merge lists.  After one resume list completes, it is
195 possible to invoke \-\-resume once again in order to resume an older list.
196 .TP
197 .BR "\-\-search " (\fB\-s\fR)
198 Searches for matches of the supplied string in the portage tree.
199 By default emerge uses a case-insensitive simple search, but you can 
200 enable a regular expression search by prefixing the search string with %.
201 For example, \fBemerge \-\-search "%^kde"\fR searches for any package whose 
202 name starts with "kde"; \fBemerge \-\-search "%gcc$"\fR searches for any 
203 package that ends with "gcc"; \fBemerge \-\-search "office"\fR searches for 
204 any package that contains the word "office".  If you want to include the 
205 category into the search string, prepend an @: \fBemerge \-\-search 
206 "%@^dev-java.*jdk"\fR. If you want to search the package descriptions as well, 
207 use the \fB\-\-searchdesc\fR action.
208 .TP
209 .BR "\-\-searchdesc " (\fB\-S\fR)
210 Matches the search string against the description field as well as
211 the package name.  \fBTake caution\fR as the descriptions are also
212 matched as regular expressions.
213 .TP
214 .BR \-\-sync
215 This updates the portage tree that is located in the
216 directory that the PORTDIR variable refers to (default
217 location is /usr/portage). The SYNC variable specifies
218 the remote URI from which files will be synchronized.
219 The \fBPORTAGE_SYNC_STALE\fR variable configures
220 warnings that are shown when emerge \-\-sync has not
221 been executed recently.
222
223 \fBWARNING:\fR
224 The emerge \-\-sync action will modify and/or delete
225 files located inside the directory that the PORTDIR
226 variable refers to (default location is /usr/portage).
227 For more information, see the PORTDIR documentation in
228 the make.conf(5) man page.
229
230 \fBNOTE:\fR
231 The \fBemerge\-webrsync\fR program will download the entire
232 portage tree as a tarball, which is much faster than emerge
233 \-\-sync for first time syncs.
234
235 .TP
236 .BR "\-\-unmerge " (\fB\-C\fR)
237 \fBWARNING: This action can remove important packages!\fR Removes
238 all matching packages.  This does no checking of dependencies, so
239 it may remove packages necessary for the proper operation of your
240 system.  Its arguments can be \fIatoms\fR or
241 \fIebuilds\fR. For a dependency aware version of \fB\-\-unmerge\fR,
242 use \fB\-\-depclean\fR or \fB\-\-prune\fR.
243 .TP
244 .BR "\-\-version " (\fB\-V\fR)
245 Displays the version number of \fBemerge\fR.
246 .SH "OPTIONS"
247 .TP
248 .BR \-\-accept\-properties=ACCEPT_PROPERTIES
249 This option temporarily overrides the \fBACCEPT_PROPERTIES\fR
250 variable. The \fBACCEPT_PROPERTIES\fR variable is incremental,
251 which means that the specified setting is appended to the
252 existing value from your configuration. The special \fB-*\fR
253 token can be used to discard the existing configuration
254 value and start fresh. See the \fBMASKED PACKAGES\fR section
255 and \fBmake.conf\fR(5) for more information about
256 ACCEPT_PROPERTIES. A typical usage example for this option
257 would be to use \fI\-\-accept\-properties=\-interactive\fR to
258 temporarily mask interactive packages. With default
259 configuration, this would result in an effective
260 \fBACCEPT_PROPERTIES\fR value of "* -interactive".
261 .TP
262 .BR "\-\-alphabetical "
263 When displaying USE and other flag output, combines the enabled and
264 disabled lists into one list and sorts the whole list alphabetically.
265 .TP
266 .BR "\-\-ask " (\fB\-a\fR)
267 Before performing the action, display what will take place (server info for
268 \fB\-\-sync\fR, \fB\-\-pretend\fR output for merge, and so forth), then ask
269 whether to proceed with the action or abort.  Using \fB\-\-ask\fR is more
270 efficient than using \fB\-\-pretend\fR and then executing the same command
271 without \fB\-\-pretend\fR, as dependencies will only need to be calculated once.
272 \fBWARNING: If the "Enter" key is pressed at the prompt (with no other input),
273 it is interpreted as acceptance of the first choice.  Note that the input
274 buffer is not cleared prior to the prompt, so an accidental press of the
275 "Enter" key at any time prior to the prompt will be interpreted as a choice!
276 Use the \-\-ask\-enter\-invalid option if you want a single "Enter" key
277 press to be interpreted as invalid input.\fR
278 .TP
279 .BR "\-\-ask\-enter\-invalid"
280 When used together with the \fB\-\-ask\fR option,
281 interpret a single "Enter" key press as
282 invalid input. This helps prevent accidental
283 acceptance of the first choice. This option is
284 intended to be set in the \fBmake.conf\fR(5)
285 \fBEMERGE_DEFAULT_OPTS\fR variable.
286 .TP
287 .BR "\-\-autounmask[=n]"
288 Automatically unmask packages. If any configuration
289 changes are required, then they will be displayed
290 after the merge list and emerge will immediately
291 abort. If the displayed configuration changes are
292 satisfactory, you should copy and paste them into
293 the specified configuration file(s). Currently,
294 this only works for unstable KEYWORDS masks,
295 LICENSE masks, and package.use settings.
296 .TP
297 .BR \-\-backtrack=COUNT
298 Specifies an integer number of times to backtrack if
299 dependency calculation fails due to a conflict or an
300 unsatisfied dependency (default: \'5\').
301 .TP
302 .BR "\-\-binpkg\-respect\-use < y | n >"
303 Tells emerge to ignore binary packages if their use flags
304 don't match the current configuration. (default: \'n\')
305 .TP
306 .BR "\-\-buildpkg " (\fB\-b\fR)
307 Tells emerge to build binary packages for all ebuilds processed in
308 addition to actually merging the packages.  Useful for maintainers
309 or if you administrate multiple Gentoo Linux systems (build once,
310 emerge tbz2s everywhere) as well as disaster recovery. The package
311 will be created in the \fBPKGDIR\fR directory (see \fBmake.conf\fR(5)).
312 An alternative for already\-merged
313 packages is to use \fBquickpkg\fR(1) which creates a tbz2 from the
314 live filesystem.
315 .TP
316 .BR "\-\-buildpkgonly " (\fB\-B\fR)
317 Creates binary packages for all ebuilds processed without actually
318 merging the packages.  This comes with the caveat that all build-time 
319 dependencies must already be emerged on the system.
320 .TP
321 .BR "\-\-changed\-use"
322 This is an alias for \fB\-\-reinstall=changed\-use\fR.
323 .TP
324 .BR "\-\-changelog " (\fB\-l\fR)
325 Use this in conjunction with the \fB\-\-pretend\fR option.  This will
326 show the ChangeLog entries for all the packages that will be upgraded.
327 .TP
328 .BR "\-\-color < y | n >"
329 Enable or disable color output.  This option will override \fINOCOLOR\fR
330 (see \fBmake.conf\fR(5)) and may also be used to force color output when stdout
331 is not a tty (by default, color is disabled unless stdout is a tty).
332 .TP
333 .BR "\-\-columns"
334 Used alongside \fB\-\-pretend\fR to cause the package name, new version, 
335 and old version to be displayed in an aligned format for easy cut\-n\-paste.
336 .TP
337 .BR "\-\-complete\-graph[=n]"
338 This causes \fBemerge\fR to consider the deep dependencies of all
339 packages from the world set. With this option enabled,
340 \fBemerge\fR will bail out if it determines that the given operation will
341 break any dependencies of the packages that have been added to the
342 graph. Like the \fB\-\-deep\fR option, the \fB\-\-complete\-graph\fR
343 option will significantly increase the time taken for dependency
344 calculations. Note that, unlike the \fB\-\-deep\fR option, the
345 \fB\-\-complete\-graph\fR option does not cause any more packages to
346 be updated than would have otherwise been updated with the option disabled.
347 .TP
348 .BR \-\-config\-root=DIR
349 Set the \fBPORTAGE_CONFIGROOT\fR environment variable.
350 .TP
351 .BR "\-\-debug " (\fB\-d\fR)
352 Tells emerge to run the emerge command in \fB\-\-debug\fR mode.  In this
353 mode the bash build environment will run with the \-x option, causing 
354 it to output verbose debugging information to stdout.  This also enables
355 a plethora of other output (mostly dependency resolution messages).
356 .TP
357 .BR "\-\-deep [DEPTH] " (\fB\-D\fR)
358 This flag forces
359 \fBemerge\fR to consider the entire dependency tree of packages,
360 instead of checking only the immediate dependencies of the packages.
361 As an example, this catches updates in libraries that are not directly
362 listed in the dependencies of a package.  Also see \fB\-\-with\-bdeps\fR for
363 behavior with respect to build time dependencies that are not strictly
364 required.
365 .TP
366 .BR "\-\-depclean\-lib\-check[=n]"
367 Account for library link-level dependencies during
368 \fB-\-depclean\fR and \fB-\-prune\fR actions. This
369 option is enabled by default. In some cases this can
370 be somewhat time\-consuming.
371 .TP
372 .BR "\-\-emptytree " (\fB\-e\fR)
373 Reinstalls target atoms and their entire deep
374 dependency tree, as though no packages are currently
375 installed. You should run this with \fB\-\-pretend\fR
376 first to make sure the result is what you expect.
377 .TP
378 .BR "\-\-exclude " ATOMS
379 A space separated list of package names or slot atoms.
380 Emerge won't  install any ebuild or binary package that
381 matches any of the given package atoms.
382 .TP
383 .BR "\-\-fail\-clean[=n]"
384 Clean up temporary files after a build failure. This is
385 particularly useful if you have \fBPORTAGE_TMPDIR\fR on
386 tmpfs. If this option is enabled, you probably also want
387 to enable \fBPORT_LOGDIR\fR (see \fBmake.conf\fR(5)) in
388 order to save the build log.
389 .TP
390 .BR "\-\-fetchonly " (\fB\-f\fR)
391 Instead of doing any package building, just perform fetches for all
392 packages (fetch things from SRC_URI based upon USE setting).
393 .TP
394 .BR "\-\-fetch\-all\-uri " (\fB\-F\fR)
395 Instead of doing any package building, just perform fetches for all
396 packages (fetch everything in SRC_URI regardless of USE setting).
397 .TP
398 .BR "\-\-getbinpkg[=n] " (\fB\-g\fR)
399 Using the server and location defined in \fIPORTAGE_BINHOST\fR (see 
400 \fBmake.conf\fR(5)), portage will download the information from each binary 
401 package found and it will use that information to help build the dependency 
402 list.  This option implies \fB\-k\fR.  (Use \fB\-gK\fR for binary\-only 
403 merging.)
404 .TP
405 .BR "\-\-getbinpkgonly[=n] " (\fB\-G\fR)
406 This option is identical to \fB\-g\fR, as above, except binaries from the
407 remote server are preferred over local packages if they are not identical.
408 .TP
409 .BR "\-\-ignore-default-opts"
410 Causes \fIEMERGE_DEFAULT_OPTS\fR (see \fBmake.conf\fR(5)) to be ignored.
411 .TP
412 .BR "-j [JOBS], \-\-jobs[=JOBS]"
413 Specifies the number of packages to build simultaneously. If this option is
414 given without an argument, emerge will not limit the number of jobs that can
415 run simultaneously. Also see the related \fB\-\-load\-average\fR option.
416 Note that interactive packages currently force a setting
417 of \fI\-\-jobs=1\fR. This issue can be temporarily avoided
418 by specifying \fI\-\-accept\-properties=\-interactive\fR.
419 .TP
420 .BR "\-\-keep\-going[=n]"
421 Continue as much as possible after an error. When an error occurs,
422 dependencies are recalculated for remaining packages and any with
423 unsatisfied dependencies are automatically dropped. Also see
424 the related \fB\-\-skipfirst\fR option.
425 .TP
426 .BR \-\-load\-average=LOAD
427 Specifies that no new builds should be started if there are other builds
428 running and the load average is at least LOAD (a floating-point number).
429 This option is recommended for use in combination with \fB\-\-jobs\fR in
430 order to avoid excess load. See \fBmake\fR(1) for information about
431 analogous options that should be configured via \fBMAKEOPTS\fR in
432 \fBmake.conf\fR(5).
433 .TP
434 .BR "\-\-newuse " (\fB\-N\fR)
435 Tells emerge to include installed packages where USE
436 flags have changed since compilation. This option
437 also implies the \fB\-\-selective\fR option.
438 USE flag changes include:
439
440 A USE flag was added to a package.
441 A USE flag was removed from a package.
442 A USE flag was turned on for a package.
443 A USE flag was turned off for a package.
444
445 USE flags may be toggled by your profile as well as your USE and package.use
446 settings.
447 .TP
448 .BR "\-\-noconfmem"
449 Causes portage to disregard merge records indicating that a config file
450 inside of a \fBCONFIG_PROTECT\fR directory has been merged already.  Portage
451 will normally merge those files only once to prevent the user from
452 dealing with the same config multiple times.  This flag will cause the
453 file to always be merged.
454 .TP
455 .BR "\-\-nodeps " (\fB\-O\fR)
456 Merges specified packages without merging any dependencies.  Note that
457 the build may fail if the dependencies aren't satisfied.
458 .TP
459 .BR "\-\-noreplace " (\fB\-n\fR)
460 Skips the packages specified on the command\-line that have already
461 been installed.  Without this option, any packages, ebuilds, or deps
462 you specify on the command\-line \fBwill\fR cause Portage to remerge
463 the package, even if it is already installed.  Note that Portage will
464 not remerge dependencies by default. Also note that this option takes
465 precedence over options such as \fB\-\-newuse\fR, preventing a package
466 from being reinstalled even though the corresponding USE flag settings
467 may have changed.
468 .TP
469 .BR "\-\-nospinner"
470 Disables the spinner for the session.  The spinner is active when the
471 terminal device is determined to be a TTY.  This flag disables it regardless.
472 .TP
473 .BR "\-\-oneshot " (\fB\-1\fR)
474 Emerge as normal, but do not add the packages to the world file
475 for later updating.
476 .TP
477 .BR "\-\-onlydeps " (\fB\-o\fR)
478 Only merge (or pretend to merge) the dependencies of the packages
479 specified, not the packages themselves.
480 .TP
481 .BR "\-\-package\-moves[=n]"
482 Perform package moves when necessary. This option
483 is enabled by default. \fBWARNING:\fR This option
484 should remain enabled under normal circumstances.
485 Do not disable it unless you know what you are
486 doing.
487 .TP
488 .BR "\-\-pretend " (\fB\-p\fR)
489 Instead of actually performing the merge, simply display what *would*
490 have been installed if \fB\-\-pretend\fR weren't used.  Using \fB\-\-pretend\fR
491 is strongly recommended before installing an unfamiliar package.  In
492 the printout:
493
494 .TS
495 lI l.
496 N       new (not yet installed)
497 S       new SLOT installation (side-by-side versions) 
498 U       updating (to another version)
499 D       downgrading (best version seems lower)
500 R       replacing (remerging same version))
501 F       fetch restricted (must be manually downloaded)
502 f       fetch restricted (already downloaded)
503 I       interactive (requires user input)
504 B       blocked by another package (unresolved conflict)
505 b       blocked by another package (automatically resolved conflict)
506 .TE
507 .TP
508 .BR "\-\-quiet " (\fB\-q\fR)
509 Results may vary, but the general outcome is a reduced or condensed
510 output from portage's displays.
511 .TP
512 .BR \-\-quiet\-build
513 Redirect all build output to logs alone, and do not
514 display it on stdout.
515 .TP
516 .BR \-\-quiet\-unmerge\-warn
517 Disable the warning message that's shown prior to
518 \fB\-\-unmerge\fR actions. This option is intended
519 to be set in the \fBmake.conf\fR(5)
520 \fBEMERGE_DEFAULT_OPTS\fR variable.
521 .TP
522 .BR "\-\-rebuilt\-binaries[=n]"
523 Replace installed packages with binary packages that have
524 been rebuilt. Rebuilds are detected by comparison of
525 BUILD_TIME package metadata. This option is enabled
526 automatically when using binary packages
527 (\fB\-\-usepkgonly\fR or \fB\-\-getbinpkgonly\fR) together with
528 \fB\-\-update\fR and \fB\-\-deep\fR.
529 .TP
530 .BR "\-\-rebuilt\-binaries\-timestamp=TIMESTAMP"
531 This option modifies emerge's behaviour only if
532 \fB\-\-rebuilt\-binaries\fR is given. Only binaries that
533 have a BUILD_TIME that is larger than the given TIMESTAMP
534 and that is larger than that of the installed package will
535 be considered by the rebuilt\-binaries logic.
536 .TP
537 .BR "\-\-reinstall changed\-use"
538 Tells emerge to include installed packages where USE flags have
539 changed since installation.  Unlike \fB\-\-newuse\fR, this option does
540 not trigger reinstallation when flags that the user has not
541 enabled are added or removed.
542 .TP
543 .BR \-\-root=DIR
544 Set the \fBROOT\fR environment variable.
545 .TP
546 .BR "\-\-root\-deps[=rdeps]"
547 If no argument is given then build\-time dependencies of packages for
548 \fBROOT\fR are installed to
549 \fBROOT\fR instead of /. If the \fBrdeps\fR argument is given then discard
550 all build\-time dependencies of packages for \fBROOT\fR. This option is
551 only meaningful when used together with \fBROOT\fR and it should not
552 be enabled under normal circumstances. For currently supported
553 \fBEAPI\fR values, the build-time dependencies are specified in the
554 \fBDEPEND\fR variable. However, behavior may change for new
555 \fBEAPI\fRs when related extensions are added in the future.
556 .TP
557 .BR "\-\-select"[=n]
558 Add specified packages to the world set (inverse of
559 \fB\-\-oneshot\fR). This is useful if you want to
560 use \fBEMERGE_DEFAULT_OPTS\fR to make
561 \fB\-\-oneshot\fR behavior default.
562 .TP
563 .BR "\-\-selective"[=n]
564 This is similar to the \fB\-\-noreplace\fR option, except that it
565 does not take precedence over options such as \fB\-\-newuse\fR.
566 Some options, such as \fB\-\-update\fR, imply \fB\-\-selective\fR.
567 Use \fB\-\-selective=n\fR if you want to forcefully disable
568 \fB\-\-selective\fR, regardless of options like \fB\-\-update\fR.
569 .TP
570 .BR "\-\-skipfirst"
571 This option is only valid when used with \fB\-\-resume\fR.  It removes the 
572 first package in the resume list. Dependencies are recalculated for
573 remaining packages and any that have unsatisfied dependencies or are
574 masked will be automatically dropped. Also see the related
575 \fB\-\-keep\-going\fR option.
576 .TP
577 .BR "\-\-tree " (\fB\-t\fR)
578 Shows the dependency tree for the given target by indenting dependencies.
579 This is only really useful in combination with \fB\-\-emptytree\fR or 
580 \fB\-\-update\fR and \fB\-\-deep\fR.
581 .TP
582 .BR "\-\-unordered\-display"
583 By default the displayed merge list is sorted using the
584 order in which the packages will be merged. When
585 \fB\-\-tree\fR is used together with this option, this
586 constraint is removed, hopefully leading to a more
587 readable dependency tree.
588 .TP
589 .BR "\-\-update " (\fB\-u\fR)
590 Updates packages to the best version available, which may
591 not always be the  highest version number due to masking
592 for testing and development. Package atoms specified on
593 the command line are greedy, meaning that unspecific
594 atoms may match multiple versions of slotted packages.
595 .TP
596 .BR "\-\-use\-ebuild\-visibility[=n]"
597 Use unbuilt ebuild metadata for visibility
598 checks on built packages.
599 .TP
600 .BR "\-\-usepkg[=n] " (\fB\-k\fR) 
601 Tells emerge to use binary packages (from $PKGDIR) if they are available, thus 
602 possibly avoiding some time\-consuming compiles.  This option is useful for CD 
603 installs; you can export PKGDIR=/mnt/cdrom/packages and then use this option to 
604 have emerge "pull" binary packages from the CD in order to satisfy dependencies.
605 .TP
606 .BR "\-\-usepkgonly[=n] " (\fB\-K\fR)
607 Tells emerge to only use binary packages (from $PKGDIR).  All the binary 
608 packages must be available at the time of dependency calculation or emerge 
609 will simply abort.  Portage does not use $PORTDIR when calculating dependency 
610 information so all masking information is ignored.
611 .TP
612 .BR "\-\-verbose " (\fB\-v\fR)
613 Tell emerge to run in verbose mode.  Currently this flag causes emerge to print 
614 out GNU info errors, if any, and to show the USE flags that will be used for 
615 each package when pretending. The following symbols are affixed to USE flags
616 in order to indicate their status:
617
618 .TS
619 l l l
620 ___
621 l l l.
622 Symbol  Location        Meaning
623
624 -       prefix  not enabled (either disabled or removed)
625 *       suffix  transition to or from the enabled state
626 %       suffix  newly added or removed
627 ()      circumfix       forced, masked, or removed
628 .TE
629 .TP
630 .BR "\-\-with\-bdeps < y | n >"
631 In dependency calculations, pull in build time dependencies
632 that are not strictly required. This defaults to \'n\' for
633 installation actions, meaning they will not be installed, and
634 \'y\' for the \fB\-\-depclean\fR action, meaning they will not be removed.
635 This setting can be added to
636 \fBEMERGE_DEFAULT_OPTS\fR (see make.conf(5)) and later overridden via the
637 command line.
638 .SH "ENVIRONMENT OPTIONS"
639 .TP
640 \fBROOT\fR = \fI[path]\fR
641 Use \fBROOT\fR to specify the target root filesystem to be used for
642 merging packages or ebuilds. This variable can be set via the \fB\-\-root\fR
643 option or in \fBmake.conf\fR(5) (the command line overrides other settings).
644 .br
645 Defaults to /.
646 .TP
647 \fBPORTAGE_CONFIGROOT\fR = \fI[path]\fR
648 Use \fBPORTAGE_CONFIGROOT\fR to specify the location for various portage 
649 configuration files
650 (see \fBFILES\fR for a detailed list of configuration files).  This variable
651 can be set via the \fB\-\-config\-root\fR option.
652 .br
653 Defaults to /.
654 .SH "OUTPUT"
655 When utilizing \fBemerge\fR with the \fB\-\-pretend\fR and \fB\-\-verbose\fR 
656 flags, the output may be a little hard to understand at first.  This section
657 explains the abbreviations.
658 .TP
659 .B [blocks B     ] app\-text/dos2unix ("app\-text/dos2unix" is blocking app\-text/hd2u\-0.8.0)
660 Dos2unix is Blocking hd2u from being emerged.  Blockers are defined when
661 two packages will clobber each others files, or otherwise cause some form
662 of breakage in your system.  However, blockers usually do not need to be
663 simultaneously emerged because they usually provide the same functionality.
664 .TP
665 .B [ebuild  N    ] app\-games/qstat\-25c
666 Qstat is New to your system, and will be emerged for the first time.
667 .TP
668 .B [ebuild  NS   ] dev-libs/glib-2.4.7
669 You already have a version of glib installed, but a 'new' version in 
670 a different SLOT is available.
671 .TP
672 .B [ebuild   R   ] sys\-apps/sed\-4.0.5
673 Sed 4.0.5 has already been emerged, but if you run the command, then 
674 portage will Re\-emerge the specified package (sed in this case).
675 .TP
676 .B [ebuild    F  ] media\-video/realplayer\-8\-r6
677 The realplayer package requires that you Fetch the sources manually.  
678 When you attempt to emerge the package, if the sources are not found, 
679 then portage will halt and you will be provided with instructions on how 
680 to download the required files.
681 .TP
682 .B [ebuild    f  ] media\-video/realplayer\-8\-r6
683 The realplayer package's files are already downloaded.
684 .TP
685 .B [ebuild     U ] net\-fs/samba\-2.2.8_pre1 [2.2.7a]
686 Samba 2.2.7a has already been emerged and can be Updated to version 
687 2.2.8_pre1.
688 .TP
689 .B [ebuild     UD] media\-libs/libgd\-1.8.4 [2.0.11]
690 Libgd 2.0.11 is already emerged, but if you run the command, then 
691 portage will Downgrade to version 1.8.4 for you.
692 .br 
693 This may occur if a newer version of a package has been masked because it is
694 broken or it creates a security risk on your system and a fix has not been
695 released yet.
696 .br 
697 Another reason this may occur is if a package you are trying to emerge requires
698 an older version of a package in order to emerge successfully.  In this case,
699 libgd 2.x is incompatible with libgd 1.x.  This means that packages that were
700 created with libgd 1.x will not compile with 2.x and must downgrade libgd first
701 before they can emerge.
702 .TP
703 .B [ebuild     U ] sys\-devel/distcc\-2.16 [2.13\-r1] USE="ipv6* \-gtk \-qt%"
704 Here we see that the make.conf variable \fBUSE\fR affects how this package is
705 built.  In this example, ipv6 optional support is enabled and both gtk and qt
706 support are disabled.  The asterisk following ipv6 indicates that ipv6 support
707 was disabled the last time this package was installed.  The percent sign
708 following qt indicates that the qt option has been added to the package since
709 it was last installed.  For information about all \fBUSE\fR symbols, see the
710 \fB\-\-verbose\fR option documentation above.
711 .br
712 \fB*Note:\fR Flags that haven't changed since the last install are only
713 displayed when you use the \fB\-\-pretend\fR and \fB\-\-verbose\fR options.
714 Using the \fB\-\-quiet\fR option will prevent all information from being
715 displayed.
716 .SH "NOTES"
717 You should almost always precede any package install or update attempt with a 
718 \fB\-\-pretend\fR install or update.  This lets you see how much will be 
719 done, and shows you any blocking packages that you will have to rectify.  
720 This goes doubly so for the \fBsystem\fR and \fBworld\fR sets, which can 
721 update a large number of packages if the portage tree has been particularly 
722 active.
723 .LP
724 You also want to typically use \fB\-\-update\fR, which ignores packages that 
725 are already fully updated but updates those that are not.
726 .LP
727 When you install a package with uninstalled dependencies and do
728 not explicitly state those dependencies in the list of parameters,
729 they will not be added to the world file.  If you want them to be
730 detected for world updates, make sure to explicitly list them as
731 parameters to \fBemerge\fR.
732 .LP
733 \fBUSE variables\fR may be specified on the command line to
734 override those specified in the default locations, letting you
735 avoid using some dependencies you may not want to have.  \fBUSE
736 flags specified on the command line are NOT remembered\fR.  For
737 example, \fBenv USE="\-X \-gnome" emerge mc\fR will emerge mc with
738 those USE settings (on Bourne-compatible shells you may omit the \fBenv\fR
739 part).  If you want those USE settings to be more 
740 permanent, you can put them in /etc/portage/package.use instead.
741 .LP
742 If \fBemerge \-\-update system\fR or \fBemerge \-\-update world\fR
743 fails with an error message, it may be that an ebuild uses some
744 newer feature not present in this version of \fBemerge\fR.  You
745 can use \fBemerge \-\-update portage\fR to upgrade to the lastest
746 version, which should support any necessary new features.
747 .SH "MASKED PACKAGES"
748 \fINOTE: Please use caution when using development packages.  Problems
749 and bugs resulting from misusing masked packages drains Gentoo
750 developer time.  Please be sure you are capable of handling any problems
751 that may ensue.\fR
752 .LP
753 Masks in \fBportage\fR have many uses: they allow a
754 testing period where the packages can be used in live machines; they
755 prevent the use of a package when it will fail; and they mask existing
756 packages that are broken or could pose a security risk.  Read below
757 to find out how to unmask in various cases.  Also note that if you give 
758 \fBemerge\fR an ebuild, then all forms of masking will be ignored and
759 \fBemerge\fR will attempt to emerge the package.
760 .TP
761 .BR backtracking
762 When packages are masked for \fBbacktracking\fR, it means that the dependency
763 resolver has temporarily masked them in order to avoid dependency conflicts
764 and/or unsatisfied dependencies. This type of mask is typically accompanied
765 by a message about a missed package update which has been skipped in order to
766 avoid dependency conflicts and/or unsatisfied dependencies.
767 .TP
768 .BR package.mask
769 The \fBpackage.mask\fR file primarily blocks the use of packages that cause
770 problems or are known to have issues on different systems.  It resides in
771 \fI/usr/portage/profiles\fR.
772 .TP
773 .BR CHOST
774 Use the \fBACCEPT_CHOSTS\fR variable in \fBmake.conf\fR(5) to control
775 \fBCHOST\fR acceptance.
776 .TP
777 .BR EAPI
778 The \fBEAPI\fR variable in an \fBebuild\fR(5) file is used to mask packages
779 that are not supported by the current version of portage. Packages masked by
780 \fBEAPI\fR can only be installed after portage has been upgraded.
781 .TP
782 .BR KEYWORDS
783 The \fBKEYWORDS\fR variable in an \fBebuild\fR file is also used for masking 
784 a package still in testing.  There are architecture\-specific keywords for 
785 each package that let \fBportage\fR know which systems are compatible with 
786 the package.  Packages which compile on an architecture, but have not been 
787 proven to be "stable", are masked with a tilde (\fB~\fR) in front of the 
788 architecture name.  \fBemerge\fR examines the \fBACCEPT_KEYWORDS\fR environment 
789 variable to allow or disallow the emerging of a package masked by 
790 \fBKEYWORDS\fR.  To inform \fBemerge\fR that it should build these 'testing' 
791 versions of packages, you should update your 
792 \fI/etc/portage/package.accept_keywords\fR
793 file to list the packages you want the
794 \'testing\' version.  See \fBportage\fR(5) for more information.
795 .TP
796 .BR LICENSE
797 The \fBLICENSE\fR variable in an \fBebuild\fR file can be used to mask
798 packages based on licensing restrictions. \fBemerge\fR examines the
799 \fBACCEPT_LICENSE\fR environment variable to allow or disallow the emerging
800 of a package masked by \fBLICENSE\fR. See \fBmake.conf\fR(5) for information
801 about \fBACCEPT_LICENSE\fR, and see \fBportage\fR(5) for information about
802 \fI/etc/portage/package.license\fR.
803 .TP
804 .BR PROPERTIES
805 The \fBPROPERTIES\fR variable in an \fBebuild\fR file can be used to mask
806 packages based on properties restrictions. \fBemerge\fR examines the
807 \fBACCEPT_PROPERTIES\fR environment variable to allow or disallow the emerging
808 of a package masked by \fBPROPERTIES\fR. See \fBmake.conf\fR(5) for information
809 about \fBACCEPT_PROPERTIES\fR, and see \fBportage\fR(5) for information about
810 \fI/etc/portage/package.properties\fR. Use the \fB\-\-accept\-properties\fR
811 option to temporarily override \fBACCEPT_PROPERTIES\fR.
812 .SH "CONFIGURATION FILES"
813 Portage has a special feature called "config file protection". The purpose of
814 this feature is to prevent new package installs from clobbering existing
815 configuration files. By default, config file protection is turned on for /etc
816 and the KDE configuration dirs; more may be added in the future.
817 .LP
818 When Portage installs a file into a protected directory tree like /etc, any
819 existing files will not be overwritten. If a file of the same name already
820 exists, Portage will change the name of the to\-be\-installed file from 'foo' to
821 \'._cfg0000_foo\'. If \'._cfg0000_foo\' already exists, this name becomes
822 \'._cfg0001_foo\', etc. In this way, existing files are not overwritten,
823 allowing the administrator to manually merge the new config files and avoid any
824 unexpected changes.
825 .LP
826 In addition to protecting overwritten files, Portage will not delete any files
827 from a protected directory when a package is unmerged. While this may be a
828 little bit untidy, it does prevent potentially valuable config files from being
829 deleted, which is of paramount importance.
830 .LP
831 Protected directories are set using the \fICONFIG_PROTECT\fR variable, normally
832 defined in make.globals. Directory exceptions to the CONFIG_PROTECTed
833 directories can be specified using the \fICONFIG_PROTECT_MASK\fR variable. To find
834 files that need to be updated in /etc, type \fBfind /etc \-iname \'._cfg????_*\'\fR.
835 .LP
836 You can disable this feature by setting \fICONFIG_PROTECT="\-*"\fR in /etc/make.conf.
837 Then, Portage will mercilessly auto\-update your config files. Alternatively,
838 you can leave Config File Protection on but tell Portage that it can overwrite
839 files in certain specific /etc subdirectories. For example, if you wanted
840 Portage to automatically update your rc scripts and your wget configuration,
841 but didn't want any other changes made without your explicit approval, you'd
842 add this to /etc/make.conf:
843 .LP
844 .I CONFIG_PROTECT_MASK="/etc/wget /etc/rc.d"
845 .LP
846 Tools such as dispatch\-conf, cfg\-update, and etc\-update are also available to
847 aid in the merging of these files. They provide interactive merging and can
848 auto\-merge trivial changes.
849 .SH "REPORTING BUGS"
850 Please report any bugs you encounter through our website:
851 .LP
852 \fBhttp://bugs.gentoo.org/\fR
853 .LP
854 Please include the output of \fBemerge \-\-info\fR when you submit your
855 bug report.
856 .SH "AUTHORS"
857 .nf
858 Daniel Robbins <drobbins@gentoo.org>
859 Geert Bevin <gbevin@gentoo.org>
860 Achim Gottinger <achim@gentoo.org>
861 Nicholas Jones <carpaski@gentoo.org>
862 Phil Bordelon <phil@thenexusproject.org>
863 Mike Frysinger <vapier@gentoo.org>
864 Marius Mauch <genone@gentoo.org>
865 Jason Stubbs <jstubbs@gentoo.org>
866 Brian Harring <ferringb@gmail.com>
867 Zac Medico <zmedico@gentoo.org>
868 .fi
869 .SH "FILES"
870 Here is a common list of files you will probably be interested in.  For a 
871 complete listing, please refer to the \fBportage\fR(5) man page.
872 .TP
873 .B /usr/share/portage/config/sets/
874 Contains the default set configuration.
875 .TP
876 .B /var/lib/portage/world
877 Contains a list of all user\-specified packages.  You can safely edit
878 this file, adding packages that you want to be considered in \fBworld\fR
879 set updates and removing those that you do not want to be considered.
880 .TP
881 .B /etc/make.conf
882 Contains variables for the build process, overriding those in
883 \fBmake.globals\fR.
884 .TP
885 .B /etc/portage/color.map
886 Contains variables customizing colors.
887 .TP
888 .B /etc/dispatch\-conf.conf
889 Contains settings to handle automatic updates/backups of configuration 
890 files.
891 .TP
892 .B /etc/make.profile/make.defaults
893 Contains profile\-specific variables for the build process.  \fBDo not
894 edit this file\fR.
895 .TP
896 .B /usr/portage/profiles/use.desc
897 Contains the master list of USE flags with descriptions of their
898 functions.  \fBDo not edit this file\fR.
899 .TP
900 .B /etc/make.profile/virtuals
901 Contains a list of default packages used to resolve virtual dependencies.
902 \fBDo not edit this file\fR.
903 .TP
904 .B /etc/make.profile/packages
905 Contains a list of packages used for the base system.  The \fBsystem\fR
906 and \fBworld\fR sets consult this file.  \fBDo not edit this file\fR.
907 .TP
908 .B /usr/share/portage/config/make.globals
909 Contains the default variables for the build process.  \fBDo not edit
910 this file\fR.
911 .SH "SEE ALSO"
912 .BR "emerge \-\-help",
913 .BR quickpkg (1),
914 .BR ebuild (1),
915 .BR ebuild (5),
916 .BR make.conf (5),
917 .BR color.map (5),
918 .BR portage (5)
919 .LP
920 A number of helper applications reside in \fI/usr/lib/portage/bin\fR.
921 .LP
922 The \fBapp\-portage/gentoolkit\fR package contains useful scripts such as 
923 \fBequery\fR (a package query tool).