OSDN Git Service

[NEW] errormessage command is added.
[portsreinstall/current.git] / lib / main / libusage.sh
1 #!/bin/sh -e
2 # ==============================================================================
3 # portsreinstall library script
4 # - Help messages -
5 # Copyright (C) 2013-2018 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
6 # This software is distributed under the 2-Clause BSD License.
7 # ==============================================================================
8
9 # ============= Content of the short help =============
10 usage_short_content ()
11 {
12         cat << eof
13 USAGE: portsreinstall [OPTIONS] [--] [command]
14
15 [OPTIONS]
16  <Group 1: Just show messages and exit without operation>
17  -H : Show a long help whose content is the same as the manual page.
18  -h : Show this short help.
19  -V : Show the current version.
20  <Group 2: Effective anytime>
21  -a : Suppress messages to be batch-friendly.
22  -i : Include new targets to the "needed" list.
23  -M : Reset group 4 option settings.
24  -S : Suppress the credit and opening messages.
25  <Group 3: Effective only with redo command>
26  -L : Reload configuration files and reset group 6 option settings.
27  -N : Reset group 5 option settings.
28  <Group 4: Saved and transferred to restarted runs, renewable by -M option>
29  -A : Only non-interactive ports are (re)installed.
30  -B : Exclude run-time dependencies in evaluation of dependencies.
31  -b : Include build-time dependencies in evaluation of dependencies.
32  -C : Skip "make config" by applying default port options if unconfigured.
33  -c : Suppress cleaning the temporary database even if its obsolete.
34  -D : Suppress entire inspection of distinfo in the ports tree.
35  -d : Do not clean up obsolete or unused distfiles.
36  -F: Fetch only.
37  -f : Force continuation for looped dependency.
38  -G : Use prebuilt packages for ports with the default configurations.
39  -g : Keep pkg(8) and dialog4ports(1) untouched.
40  -I : Only interactive ports are (re)installed.
41  -k : Keep portsreinstall itself untouched.
42  -l : Use legacy-style packages when prebuilt modern-style packages are missing.
43  -n : No operation is carried out (just for seeing what will be done).
44  -q : Only new ports and their run-time requirements are reinstalled.
45  -s : Build of vulnerable ports are avoided by triggering errors.
46  -X : Deselect all deinstallation candidates.
47  -x : No execution of pre/post-(de)installation scripts
48  -Y : Select all deinstallation candidates.
49  <Group 5: Saved and transferred to restarted runs, renewable by -N option>
50  -O glob1[:glob2[:...]] : Reinstall only target ports themselves.
51  -o : Ignore ports which are outside of target scopes of -O, -T or -t options.
52  -T glob1[:glob2[:...]] : Reinstall only target ports and their requirements.
53  -t glob1[:glob2[:...]] : Reinstall only target ports and their dependents.
54  <Group 6: Saved and transferred to restarted runs, renewable by -L option>
55  -P : Import settings from pkgtools.conf(5) as the secondary if exists.
56  -p : Import settings from pkgtools.conf(5) as the primary if exists (default).
57  -Q : Ignore pkgtools.conf(5) even if it exists.
58
59  *NOTE*
60  The configuration of options annotated as "saved and transferred to restarted runs" are saved in the temporary database by the first run after creating/cleaning the database. In the following runs, the corresponding option settings are loaded from the saved configuration if executed with no option or exactly the same option set as the saved one. Otherwise, the option settings are renewed for possible ones and the others are loaded from the saved configuration. Then the saved configuration is updated with the renewed settings.
61
62 [ARGUMENTS]
63  command:
64             do [all] (default) | [do] prepare | redo [all] | redo prepare
65           | clean [normal] | clean force | reset [all] | reset keepopts | reset keepstatus
66           | ok add globs... | ok del globs...
67           | taboo add globs... | taboo del globs...
68           | freeze add globs... | freeze del globs...
69           | need add globs... | need del globs...
70           | noneed add globs... | noneed del globs...
71           | reselect leaves | reselect obsolete
72           | save [dir] | load path | glob globs... | options
73           | rmconf globs... | reconf globs... | forget globs...
74           | escape globs... | restore globs...
75           | pkgsanity [globs...]
76           | packupgrade create | packupgrade crop [path] | packupgrade clean
77           | show todo | show done | show resolved | show failure | show redo
78           | show taboo | show need | show noneed | show restored | show deleted
79           | show conflict | show requirements glob... | show dependents glob...
80           | show initrequirements glob... | show initdependents glob...
81           | show conflict_files glob... | show status glob...
82           | show errormessage glob...
83
84 [DESCRIPTIONS]
85  This utility is an alternative to portupgrade(1) and portmaster(8), and designed to be suitable for reinstallation of all packages after major version upgrade of the system or very long absence of ports upgrade.
86  Usually, you can execute with no option nor argument. If portupgrade(1) is installed, compatibility with it is taken into account by importing pkgtools.conf(5) and rebuilding the package database.
87
88 [ROBUSTNESS AGAINST TERMINATION AND RESTART]
89  Execution of "do", "redo" and "packupgrade" commands can be terminated at any points and restarted from there with the same options saved in the temporary database (independent among utilities). The saved options can be changed by the ways depending on the assigned groups of the options. Some options can be reset only by "redo" command. The options are reset to the default by "clean" and "reset all" commands.
90 eof
91 }