Add --help output for --unordered-display, and move man page docs from the
[portage.git] / pym / _emerge / help.py
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 from __future__ import print_function
6
7 from portage.output import bold, turquoise, green
8
9 def shorthelp():
10         print(bold("emerge:")+" the other white meat (command-line interface to the Portage system)")
11         print(bold("Usage:"))
12         print("   "+turquoise("emerge")+" [ "+green("options")+" ] [ "+green("action")+" ] [ "+turquoise("ebuild")+" | "+turquoise("tbz2")+" | "+turquoise("file")+" | "+turquoise("@set")+" | "+turquoise("atom")+" ] [ ... ]")
13         print("   "+turquoise("emerge")+" [ "+green("options")+" ] [ "+green("action")+" ] < "+turquoise("system")+" | "+turquoise("world")+" >")
14         print("   "+turquoise("emerge")+" < "+turquoise("--sync")+" | "+turquoise("--metadata")+" | "+turquoise("--info")+" >")
15         print("   "+turquoise("emerge")+" "+turquoise("--resume")+" [ "+green("--pretend")+" | "+green("--ask")+" | "+green("--skipfirst")+" ]")
16         print("   "+turquoise("emerge")+" "+turquoise("--help")+" [ "+green("--verbose")+" ] ")
17         print(bold("Options:")+" "+green("-")+"["+green("abBcCdDefgGhjkKlnNoOpPqrsStuvV")+"]")
18         print("          [ " + green("--color")+" < " + turquoise("y") + " | "+ turquoise("n")+" >            ] [ "+green("--columns")+"    ]")
19         print("          [ "+green("--complete-graph")+"             ] [ "+green("--deep")+"       ]")
20         print("          [ "+green("--jobs") + " " + turquoise("JOBS")+" ] [ "+green("--keep-going")+" ] [ " + green("--load-average")+" " + turquoise("LOAD") + "            ]")
21         print("          [ "+green("--newuse")+"    ] [ "+green("--noconfmem")+"  ] [ "+green("--nospinner")+"  ]")
22         print("          [ "+green("--oneshot")+"   ] [ "+green("--onlydeps")+"   ]")
23         print("          [ "+green("--reinstall ")+turquoise("changed-use")+"      ] [ " + green("--with-bdeps")+" < " + turquoise("y") + " | "+ turquoise("n")+" >         ]")
24         print(bold("Actions:")+"  [ "+green("--depclean")+" | "+green("--list-sets")+" | "+green("--search")+" | "+green("--sync")+" | "+green("--version")+"        ]")
25
26 def help(myopts, havecolor=1):
27         # TODO: Implement a wrap() that accounts for console color escape codes.
28         from textwrap import wrap
29         desc_left_margin = 14
30         desc_indent = desc_left_margin * " "
31         desc_width = 80 - desc_left_margin - 5
32         if "--verbose" not in myopts:
33                 shorthelp()
34                 print()
35                 print("   For more help try 'emerge --help --verbose' or consult the man page.")
36         else:
37                 shorthelp()
38                 print()
39                 print(turquoise("Help (this screen):"))
40                 print("       "+green("--help")+" ("+green("-h")+" short option)")
41                 print("              Displays this help; an additional argument (see above) will tell")
42                 print("              emerge to display detailed help.")
43                 print()
44                 print(turquoise("Actions:"))
45                 print("       "+green("--clean")+" ("+green("-c")+" short option)")
46                 print("              Cleans the system by removing outdated packages which will not")
47                 print("              remove functionalities or prevent your system from working.")
48                 print("              The arguments can be in several different formats :")
49                 print("              * world ")
50                 print("              * system or")
51                 print("              * 'dependency specification' (in single quotes is best.)")
52                 print("              Here are a few examples of the dependency specification format:")
53                 print("              "+bold("binutils")+" matches")
54                 print("                  binutils-2.11.90.0.7 and binutils-2.11.92.0.12.3-r1")
55                 print("              "+bold("sys-devel/binutils")+" matches")
56                 print("                  binutils-2.11.90.0.7 and binutils-2.11.92.0.12.3-r1")
57                 print("              "+bold(">sys-devel/binutils-2.11.90.0.7")+" matches")
58                 print("                  binutils-2.11.92.0.12.3-r1")
59                 print("              "+bold(">=sys-devel/binutils-2.11.90.0.7")+" matches")
60                 print("                  binutils-2.11.90.0.7 and binutils-2.11.92.0.12.3-r1")
61                 print("              "+bold("<=sys-devel/binutils-2.11.92.0.12.3-r1")+" matches")
62                 print("                  binutils-2.11.90.0.7 and binutils-2.11.92.0.12.3-r1")
63                 print()
64                 print("       "+green("--config"))
65                 print("              Runs package-specific operations that must be executed after an")
66                 print("              emerge process has completed.  This usually entails configuration")
67                 print("              file setup or other similar setups that the user may wish to run.")
68                 print()
69                 print("       "+green("--depclean"))
70
71                 paragraph = "Cleans the system by removing packages that are " + \
72                 "not associated with explicitly merged packages. Depclean works " + \
73                 "by creating the full dependency tree from the " + \
74                 "@world set, then comparing it to installed packages. Packages " + \
75                 "installed, but not part of the dependency tree, will be " + \
76                 "uninstalled by depclean. See --with-bdeps for behavior with " + \
77                 "respect to build time dependencies that are not strictly " + \
78                 "required. Packages that are part of the world set will " + \
79                 "always be kept. They can be manually added to this set with " + \
80                 "emerge --noreplace <atom>. As a safety measure, depclean " + \
81                 "will not remove any packages unless *all* required dependencies " + \
82                 "have been resolved. As a consequence, it is often necessary to " + \
83                 "run emerge --update --newuse --deep @world " + \
84                 "prior to depclean."
85
86                 for line in wrap(paragraph, desc_width):
87                         print(desc_indent + line)
88                 print()
89
90                 paragraph =  "WARNING: Inexperienced users are advised to use " + \
91                 "--pretend with this option in order to see a preview of which " + \
92                 "packages will be uninstalled. Always study the list of packages " + \
93                 "to be cleaned for any obvious mistakes. Note that packages " + \
94                 "listed in package.provided (see portage(5)) may be removed by " + \
95                 "depclean, even if they are part of the world set."
96
97                 for line in wrap(paragraph, desc_width):
98                         print(desc_indent + line)
99                 print()
100
101                 paragraph = "Depclean serves as a dependency aware version of " + \
102                         "--unmerge. When given one or more atoms, it will unmerge " + \
103                         "matched packages that have no reverse dependencies. Use " + \
104                         "--depclean together with --verbose to show reverse dependencies."
105
106                 for line in wrap(paragraph, desc_width):
107                         print(desc_indent + line)
108                 print()
109                 print("       " + green("--deselect") + "[=%s]" % turquoise("n"))
110
111                 paragraph = \
112                         "Remove atoms from the world file. This action is implied " + \
113                         "by uninstall actions, including --depclean, " + \
114                         "--prune and --unmerge. Use --deselect=n " + \
115                         "in order to prevent uninstall actions from removing " + \
116                         "atoms from the world file."
117
118                 for line in wrap(paragraph, desc_width):
119                         print(desc_indent + line)
120                 print()
121                 print("       "+green("--info"))
122                 print("              Displays important portage variables that will be exported to")
123                 print("              ebuild.sh when performing merges. This information is useful")
124                 print("              for bug reports and verification of settings. All settings in")
125                 print("              make.{conf,globals,defaults} and the environment show up if")
126                 print("              run with the '--verbose' flag.")
127                 print()
128                 print("       " + green("--list-sets"))
129                 paragraph = "Displays a list of available package sets."
130
131                 for line in wrap(paragraph, desc_width):
132                         print(desc_indent + line)
133                 print()
134                 print("       "+green("--metadata"))
135                 print("              Transfers metadata cache from ${PORTDIR}/metadata/cache/ to")
136                 print("              /var/cache/edb/dep/ as is normally done on the tail end of an")
137                 print("              rsync update using " + bold("emerge --sync") + ". This process populates the")
138                 print("              cache database that portage uses for pre-parsed lookups of")
139                 print("              package data.  It does not populate cache for the overlays")
140                 print("              listed in PORTDIR_OVERLAY.  In order to generate cache for")
141                 print("              overlays, use " + bold("--regen") + ".")
142                 print()
143                 print("       "+green("--prune")+" ("+green("-P")+" short option)")
144                 print("              "+turquoise("WARNING: This action can remove important packages!"))
145                 paragraph = "Removes all but the highest installed version of a " + \
146                         "package from your system. Use --prune together with " + \
147                         "--verbose to show reverse dependencies or with --nodeps " + \
148                         "to ignore all dependencies. "
149
150                 for line in wrap(paragraph, desc_width):
151                         print(desc_indent + line)
152                 print()
153                 print("       "+green("--regen"))
154                 print("              Causes portage to check and update the dependency cache of all")
155                 print("              ebuilds in the portage tree. This is not recommended for rsync")
156                 print("              users as rsync updates the cache using server-side caches.")
157                 print("              Rsync users should simply 'emerge --sync' to regenerate.")
158                 desc = "In order to specify parallel --regen behavior, use "+ \
159                         "the ---jobs and --load-average options. If you would like to " + \
160                         "generate and distribute cache for use by others, use egencache(1)."
161                 for line in wrap(desc, desc_width):
162                         print(desc_indent + line)
163                 print()
164                 print("       "+green("--resume")+" ("+green("-r")+" short option)")
165                 print("              Resumes the most recent merge list that has been aborted due to an")
166                 print("              error. Please note that this operation will only return an error")
167                 print("              on failure. If there is nothing for portage to do, then portage")
168                 print("              will exit with a message and a success condition. A resume list")
169                 print("              will persist until it has been completed in entirety or until")
170                 print("              another aborted merge list replaces it. The resume history is")
171                 print("              capable of storing two merge lists. After one resume list")
172                 print("              completes, it is possible to invoke --resume once again in order")
173                 print("              to resume an older list.")
174                 print()
175                 print("       "+green("--search")+" ("+green("-s")+" short option)")
176                 print("              Searches for matches of the supplied string in the current local")
177                 print("              portage tree. By default emerge uses a case-insensitive simple ")
178                 print("              search, but you can enable a regular expression search by ")
179                 print("              prefixing the search string with %.")
180                 print("              Prepending the expression with a '@' will cause the category to")
181                 print("              be included in the search.")
182                 print("              A few examples:")
183                 print("              "+bold("emerge --search libc"))
184                 print("                  list all packages that contain libc in their name")
185                 print("              "+bold("emerge --search '%^kde'"))
186                 print("                  list all packages starting with kde")
187                 print("              "+bold("emerge --search '%gcc$'"))
188                 print("                  list all packages ending with gcc")
189                 print("              "+bold("emerge --search '%@^dev-java.*jdk'"))
190                 print("                  list all available Java JDKs")
191                 print()
192                 print("       "+green("--searchdesc")+" ("+green("-S")+" short option)")
193                 print("              Matches the search string against the description field as well")
194                 print("              the package's name. Take caution as the descriptions are also")
195                 print("              matched as regular expressions.")
196                 print("                emerge -S html")
197                 print("                emerge -S applet")
198                 print("                emerge -S 'perl.*module'")
199                 print()
200                 print("       "+green("--sync"))
201                 print("              Tells emerge to update the Portage tree as specified in")
202                 print("              The SYNC variable found in /etc/make.conf.  By default, SYNC instructs")
203                 print("              emerge to perform an rsync-style update with rsync.gentoo.org.")
204                 print()
205                 print("              'emerge-webrsync' exists as a helper app to emerge --sync, providing a")
206                 print("              method to receive the entire portage tree as a tarball that can be")
207                 print("              extracted and used. First time syncs would benefit greatly from this.")
208                 print()
209                 print("              "+turquoise("WARNING:"))
210                 print("              If using our rsync server, emerge will clean out all files that do not")
211                 print("              exist on it, including ones that you may have created. The exceptions")
212                 print("              to this are the distfiles, local and packages directories.")
213                 print()
214                 print("       "+green("--unmerge")+" ("+green("-C")+" short option)")
215                 print("              "+turquoise("WARNING: This action can remove important packages!"))
216                 print("              Removes all matching packages. This does no checking of")
217                 print("              dependencies, so it may remove packages necessary for the proper")
218                 print("              operation of your system. Its arguments can be atoms or")
219                 print("              ebuilds. For a dependency aware version of --unmerge, use")
220                 print("              --depclean or --prune.")
221                 print()
222                 print("       "+green("--update")+" ("+green("-u")+" short option)")
223                 print("              Updates packages to the best version available, which may not")
224                 print("              always be the highest version number due to masking for testing")
225                 print("              and development. Package atoms specified on the command")
226                 print("              line are greedy, meaning that unspecific atoms may match multiple")
227                 print("              installed versions of slotted packages.")
228                 print()
229                 print("       "+green("--version")+" ("+green("-V")+" short option)")
230                 print("              Displays the currently installed version of portage along with")
231                 print("              other information useful for quick reference on a system. See")
232                 print("              "+bold("emerge info")+" for more advanced information.")
233                 print()
234                 print(turquoise("Options:"))
235                 print("       "+green("--accept-properties=ACCEPT_PROPERTIES"))
236                 desc = "This option temporarily overrides the ACCEPT_PROPERTIES " + \
237                         "variable. The ACCEPT_PROPERTIES variable is incremental, " + \
238                         "which means that the specified setting is appended to the " + \
239                         "existing value from your configuration. The special -* " + \
240                         "token can be used to discard the existing configuration " + \
241                         "value and start fresh. See the MASKED PACKAGES section " + \
242                         "and make.conf(5) for more information about " + \
243                         "ACCEPT_PROPERTIES. A typical usage example for this option " + \
244                         "would be to use --accept-properties=-interactive to " + \
245                         "temporarily mask interactive packages. With default " + \
246                         "configuration, this would result in an effective " + \
247                         "ACCEPT_PROPERTIES value of \"* -interactive\"."
248                 for line in wrap(desc, desc_width):
249                         print(desc_indent + line)
250                 print()
251                 print("       "+green("--alphabetical"))
252                 print("              When displaying USE and other flag output, combines the enabled")
253                 print("              and disabled flags into a single list and sorts it alphabetically.")
254                 print("              With this option, output such as USE=\"dar -bar -foo\" will instead")
255                 print("              be displayed as USE=\"-bar dar -foo\"")
256                 print()
257                 print("       "+green("--ask")+" ("+green("-a")+" short option)")
258                 print("              before performing the merge, display what ebuilds and tbz2s will")
259                 print("              be installed, in the same format as when using --pretend; then")
260                 print("              ask whether to continue with the merge or abort. Using --ask is")
261                 print("              more efficient than using --pretend and then executing the same")
262                 print("              command without --pretend, as dependencies will only need to be")
263                 print("              calculated once. WARNING: If the \"Enter\" key is pressed at the")
264                 print("              prompt (with no other input), it is interpreted as acceptance of")
265                 print("              the first choice.  Note that the input buffer is not cleared prior")
266                 print("              to the prompt, so an accidental press of the \"Enter\" key at any")
267                 print("              time prior to the prompt will be interpreted as a choice!")
268                 print()
269                 print("        " + green("--binpkg-respect-use") + \
270                         " < " + turquoise("y") + " | " + turquoise("n") + " >")
271                 desc = "Tells emerge to ignore binary packages if their use flags" + \
272                         " don't match the current configuration. (default: 'n')"
273                 for line in wrap(desc, desc_width):
274                         print(desc_indent + line)
275                 print()
276                 print("       "+green("--buildpkg")+" ("+green("-b")+" short option)")
277                 desc = "Tells emerge to build binary packages for all ebuilds processed in" + \
278                         " addition to actually merging the packages. Useful for maintainers" + \
279                         " or if you administrate multiple Gentoo Linux systems (build once," + \
280                         " emerge tbz2s everywhere) as well as disaster recovery. The package" + \
281                         " will be created in the" + \
282                         " ${PKGDIR}/All directory. An alternative for already-merged" + \
283                         " packages is to use quickpkg(1) which creates a tbz2 from the" + \
284                         " live filesystem."
285                 for line in wrap(desc, desc_width):
286                         print(desc_indent + line)
287                 print()
288                 print("       "+green("--buildpkgonly")+" ("+green("-B")+" short option)")
289                 print("              Creates a binary package, but does not merge it to the")
290                 print("              system. This has the restriction that unsatisfied dependencies")
291                 print("              must not exist for the desired package as they cannot be used if")
292                 print("              they do not exist on the system.")
293                 print()
294                 print("       " + green("--changed-use"))
295                 desc = "This is an alias for --reinstall=changed-use."
296                 for line in wrap(desc, desc_width):
297                         print(desc_indent + line)
298                 print()
299                 print("       "+green("--changelog")+" ("+green("-l")+" short option)")
300                 print("              When pretending, also display the ChangeLog entries for packages")
301                 print("              that will be upgraded.")
302                 print()
303                 print("       "+green("--color") + " < " + turquoise("y") + " | "+ turquoise("n")+" >")
304                 print("              Enable or disable color output. This option will override NOCOLOR")
305                 print("              (see make.conf(5)) and may also be used to force color output when")
306                 print("              stdout is not a tty (by default, color is disabled unless stdout")
307                 print("              is a tty).")
308                 print()
309                 print("       "+green("--columns"))
310                 print("              Display the pretend output in a tabular form. Versions are")
311                 print("              aligned vertically.")
312                 print()
313                 print("       "+green("--complete-graph") + "[=%s]" % turquoise("n"))
314                 desc = "This causes emerge to consider the deep dependencies of all" + \
315                         " packages from the world set. With this option enabled," + \
316                         " emerge will bail out if it determines that the given operation will" + \
317                         " break any dependencies of the packages that have been added to the" + \
318                         " graph. Like the --deep option, the --complete-graph" + \
319                         " option will significantly increase the time taken for dependency" + \
320                         " calculations. Note that, unlike the --deep option, the" + \
321                         " --complete-graph option does not cause any more packages to" + \
322                         " be updated than would have otherwise been updated with the option disabled."
323                 for line in wrap(desc, desc_width):
324                         print(desc_indent + line)
325                 print()
326                 print("       "+green("--config-root=DIR"))
327                 desc = "Set the PORTAGE_CONFIGROOT environment variable " + \
328                         "which is documented in the emerge(1) man page."
329                 for line in wrap(desc, desc_width):
330                         print(desc_indent + line)
331                 print()
332                 print("       "+green("--debug")+" ("+green("-d")+" short option)")
333                 print("              Tell emerge to run the ebuild command in --debug mode. In this")
334                 print("              mode, the bash build environment will run with the -x option,")
335                 print("              causing it to output verbose debug information print to stdout.")
336                 print("              --debug is great for finding bash syntax errors as providing")
337                 print("              very verbose information about the dependency and build process.")
338                 print()
339                 print("       "+green("--deep") + " " + turquoise("[DEPTH]") + \
340                         " (" + green("-D") + " short option)")
341                 print("              This flag forces emerge to consider the entire dependency tree of")
342                 print("              packages, instead of checking only the immediate dependencies of")
343                 print("              the packages. As an example, this catches updates in libraries")
344                 print("              that are not directly listed in the dependencies of a package.")
345                 print("              Also see --with-bdeps for behavior with respect to build time")
346                 print("              dependencies that are not strictly required.")
347                 print() 
348                 print("       "+green("--emptytree")+" ("+green("-e")+" short option)")
349                 print("              Virtually tweaks the tree of installed packages to contain")
350                 print("              nothing. This is great to use together with --pretend. This makes")
351                 print("              it possible for developers to get a complete overview of the")
352                 print("              complete dependency tree of a certain package.")
353                 print()
354                 print("       "+green("--fail-clean[=n]"))
355                 desc = "Clean up temporary files after a build failure. This is " + \
356                         "particularly useful if you have PORTAGE_TMPDIR on " + \
357                         "tmpfs. If this option is enabled, you probably also want " + \
358                         "to enable PORT_LOGDIR (see make.conf(5)) in " + \
359                         "order to save the build log."
360                 for line in wrap(desc, desc_width):
361                         print(desc_indent + line)
362                 print()
363                 print("       "+green("--fetchonly")+" ("+green("-f")+" short option)")
364                 print("              Instead of doing any package building, just perform fetches for")
365                 print("              all packages (main package as well as all dependencies.) When")
366                 print("              used in combination with --pretend all the SRC_URIs will be")
367                 print("              displayed multiple mirrors per line, one line per file.")
368                 print()
369                 print("       "+green("--fetch-all-uri")+" ("+green("-F")+" short option)")
370                 print("              Same as --fetchonly except that all package files, including those")
371                 print("              not required to build the package, will be processed.")
372                 print()
373                 print("       "+green("--getbinpkg")+ "[=%s]" % turquoise("n") + " ("+green("-g")+" short option)")
374                 print("              Using the server and location defined in PORTAGE_BINHOST, portage")
375                 print("              will download the information from each binary file there and it")
376                 print("              will use that information to help build the dependency list. This")
377                 print("              option implies '-k'. (Use -gK for binary-only merging.)")
378                 print()
379                 print("       "+green("--getbinpkgonly")+ "[=%s]" % turquoise("n") + " ("+green("-G")+" short option)")
380                 print("              This option is identical to -g, as above, except it will not use")
381                 print("              ANY information from the local machine. All binaries will be")
382                 print("              downloaded from the remote server without consulting packages")
383                 print("              existing in the packages directory.")
384                 print()
385                 print("       " + green("--jobs") + " " + turquoise("[JOBS]") + " ("+green("-j")+" short option)")
386                 desc = "Specifies the number of packages " + \
387                         "to build simultaneously. If this option is " + \
388                         "given without an argument, emerge will not " + \
389                         "limit the number of jobs that " + \
390                         "can run simultaneously. Also see " + \
391                         "the related --load-average option. " + \
392                         "Note that interactive packages currently force a setting " + \
393                         "of --jobs=1. This issue can be temporarily avoided " + \
394                         "by specifying --accept-properties=-interactive."
395                 for line in wrap(desc, desc_width):
396                         print(desc_indent + line)
397                 print()
398                 print("       " + green("--keep-going") + "[=%s]" % turquoise("n"))
399                 desc = "Continue as much as possible after " + \
400                         "an error. When an error occurs, " + \
401                         "dependencies are recalculated for " + \
402                         "remaining packages and any with " + \
403                         "unsatisfied dependencies are " + \
404                         "automatically dropped. Also see " + \
405                         "the related --skipfirst option."
406                 for line in wrap(desc, desc_width):
407                         print(desc_indent + line)
408                 print()
409                 print("       " + green("--load-average") + " " + turquoise("LOAD"))
410                 desc = "Specifies that no new builds should " + \
411                         "be started if there are other builds " + \
412                         "running and the load average is at " + \
413                         "least LOAD (a floating-point number). " + \
414                         "This option is recommended for use " + \
415                         "in combination with --jobs in " + \
416                         "order to avoid excess load. See " + \
417                         "make(1) for information about " + \
418                         "analogous options that should be " + \
419                         "configured via MAKEOPTS in " + \
420                         "make.conf(5)."
421                 for line in wrap(desc, desc_width):
422                         print(desc_indent + line)
423                 print()
424                 print("       "+green("--newuse")+" ("+green("-N")+" short option)")
425                 print("              Tells emerge to include installed packages where USE flags have ")
426                 print("              changed since installation.")
427                 print()
428                 print("       "+green("--noconfmem"))
429                 print("              Portage keeps track of files that have been placed into")
430                 print("              CONFIG_PROTECT directories, and normally it will not merge the")
431                 print("              same file more than once, as that would become annoying. This")
432                 print("              can lead to problems when the user wants the file in the case")
433                 print("              of accidental deletion. With this option, files will always be")
434                 print("              merged to the live fs instead of silently dropped.")
435                 print()
436                 print("       "+green("--nodeps")+" ("+green("-O")+" short option)")
437                 print("              Merge specified packages, but don't merge any dependencies.")
438                 print("              Note that the build may fail if deps aren't satisfied.")
439                 print() 
440                 print("       "+green("--noreplace")+" ("+green("-n")+" short option)")
441                 print("              Skip the packages specified on the command-line that have")
442                 print("              already been installed.  Without this option, any packages,")
443                 print("              ebuilds, or deps you specify on the command-line *will* cause")
444                 print("              Portage to remerge the package, even if it is already installed.")
445                 print("              Note that Portage won't remerge dependencies by default.")
446                 desc = "Also note that this option takes " + \
447                         "precedence over options such as --newuse, preventing a package " + \
448                         "from being reinstalled even though the corresponding USE flag settings " + \
449                         "may have changed."
450                 for line in wrap(desc, desc_width):
451                         print(desc_indent + line)
452                 print() 
453                 print("       "+green("--nospinner"))
454                 print("              Disables the spinner regardless of terminal type.")
455                 print()
456                 print("       "+green("--oneshot")+" ("+green("-1")+" short option)")
457                 print("              Emerge as normal, but don't add packages to the world profile.")
458                 print("              This package will only be updated if it is depended upon by")
459                 print("              another package.")
460                 print()
461                 print("       "+green("--onlydeps")+" ("+green("-o")+" short option)")
462                 print("              Only merge (or pretend to merge) the dependencies of the")
463                 print("              specified packages, not the packages themselves.")
464                 print()
465                 print("       "+green("--pretend")+" ("+green("-p")+" short option)")
466                 print("              Instead of actually performing the merge, simply display what")
467                 print("              ebuilds and tbz2s *would* have been installed if --pretend")
468                 print("              weren't used.  Using --pretend is strongly recommended before")
469                 print("              installing an unfamiliar package.  In the printout, N = new,")
470                 print("              U = updating, R = replacing, F = fetch  restricted, B = blocked")
471                 print("              by an already installed package, D = possible downgrading,")
472                 print("              S = slotted install. --verbose causes affecting use flags to be")
473                 print("              printed out accompanied by a '+' for enabled and a '-' for")
474                 print("              disabled USE flags.")
475                 print()
476                 print("       "+green("--quiet")+" ("+green("-q")+" short option)")
477                 print("              Effects vary, but the general outcome is a reduced or condensed")
478                 print("              output from portage's displays.")
479                 print()
480                 print("       "+green("--reinstall ") + turquoise("changed-use"))
481                 print("              Tells emerge to include installed packages where USE flags have")
482                 print("              changed since installation.  Unlike --newuse, this option does")
483                 print("              not trigger reinstallation when flags that the user has not")
484                 print("              enabled are added or removed.")
485                 print()
486                 print("       "+green("--root=DIR"))
487                 desc = "Set the ROOT environment variable " + \
488                         "which is documented in the emerge(1) man page."
489                 for line in wrap(desc, desc_width):
490                         print(desc_indent + line)
491                 print()
492                 print("       "+green("--root-deps[=rdeps]"))
493                 desc = "If no argument is given then build-time dependencies of packages for " + \
494                         "ROOT are installed to " + \
495                         "ROOT instead of /. If the rdeps argument is given then discard " + \
496                         "all build-time dependencies of packages for ROOT. This option is " + \
497                         "only meaningful when used together with ROOT and it should not " + \
498                         "be enabled under normal circumstances. For currently supported " + \
499                         "EAPI values, the build-time dependencies are specified in the " + \
500                         "DEPEND variable. However, behavior may change for new " + \
501                         "EAPIs when related extensions are added in the future."
502                 for line in wrap(desc, desc_width):
503                         print(desc_indent + line)
504                 print()
505                 print("       " + green("--select") + "[=%s]" % turquoise("n"))
506                 desc = "Add specified packages to the world set (inverse of " + \
507                         "--oneshot). This is useful if you want to " + \
508                         "use EMERGE_DEFAULT_OPTS to make " + \
509                         "--oneshot behavior default."
510                 for line in wrap(desc, desc_width):
511                         print(desc_indent + line)
512                 print()
513                 print("       " + green("--selective") + "[=%s]" % turquoise("n"))
514                 desc = "This is similar to the --noreplace option, except that it " + \
515                         "does not take precedence over options such as --newuse. " + \
516                         "Some options, such as --update, imply --selective. " + \
517                         "Use --selective=n if you want to forcefully disable " + \
518                         "--selective, regardless of options like --update."
519                 for line in wrap(desc, desc_width):
520                         print(desc_indent + line)
521                 print()
522                 print("       "+green("--skipfirst"))
523                 desc = "This option is only valid when " + \
524                         "used with --resume.  It removes the " + \
525                         "first package in the resume list. " + \
526                         "Dependencies are recalculated for " + \
527                         "remaining packages and any that " + \
528                         "have unsatisfied dependencies or are " + \
529                         "masked will be automatically dropped. " + \
530                         "Also see the related " + \
531                         "--keep-going option."
532                 for line in wrap(desc, desc_width):
533                         print(desc_indent + line)
534                 print()
535                 print("       "+green("--tree")+" ("+green("-t")+" short option)")
536                 print("              Shows the dependency tree using indentation for dependencies.")
537                 print("              The packages are also listed in reverse merge order so that")
538                 print("              a package's dependencies follow the package. Only really useful")
539                 print("              in combination with --emptytree, --update or --deep.")
540                 print()
541                 print("       " + green("--unordered-display"))
542                 desc = "By default the displayed merge list is sorted using the " + \
543                         "order in which the packages will be merged. When " + \
544                         "--tree is used together with this option, this " + \
545                         "constraint is removed, hopefully leading to a more " + \
546                         "readable dependency tree."
547                 for line in wrap(desc, desc_width):
548                         print(desc_indent + line)
549                 print()
550                 print("       " + green("--use-ebuild-visibility") + "[=%s]" % turquoise("n"))
551                 desc = "Use unbuilt ebuild metadata for visibility " + \
552                         "checks on built packages."
553                 for line in wrap(desc, desc_width):
554                         print(desc_indent + line)
555                 print()
556                 print("       "+green("--usepkg")+ "[=%s]" % turquoise("n") + " ("+green("-k")+" short option)")
557                 print("              Tell emerge to use binary packages (from $PKGDIR) if they are")
558                 print("              available, thus possibly avoiding some time-consuming compiles.")
559                 print("              This option is useful for CD installs; you can export")
560                 print("              PKGDIR=/mnt/cdrom/packages and then use this option to have")
561                 print("              emerge \"pull\" binary packages from the CD in order to satisfy") 
562                 print("              dependencies.")
563                 print()
564                 print("       "+green("--usepkgonly")+ "[=%s]" % turquoise("n") + " ("+green("-K")+" short option)")
565                 print("              Like --usepkg above, except this only allows the use of binary")
566                 print("              packages, and it will abort the emerge if the package is not")
567                 print("              available at the time of dependency calculation.")
568                 print()
569                 print("       "+green("--verbose")+" ("+green("-v")+" short option)")
570                 print("              Effects vary, but the general outcome is an increased or expanded")
571                 print("              display of content in portage's displays.")
572                 print()
573                 print("       "+green("--with-bdeps")+" < " + turquoise("y") + " | "+ turquoise("n")+" >")
574                 print("              In dependency calculations, pull in build time dependencies that")
575                 print("              are not strictly required. This defaults to 'n' for installation")
576                 print("              actions and 'y' for the --depclean action. This setting can be")
577                 print("              added to EMERGE_DEFAULT_OPTS (see make.conf(5)) and later")
578                 print("              overridden via the command line.")
579                 print()