OSDN Git Service

Version 2.2.2+toward_3.0.0_20130531074611
[portsreinstall/current.git] / man / portsreinstall.8
1 .\" ==================================================================================
2 .\" ports reinstall installation guide
3 .\" Copyright (C) 2010-2013 Mamoru Sakaue, MwGhennndo, All Rights Reserved.
4 .\" ==================================================================================
5 .TH PORTSREINSTALL 8 "22 May 2013" "FreeBSD" "FreeBSD System Manager's Manual"
6 .SH NAME
7 portsreinstall \- ports upgrading utility for massive forced reinstallation
8 .SH SYNOPSIS
9 .B portsreinstall
10 [
11 .I
12 OPTIONS
13 ] [
14 .B
15 \-\-
16 ] [
17 .I
18 command
19 ]
20 .SH DESCRIPTION
21 This utility is an alternative to \fBportupgrade\fR(1) and \fBportmaster\fR(8), and designed to be suitable for reinstallation/upgrade of all packages after major version upgrade of the system or very long absence of ports upgrade, or for entire correction of confusion among installed packages.
22 .SH NOTATIONS
23  A \fIglob\fR is an extended regular expression or a shell\-type glob pattern matching either of a unique name, package names or port origins.
24  The glob syntax is compatible with \fBportupgrade\fR(1) and its accompaniments such as \fBportsdb\fR(1), \fBpkg_glob\fR(1) and \fBports_glob\fR(1).
25  If a glob starts with a colon ":", the following string is parsed as an extended regular expression, and otherwise a shell\-type glob.
26  A shell\-type glob is evaluated by matching an asterisk "*" to an arbitrary string of an arbitrary length, a question mark "?" to an arbitrary single character, characters "..." enclosed in a bracket "[...]" to a single character as one of the characters and characters "..." in a bracket "[!...]" to a single character matching none of the characters.
27  Here, the evaluation of the bracket is actually done by passing it to an extended regular expression by simply converting the prefix "[!" to "[^".
28  A glob is recognized as a unique name (package name without the version part) if no slash "/" or any special character for an extended regular expression or a shell\-type glob is included in the pattern.
29  For example, all of "zip" "zip\-3.?", "zip\-*", "zip\-[0\-9]*" and ":^zip\-[[:digit:]]+\.*" can match "zip\-3.0"; "archivers/unzip*" can match both of "archivers/unzip" and "archivers/unzip\-iconv".
30 .SH ARGUMENTS
31 One of the following \fIcommands\fR can be given for optional operations or confirmation.
32 .TP
33 \fBdo\fR
34 .PD 0
35 .TP
36 \fBdo all\fR
37 Full execution (default).
38 .TP
39 \fBprepare\fR
40 .PD 0
41 .TP
42 \fBdo prepare\fR
43 Just build (or continue to build or rebuild) the temporary database and stop before the actual operations to the ports/packages.
44 .TP
45 \fBredo\fR
46 .PD 0
47 .TP
48 \fBredo all\fR
49 Execute again for failed ports and their dependents.
50 .TP
51 \fBredo prepare\fR
52 Just rebuild the temporary database and stop before the actual operations for the redo process.
53 In case of restarting a stopped \fBredo prepare\fR process, execute by \fBprepare\fR or \fBdo prepare\fR command instead of this command.
54 .TP
55 \fBclean\fR
56 .PD 0
57 .TP
58 \fBclean [normal]\fR
59 Clean up the temporary database.
60 .TP
61 \fBclean force\fR
62 Clean up the temporary database without checking the privilege.
63 .TP
64 \fBreset\fR
65 .PD 0
66 .TP
67 \fBreset all\fR
68 Reset the temporary database by preserving the initial snapshot of installed packages.
69 This is for a rescue in case the temporary database is broken.
70 .TP
71 \fBreset keepopts\fR
72 Reset the temporary database by preserving the initial snapshot of installed packages and option settings.
73 This is for a rescue in case the temporary database is broken.
74 .TP
75 \fBok add\fR \fIglob1\fR [\fIglob2\fR ...]
76 Register manually resolved ports.
77 The port globs are separated from each other by comma or space.
78 .TP
79 \fBok del\fR \fIglob1\fR [\fIglob2\fR ...]
80 deregister manually resolved ports.
81 The port globs are separated from each other by comma or space.
82 .TP
83 \fBtaboo add\fR \fIglob1\fR [\fIglob2\fR ...]
84 Register taboo ports that must not be built or newly (re)installed.
85 The port globs are separated from each other by comma or space.
86 Registration to be "taboo" practically invalidates "necessary" registered by \fBnoneed add\fR command.
87 Ports specified in the HOLD section in the configuration file are protected from deinstallation.
88 The port globs are separated from each other by comma or space.
89 This functionality is intended to avoid manually deinstalled ports because of confliction or ports whose build or installation operations can damage the system, e.g., by flooding the file systems or kernel panic.
90 This command is for temporal definitions and permanent definitions should be given as TABOO_* values in ${LOCALBASE}/etc/portsreinstall.conf instead.
91 .TP
92 \fBtaboo del\fR \fIglob1\fR [\fIglob2\fR ...]
93 Deregister taboo ports.
94 The port globs are separated from each other by comma or space.
95 .TP
96 \fBneed add\fR \fIglob1\fR [\fIglob2\fR ...]
97 Register necessary ports that should be newly installed if not yet and kept installed even if being obsolete.
98 The port globs are separated from each other by comma or space.
99 Registration to be "necessary" takes priority over "unnecessary" registered by \fBnoneed add\fR command.
100 In other words, the registered ports are excluded from deinstallation candidates if they are obsolete, leaf or not-initially-installed ports, and otherwise have no effect on the actual operations.
101 .TP
102 \fBneed del\fR \fIglob1\fR [\fIglob2\fR ...]
103 Deregister necessary ports.
104 The port globs are separated from each other by comma or space.
105 The deregistered ports are added to leaf port candidates if they are not initially installed.
106 In this case, information on the deregistered ports remain until removal by \fBforget\fR command.
107 .TP
108 \fBnoneed add\fR \fIglob1\fR [\fIglob2\fR ...]
109 Register unnecessary ports that should be deinstalled unless required by other non\-leaf ports.
110 The port globs are separated from each other by comma or space.
111 In other words, the registered ports are added to leaf ports if they have no non\-leaf dependent, and otherwise have no effect on the actual operations.
112 Requirements of the registered ports are also recognized as leaves if all of their dependents are leaves.
113 Ports specified in the HOLD section in the configuration file are protected.
114 For example, just after installing new ports due to \fBneed add\fR command or \fB\-i\fR option as requirements of a specified target, registering only the target will let the all required ports be leaves as well as the target.
115 Actually deinstalled ports are selected via dialog together with the original leaf ports.
116 .TP
117 \fBnoneed del\fR \fIglob1\fR [\fIglob2\fR ...]
118 Deregister unnecessary ports.
119 The port globs are separated from each other by comma or space.
120 .TP
121 \fBreselect leaves\fR
122 Reselect leaf ports to delete.
123 This command is effective only after the temporary database is once built.
124 .TP
125 \fBreselect obsolete\fR
126 Reselect obsolete ports to delete.
127 This command is effective only after the temporary database is once built.
128 .TP
129 \fBsave\fR [\fIdir\fR]
130 Save the current temporary database as a .tar.gz archive.
131 The file name is created automatically by containing the current date time.
132 By default save directory is the current directory.
133 .TP
134 \fBload\fR \fIpath\fR
135 Load a temporary database archive.
136 Note that the currently temporary database is removed.
137 .TP
138 \fBglob\fR \fIglob\fR [\fIglob2\fR ...]
139 Evaluate port globs and show matched origins both for installed and uninstalled packages.
140 .TP
141 \fBoptions\fR
142 Show saved option settings and expected effects of option-resetting options \fB\-L\fR, \fB\-M\fR and \fB\-N\fR.
143 With \fB\-a\fR option, the first, second and third columns denote the option-resetting options, reset options and remaining options, respectively.
144 .TP
145 \fBreconf\fR \fIglob\fR [\fIglob2\fR ...]
146 Reconfigure port options for the specified ports and reset their information in the temporary database.
147 .TP
148 \fBforget\fR \fIglob\fR [\fIglob2\fR ...]
149 Try to let the temporary database forget about the specified ports as much as possible.
150 Concretely, the data on each of the specified ports and their requirements/dependents is unless initially installed or required by other preserved ports.
151 This command is mainly for removing information on ports which had been added due to \fB\-i\fR option or \fBneed add\fR command but have become unneeded again.
152 In advance to executing this command, deinstallation for the specified ports should be completed by \fBnoneed add\fR command followed by \fBredo\fR command.
153 It is noted that ports registered by \fBok\fR, \fBtaboo\fR and \fBnoneed\fR commands are NOT deleted.
154 Internal tables used for \fBshow\fR command keep their information regardless of this command.
155 .TP
156 \fBshow\fR [\fIsubject\fR] [@[\fBrun\fR|\fBbuild\fR|\fBall\fR][,[\fBdirect\fR|\fBfull\fR]]] [\fIarguments\fR]
157 Show the list of ports to be reinstalled.
158 The applied scope of dependencies can be controlled by "show option" proceeded by "@"; \fBrun\fR, \fBbuild\fR and \fBall\fR employ the run-time, build-time or both-time ones, respectively; \fBdirect\fR and \fBfull\fR include only the direct or fully recursive ones, respectively.
159 The default scope is determined by the saved option settings for \fB\-B\fR, \fB\-b\fR and \fB\-o\fR.
160 Some \fIsubject\fR's require \fIarguments\fR.
161 The following \fIsubject\fR's are available.
162 .RS 8
163 .TP
164 \fBtodo\fR
165 Ports to be reinstalled in the current do/redo process (default).
166 With \fB\-a\fR option, the first and second columns denote the origin and initial/new/current package name, respectively.
167 .TP
168 \fBdone\fR
169 Ports which have been already reinstalled to be up-to-date with their all requirements.
170 With \fB\-a\fR option, the first and second columns denote the origin and initial/new/current package name, respectively.
171 .TP
172 \fBresolved\fR
173 Manually reinstalled ports registered by \fBok\fR command.
174 With \fB\-a\fR option, the first and second columns denote the origin and initial/new/current package name, respectively.
175 .TP
176 \fBfailure\fR
177 Failed ports.
178 With \fB\-a\fR option, the first, second and third columns denote the origin, initial/new/current package name, failed make target and manually resolved status (yes or no), respectively.
179 .TP
180 \fBredo\fR
181 Ports to be reinstalled after success in any of their failed requirements.
182 With \fB\-a\fR option, the first and second columns denote the origin and initial/new/current package name, respectively.
183 .TP
184 \fBtaboo\fR
185 Taboo ports registered by \fBtaboo\fR command.
186 With \fB\-a\fR option, the first and second columns denote the origin and initial/new/current package name, respectively.
187 .TP
188 \fBneed\fR
189 Necessary ports registered by \fBneed\fR command.
190 With \fB\-a\fR option, the first and second columns denote the origin and initial/new/current package name, respectively.
191 .TP
192 \fBnoneed\fR
193 Unnecessary ports registered by \fBnoneed\fR command.
194 With \fB\-a\fR option, the first and second columns denote the origin and initial/new/current package name, respectively.
195 .TP
196 \fBrestored\fR
197 Leaf, obsolete or unneeded ports which had been once deleted but are to be or have been restored.
198 With \fB\-a\fR option, the first and second columns denote the origin and initial/new/current package name, respectively.
199 .TP
200 \fBdeleted\fR
201 Leaf, obsolete or unneeded ports are to be or have been deleted.
202 With \fB\-a\fR option, the first and second columns denote the origin and initial/new/current package name, respectively.
203 .TP
204 \fBconflict\fR
205 Conflicting ports which are temporarily deleted.
206 With \fB\-a\fR option, the first and second columns denote the origin and initial/new/current package name, respectively.
207 .TP
208 \fBrequirements\fR \fIglob1\fR [\fIglob2\fR ...]
209 Ports required by matching ports/packages.
210 With \fB\-a\fR option, the first, second, third and fourth columns denote the origin of the queried port, initial/new/current package name of the queried port, origin of a requirement of the queried port and initial/new/current package name of the requirement, respectively.
211 .TP
212 \fBdependents\fR \fIglob1\fR [\fIglob2\fR ...]
213 Ports depending on matching ports/packages.
214 With \fB\-a\fR option, the first, second, third and fourth columns denote the origin of the queried port, initial/new/current package name of the queried port, origin of a dependent of the queried port and initial/new/current package name of the dependent, respectively.
215 .TP
216 \fBinitrequirements\fR \fIglob1\fR [\fIglob2\fR ...]
217 Ports initially required by matching initially installed ports/packages.
218 With \fB\-a\fR option, the first, second, third and fourth columns denote the origin of the queried port, package name of the queried port, origin of a requirement of the queried port and package name of the requirement, respectively.
219 .TP
220 \fBinitdependents\fR \fIglob1\fR [\fIglob2\fR ...]
221 Ports initially depending on matching initially installed ports/packages.
222 With \fB\-a\fR option, the first, second, third and fourth columns denote the origin of the queried port, package name of the queried port, origin of a dependent of the queried port and package name of the dependent, respectively.
223 .RE
224 .SH OPTIONS
225 If duplicated or conflicting ones are set, the last ones are effective.
226 The end of options can be explicitly specified by \fB\-\-\fR.
227 Short options can be given in compact forms, for example, \fB\-i -q -P\fR to be \fB\-iqP\fR.
228 .PD
229 .TP
230 \fB*NOTE*\fR
231 The configuration of options annotated as "saved and transferred to restarted/following runs" are saved in the temporary database by the first run after cleaning the database.
232 In the following runs for any commands, the corresponding option settings are loaded from the saved configuration unless explicitly reset by \fB\-L\fR, \fB\-M\fR or \fB\-N\fR option.
233 The saved options can be checked by \fBportsreinstall options\fR command.
234 .PD
235 .SS Group 1: Just show messages and exit without operation
236 .IP \fB\-H\fR
237 .PD 0
238 .TP
239 \fB\-\-long\-help\fR
240 Show a long help whose content is the same as the manual page.
241 .PD
242 .IP \fB\-h\fR
243 .PD 0
244 .TP
245 \fB\-\-help\fR
246 .PD 0
247 .TP
248 \fB\-\-short\-help\fR
249 Show a short help.
250 .PD
251 .IP \fB\-V\fR
252 .PD 0
253 .TP
254 \fB\-\-show\-version\fR
255 Show the current version.
256 .PD
257 .SS Group 2: Effective anytime
258 .IP \fB\-a\fR
259 .PD 0
260 .TP
261 \fB\-\-batch\-mode\fR
262 Suppress messages so as to be friendly for batch operations.
263 The output formats for \fBoptions\fR and \fBshow\fR commands and \fB\-V\fR option are arranged to be more batch\-friendly.
264 It is noted that log output in build/installation processes are not suppressed.
265 .PD
266 .IP \fB\-i\fR
267 .PD 0
268 .TP
269 \fB\-\-allow\-new\-targets\fR
270 Allow \fB\-O\fR, \fB\-T\fR or \fB\-t\fR options to specify not\-yet\-installed ports.
271 If any of not\-yet\-installed ports matching the target globs are ambiguous, a dialog box is open for each of them to select the actual targets.
272 .PD
273 .IP \fB\-M\fR
274 .PD 0
275 .TP
276 \fB\-\-reset\-minor\-options\fR
277 Reset option settings for minor controls.
278 Option settings for group 4 are once reset and replaced with the newly specified ones.
279 Check the saved options by \fBportsreinstall options\fR command before specifying this option.
280 .PD
281 .SS Group 3: Effective only with redo command
282 .IP \fB\-L\fR
283 .PD 0
284 .TP
285 \fB\-\-reload\-conf\fR
286 Reload configuration files.
287 This option is effective only with \fBredo\fR command.
288 Option settings for group 6 are once reset and replaced with the newly specified ones.
289 Check the saved options by \fBportsreinstall options\fR command before specifying this option.
290 .PD
291 .IP \fB\-N\fR
292 .PD 0
293 .TP
294 \fB\-\-reset\-targets\fR
295 Re\-scan installed packages and reset option settings for target specification.
296 This option is effective only with \fBredo\fR command.
297 Option settings for group 5 are once reset and replaced with the newly specified ones.
298 Check the saved options by \fBportsreinstall options\fR command before specifying this option.
299 .PD
300 .SS Group 4: Saved and transferred to restarted runs, renewable by \-M option
301 Option settings in this group are saved at the first \fBdo\fR or \fBprepare\fR run, and transferred to the following runs.
302 Reset of the saved values for this group is available by appending \fB\-M\fR with newly specified options.
303 .IP \fB\-A\fR
304 .PD 0
305 .TP
306 \fB\-\-non\-interactive\-ports\-only\fR
307 Operations of (re)installation are made only on ports which do not require manual interaction.
308 This option conflicts with \fB\-I\fR.
309 .PD
310 .IP \fB\-B\fR
311 .PD 0
312 .TP
313 \fB\-\-exclude\-runtime\-dependencies\fR
314 Exclude run\-time dependencies in evaluation of dependencies.
315 This option affects behaviors of \fB\-t\fR, \fB\-T\fR and \fB\-q\fR options.
316 .PD
317 .IP \fB\-b\fR
318 .PD 0
319 .TP
320 \fB\-\-include\-buildtime\-dependencies\fR
321 Include build-time dependencies in evaluation of dependencies.
322 This option affects behaviors of \fB\-t\fR, \fB\-T\fR and \fB\-q\fR options.
323 .PD
324 .IP \fB\-C\fR
325 .PD 0
326 .TP
327 \fB\-\-apply\-default\-config\fR
328 The temporary database is built by skipping executing \fBmake config\fR and applying default port options if unconfigured.
329 .PD
330 .IP \fB\-c\fR
331 .PD 0
332 .TP
333 \fB\-\-suppress\-cleaning\-obsolete\-database\fR
334 Suppress cleaning the temporary database even if its obsolete.
335 This option suppresses the default behavior that the temporary database is automatically cleaned up if it is older than the ports tree or portsreinstall itself is to be upgraded.
336 Use of this option may cause unexpected results and basically unrecommended.
337 .PD
338 .IP \fB\-D\fR
339 .PD 0
340 .TP
341 \fB\-\-suppress\-entire\-inspection\-distinfo\fR
342 Suppress entire inspection of distinfo files in the ports tree as a preparation for deleting obsolete distfiles.
343 By default, viz., without this option, all distfiles are preserved unless being obsolete in the current version of the ports tree.
344 For this purpose, entire inspection of distinfo files in the ports tree is carried out in order to get the complete list of distfiles.
345 This inspection can take an extremely long time if the ports tree is located in file systems with low access speeds.
346 With this option specified, distfiles for ports are deleted unless they are initially installed, added due to \fB\-i\fR option, or required by any of the installed or added ports.
347 .PD
348 .IP \fB\-d\fR
349 .PD 0
350 .TP
351 \fB\-\-keep\-distfiles\fR
352 Do not clean up obsolete or unused distfiles.
353 .PD
354 .IP \fB\-G\fR
355 .PD 0
356 .TP
357 \fB\-\-use\-prebuilt\-package\fR
358 Use prebuilt packages for ports with the default configurations, i.e., that no part option is changed from the default, no knob (make environment variable or make argument) is defined, and no replacement or update is made to required ports.
359 The actual merit of this option depends on the service levels and qualities of the remote package sites; As of May, 2013, the official sites have provided legacy packages only for each release timing and pkgng packages for only three ports (ports-mgmt/pkg, ports-mgmt/poudriere and ports-mgmt/poudriere-devel); thus this option is useful for new installation and otherwise not so effective.
360 This option can be inconvenient for ports whose dependencies on other packages, files or other system-specific values are automatically arranged during the build or installation processes by detection outside of control by port options, knobs or ports replacement.
361 This problem can be resolved by configuring NOPKG_* section in ${LOCALBASE}/etc/portsreinstall.conf.
362 .PD
363 .IP \fB\-g\fR
364 .PD 0
365 .TP
366 \fB\-\-suppress\-pkgtools\-upadte\fR
367 Keep indispensable packages for the standard function of the ports/packages system untouched.
368 Concretely, this option suppresses upgrade, de/re-installation of the currently installed ports-mgmt/pkg and ports-mgmt/dialog4ports.
369 .PD
370 .IP \fB\-I\fR
371 .PD 0
372 .TP
373 \fB\-\-interactive\-ports\-only\fR
374 Operations of (re)installation are made only on ports which require manual interaction.
375 This option conflicts with \fB\-A\fR.
376 .PD
377 .IP \fB\-k\fR
378 .PD 0
379 .TP
380 \fB\-\-suppress\-self\-upadte\fR
381 Keep portsreinstall itself untouched.
382 This option suppresses upgrade, deinstallation and reinstallation of the currently installed portsreinstall.
383 .PD
384 .IP \fB\-l\fR
385 .PD 0
386 .TP
387 \fB\-use\-legacy\-package\-for\-missing\-pkgng\fR
388 If prebuilt pkgng packages are missing, use corresponding legacy ones instead and convert them to pkgng using \fBpkg2ng\fR.
389 This option is effective only when \fB\-G\fR option is enabled and pkgng is used for the current packages system.
390 .PD
391 .IP \fB\-n\fR
392 .PD 0
393 .TP
394 \fB\-\-dry\-run\fR
395 No operation is carried out (just for seeing what will be done).
396 This option is effective for \fBdo\fR and \fBredo\fR commands so that no deinstallation and (re)installation process is actually carried out.
397 By this option, ports/packages to be deinstalled or (re)installed can be confirmed without making changes to the current situation of packages.
398 .PD
399 .IP \fB\-q\fR
400 .PD 0
401 .TP
402 \fB\-\-skip\-unchanged\-ports\fR
403 Only new ports and their dependents are reinstalled.
404 This option is convenient when the all of the major version of the system and configurations of ports (options and knobs) are unchanged.
405 The behavior can be modified by \fB\-b\fR option.
406 .PD
407 .IP \fB\-s\fR
408 .PD 0
409 .TP
410 \fB\-\-avoid\-vulnerability\-check\fR
411 Build of vulnerable ports are avoided by triggering errors.
412 Note that already installed vulnerable packages are untouched.
413 If you desire to uninstall them, do it manually.
414 .PD
415 .IP \fB\-X\fR
416 .PD 0
417 .TP
418 \fB\-\-deselect\-all\fR
419 Automatically deselect all candidates for deinstallation of leaf or obsolete ports.
420 This option conflicts with \fB\-Y\fR option.
421 .PD
422 .IP \fB\-Y\fR
423 .PD 0
424 .TP
425 \fB\-\-select\-all\fR
426 Automatically select all candidates for deinstallation of leaf or obsolete ports.
427 This option conflicts with \fB\-X\fR option.
428 .PD
429 .SS Group 5: Saved and transferred to restarted runs, renewable by \-N option
430 Option settings in this group are saved at the first \fBdo\fR or \fBprepare\fR run, and transferred to the following runs.
431 Reset of the saved values for this group is available in the initial run of \fBredo\fR command by appending \fB\-N\fR with newly specified options.
432 .IP \fB\-O\fR\ \fIglob1\fR[\fB:\fIglob2\fR[\fB:\fR...]]
433 .PD 0
434 .TP
435 \fB\-\-target\-only\-itself=\fR\fIglob1\fR[\fB:\fIglob2\fR[\fB:\fR...]]
436 Restrict (re/de)installation within a scope consisting of the specified target ports and their missing build-time requirements.
437 Available ports matching the specified target globs are automatically registered as necessary ports equivalently to \fBportsreinstall need add\fR command.
438 Without \fB\-i\fR option, target ports must be already installed or inspected.
439 Without \fB\-o\fR option, the temporary database is maintained to have complete data on dependencies of all installed and necessary ports.
440 Combination with options \fB\-T\fR and \fB\-t\fR is available.
441 The behavior can be modified by \fB\-B\fR, \fB\-b\fR, \fB\-i\fR and \fB\-o\fR options.
442 .PD
443 .IP \fB\-o\fR
444 .PD 0
445 .TP
446 \fB\-\-only\-target\-scope\fR
447 Ignore ports which are outside of target scopes of \fB\-O\fR, \fB\-T\fR or \fB\-t\fR options.
448 Inspection of dependencies is made within the least-required scope for (re)installing the targets.
449 If given with \fB\-O\fR, targets themselves and their missing direct build-time requirements are in the scope.
450 If given with \fB\-T\fR, targets themselves, their direct requirements and their missing direct build-time requirements are in the scope.
451 If given with \fB\-t\fR, targets themselves, their already-inspected dependents and their missing direct build-time requirements are in the scope.
452 Ports outside of the scopes are kept untouched even if they are updated.
453 It is noted that this option disables detection and deinstallation of new leaf ports.
454 This option will be useful for quick upgrades or new installation (only) before complete construction of the temporary database for the all installed ports.
455 .PD
456 .IP \fB\-T\fR\ \fIglob1\fR[\fB:\fIglob2\fR[\fB:\fR...]]
457 .PD 0
458 .TP
459 \fB\-\-target\-and\-requirements=\fR\fIglob1\fR[\fB:\fIglob2\fR[\fB:\fR...]]
460 Restrict (re/de)installation within a scope consisting of the specified target ports, their requirements and their missing build-time requirements.
461 Available ports matching the specified target globs are automatically registered as necessary ports equivalently to \fBportsreinstall need add\fR command.
462 Without \fB\-i\fR option, target ports must be already installed or inspected.
463 Without \fB\-o\fR option, the temporary database is maintained to have complete data on dependencies of all installed and necessary ports.
464 Combination with options \fB\-T\fR and \fB\-t\fR is available.
465 The behavior can be modified by \fB\-B\fR, \fB\-b\fR, \fB\-i\fR and \fB\-o\fR options.
466 .PD
467 .IP \fB\-t\fR\ \fIglob1\fR[\fB:\fIglob2\fR[\fB:\fR...]]
468 .PD 0
469 .TP
470 \fB\-\-target\-and\-dependents=\fR\fIglob1\fR[\fB:\fIglob2\fR[\fB:\fR...]]
471 Restrict (re/de)installation within a scope consisting of the specified target ports, their dependents and their missing build-time requirements.
472 Available ports matching the specified target globs are automatically registered as necessary ports equivalently to \fBportsreinstall need add\fR command.
473 Without \fB\-i\fR option, target ports must be already installed or inspected.
474 Without \fB\-o\fR option, the temporary database is maintained to have complete data on dependencies of all installed and necessary ports.
475 Combination with options \fB\-T\fR and \fB\-t\fR is available.
476 The behavior can be modified by \fB\-B\fR, \fB\-b\fR, \fB\-i\fR and \fB\-o\fR options.
477 .PD
478 .SS Group 6: Saved and transferred to restarted runs, renewable by \-L option
479 Option settings in this group are saved at the first \fBdo\fR or \fBprepare\fR run, and transferred to the following runs.
480 Reset of the saved values for this group is available in the initial run of \fBredo\fR command by appending \fB\-L\fR with newly specified options.
481 .IP \fB\-P\fR
482 .PD 0
483 .TP
484 \fB\-\-load\-pkgtoolsconf\-as\-override\fR
485 Import settings from \fBpkgtools.conf\fR(5) as the secondary.
486 This option is effective only when ports-mgmt/portupgrade* is installed.
487 For duplicated configurations, values in portsreinstall.conf are applied first and then those in \fBpkgtools.conf\fR(5) are.
488 This option overrides preceding \fB\-p\fR option. 
489 .PD
490 .IP \fB\-p\fR
491 .PD 0
492 .TP
493 \fB\-\-load\-pkgtoolsconf\-as\-default\fR
494 Import settings from \fBpkgtools.conf\fR(5) as the primary (default).
495 This option is effective only when ports-mgmt/portupgrade* is installed.
496 For duplicated configurations, values in \fBpkgtools.conf\fR(5) are applied first and then those in portsreinstall.conf are.
497 This option overrides preceding \fB\-P\fR option. 
498 .PD
499 .IP \fB\-Q\fR
500 .PD 0
501 .TP
502 \fB\-\-ignore\-pkgtoolsconf\fR
503 Ignore \fBpkgtools.conf\fR(5) even if it exists.
504 .PD
505 .SH DETAILS
506 .SS Overview
507 This utility is a ports/packages management tool which upgrades packages to be as much as consistent regarding their dependencies by allowing repetitional retrials called "redo runs".
508 The implementation of this utility is designed for smart entire reinstallation of installed packages which takes a very long time.
509 A temporary database is used for managing the starting point, intermediate status and goal of the upgrade processes.
510 The starting point is determined by the initially installed packages.
511 The intermediate status contains various information on successes and failures of ports to judge the necessity of upgrade considering dependencies during \fBredo\fR runs.
512 The goal is determined by the ports tree, replacement to compatible ports and configurations for each port, i.e., port options configured by \fBmake config\fR and knobs (make environment variables and make arguments).
513 The temporary database is available until the ports tree is updated.
514 Each port is built for its (re)installation in principle, however, \fB\-G\fR option enables a function that use of prebuilt packages in remote servers are attempted for each port matching a condition that all configurations of the port and its requirements are unchanged from the default.
515 .PP
516 The algorithms of this utility are originally optimized for massive reinstallation to be invoked after major upgrade of the system where reinstallation of all third\-party applications is encouraged before cleaning up obsolete system libraries.
517 Nevertheless, the all functionalities of this utility is applicable to any situations where complete reinstallation is preferred for the whole or typical packages, e.g., when you have been lazy in upgrade of ports for a too long time.
518 .PP
519 In a standard case, the entire reinstallation will proceed in the following step:
520 .TP
521 1.
522 Update the ports tree and (in case of pkgng) the pkgng repository catalog;
523 .PD
524 .TP
525 2.
526 Clean up a temporary database which stores the all information used for the whole task of reinstallation (first \fBdo\fR or \fBprepare\fR run);
527 .PD
528 .TP
529 3.
530 Record the snapshot of the all installed packages as the initial point of reinstallation (first \fBdo\fR or \fBprepare\fR run);
531 .PD
532 .TP
533 4.
534 Build up the database to store data on configurations and dependencies (which may depend on the configurations) of the all (re/de)installing packages to be the latest version according to the current ports tree (\fBdo\fR or \fBprepare\fR run);
535 .PD
536 .TP
537 5.
538 Select obsolete packages or new leaf ports/packages to deinstall or exclude if any (\fBdo\fR or \fBprepare\fR run);
539 .PD
540 .TP
541 6.
542 Execute the actual (re/de)installation (\fBdo\fR run);
543 .PD
544 .TP
545 7.
546 If some ports failed, retry the (re/de)installation for the failed ones and their dependents (\fBredo\fR run);
547 .PD
548 .TP
549 8.
550 Make modification to the temporary database or manually re/de-install packages in concern (\fBok\fR, \fBtaboo\fR, \fBnoneed\fR, etc.).
551 .PD
552 .TP
553 9.
554 Repeat from 6 to 7 until the all available ports succeed.
555 .PD
556 .PP
557 A typical instance of actually executed commands for upgrading packages will be in the following flow:
558 .TP
559 1.
560 .B portsnap fetch update
561 .PD
562 .TP
563 2.
564 .B pkg update
565 .RS
566 (In case of pkgng)
567 .RE
568 .PD
569 .TP
570 3.
571 .B portsreinstall \-q prepare
572 .RS
573 (This must be done outside of \fBscript\fR(1) or \fBnohup\fR(1) environment because of incompatibility of automated port options configurations with \fBdialog4ports\fR(1) internally invoked by \fBmake config\fR)
574 .RE
575 .PD
576 .TP
577 4.
578 .B script
579 .RS
580 (Enter \fBscript\fR(1) environment for logging)
581 .RE
582 .PD
583 .TP
584 5.
585 .B portsreinstall
586 .RS
587 (Possibly end up with some failed ports)
588 .RE
589 .PD
590 .TP
591 6.
592 .B portsreinstall redo
593 .RS
594 (Possibly end up with some failed ports)
595 .RE
596 .PD
597 .TP
598 7.
599  ... Countermeasure to failures ...
600 .PD
601 .TP
602 8.
603 .B portsreinstall redo
604 .RS
605 (Possibly end up with some failed ports)
606 .RE
607 .PD
608 .TP
609 9.
610  ... Repetition from 7 to 8 ...
611 .PD
612 .TP
613 10.
614 .B portsreinstall redo
615 .RS
616 (All available ports succeed)
617 .RE
618 .PD
619 .PP
620 Here, in case of entire reinstallation after a major version upgrade of the operating system, \fB\-q\fR option should be removed.
621 It is usually encouraged to execute the command on \fBscript\fR(1) in order to record the make outputs for catching reasons of failures if any.
622 In many cases, the user may undergo failures in build or installation of some ports during do/redo runs.
623 Refer to subsections entitled "Workaround for failed ports: ..." for the techniques and procedures to resolve the problems.
624 .PP
625 This utility is implemented to be flexible and robust about interrupt/restart operations so as to allow the users to run only when the machine is free and terminate when it becomes busy on demand.
626 Concretely, the users can stop the process by CTRL+C (or even by unexpected termination) and restart from the stopped point at any stage throughout the whole task, i.e., from the beginning of preparation of the temporary database to the end of (re/de)installation.
627 This functionality allows the users, for example, to start this utility before lunch, terminate after lunch, restart before dinner, terminate after dinner, restart before going to bed, terminate after breakfast, restart before lunch, ..., and finally complete.
628 .PP
629 Compatibility with \fBportupgrade\fR(1) is well considered if it is installed; settings in \fBpkgtools.conf\fR(5) are reflected and the portupgrade database is updated at the end of each do/redo run.
630 The main difference of this utility with \fBportupgrade\fR(1) or \fBportmaster\fR(8) is that this utility is optimized for on\-the\-fly entire upgrade of the packages environment to be as complete as possible while the latter are for partial upgrade to get the latest versions available as quickly as possible by applying the least "patches" to the environment.
631 While this utility also has options for partial upgrade (\fB\-t\fR, \fB\-T\fR and \fB\-O\fR), they are intended as auxiliary modification of (re)installing packages.
632 This utility resolves conflicts between old and new packages automatically by referring to CONFLICTS, CONFLICTS_BUILD and CONFLICTS_INSTALL defined for each port or by redo processes for ports missing appropriate definition of them.
633 Many of the UPDATING advisories on trouble shooting in packages upgrade will be unnecessary to follow if the users use this utility instead of \fBportupgrade\fR(1) or \fBportmaster\fR(8).
634 .PP
635 If this utility has been installed by ports/packages and the corresponding port is renewed, upgrade of this utility is carried out first and then the following processes are continued by the new version after cleaning up the temporary database.
636 .PP
637 New leaf ports (primary leaves) and their exclusive requirements (secondary leaves) are automatically detected.
638 The user may specify unneeded ports explicitly by \fBportsreinstall noneed\fR command so that the specified ports are added to the new leaves if they have no non-leaf dependents.
639 If any leaf ports are detected, the user is prompted to select ones to delete by dialog.
640 Similarly, obsolete ports to delete are also selectable by dialog.
641 Here, both for leaf and obsolete ports, the selection can be modified afterward and unselected ones can be restored by following redo runs.
642 .PP
643 The scheme of this utility is divided into stages of temporary database construction and actual (re/de)installation.
644 Execution by
645 .B portsreinstall prepare
646 procedes to the end the first stage, and that without any argument procedes to the end of the second stage.
647 Each of these two major stages is divided into minor stages.
648 When a previously terminated process is restarted, completed minor stages are skipped.
649 Changes of the configurations made or notified by corresponding options or commands of this utility are reflected to the database by automatically re-executing the concerned stages in the following do/redo runs.
650 .PP
651 When option(s) \fB\-O\fR, \fB\-t\fR or \fB\-T\fR is/are specified, only the targets and their requirements or dependents within the specified scope are inspected and (re/de)installed.
652 Inspected data on the ports are preserved in the temporary database and reused in the following runs even if the targets are reset or changed with aid of \fB\-N\fR option.
653 The preserved data are basically harmless even if the corresponding ports are out of scope of new targets unless conflicts arise.
654 .SS New installation of ports: case 1
655 If the user has not executed this utility for entire reinstallation/upgrade never or after the final clean up of the temporary database,
656 .RS
657 .B portsreinstall -i -Glq -oO
658 .I globs
659 .RE
660 will be a quick way to install new packages matching glob patters \fIglobs\fR (here the options are separated into each group just for easy understanding).
661 More automated operation is possible by appending \fB\-C\fR and \fB\-Y\fR options so as to skip all dialog queries by letting all configurations default.
662 .SS New installation of ports: case 2
663 If the user already has a complete temporary database by executing entire reinstallation/upgrade,
664 .RS
665 .B portsreinstall need add
666 .I globs
667 .RE
668 followed by
669 .RS
670 .B portsreinstall -MGlq -N redo
671 .RE
672 will be a quick and smart way to install new packages matching glob patters \fIglobs\fR.
673 More automated operation is possible by appending \fB\-C\fR and \fB\-Y\fR options so as to skip all dialog queries by letting all configurations default.
674 .SS Deinstallation and restoration of leaf and obsolete ports
675 If any new leaf ports and obsolete (lost) ports are detected, dialogs are displayed for selecting which ports/packages to delete.
676 Here it is noted that detection and operations on new leaf ports are invalidated when the temporary database is incomplete due to \fB\-o\fR option.
677 Deinstallation and restoration of the packages are carried out after reinstallation of the all ports are attempted.
678 The selected packages are backed up before deinstallation.
679 .PP
680 The selection can be modified by executing
681 .RS
682 .B portsreinstall reselect leaves
683 .RE
684 for new leaf ports, and
685 .RS
686 .B portsreinstall reselect obsolete
687 .RE
688 for obsolete ports.
689 .PP
690 Then following execution of
691 .RS
692 .B portsreinstall
693 .RE
694 deinstalls newly selected packages and restores unselected ones.
695 .SS Workaround for failed ports: conflicts: case 1
696 This utility automatically resolves conflicts between ports/packages by temporary deinstallation during concerned build or installation processes according to CONFLICTS, CONFLICTS_BUILD and CONFLICTS_INSTALL defined by each port.
697 This means that ports lacking proper CONFLICTS, CONFLICTS_BUILD and CONFLICTS_INSTALL definitions may undergo failures.
698 Some of the undeclared conflicts may be resolved by simple redo runs.
699 .PP
700 Some problems may be due to coexistence of the same or related software of different versions of the requirements or the unsuccessful ports themselves.
701 For analysis of the upgraded and initial requirements,
702 .RS
703 \fBportsreinstall show requirements @all,direct \fR \fIglob\fR
704 .RE
705 and
706 .RS
707 \fBportsreinstall show initrequirements @all,direct\fR \fIglob\fR
708 .RE
709 can be used, respectively, where \fIglob\fR denotes a glob specifying the unsuccessful ports.
710 For analysis of ports for the same software of different versions,
711 .RS
712 \fBportsreinstall glob\fR \fIglob_req\fR
713 .RE
714 can be used, where \fIglob_req\fR denotes a glob specifying the suspicious requirements.
715 .PP
716 If a conflict is found, first back up and delete the conflict (whose package name is \fIpackage_conflict\fR) and the unsuccessful port (whose package name is \fIpackage_failed\fR) as
717 .RS
718 .B pkg_create \-b
719 .I package_conflict
720 .RE
721 .RS
722 .B pkg_create \-b
723 .I package_failed
724 .RE
725 .RS
726 .B pkg_delete \-f
727 .I package_conflict
728 .I package_failed
729 .RE
730 in case if the legacy packages, or
731 .RS
732 .B pkg create
733 .I package_conflict
734 .I package_failed
735 .RE
736 .RS
737 .B pkg delete \-f
738 .I package_conflict
739 .I package_failed
740 .RE
741 in case if pkgng.
742 Here it is noted that the backup package archive is created in the current directory.
743 .PP
744 Then try
745 .RS
746 \fBmake \-C\fR /usr/ports/\fIorigin\fR clean
747 .RE
748 .RS
749 \fBmake \-C\fR /usr/ports/\fIorigin\fR reinstall
750 .RE
751 for the unsuccessful port whose origin is \fIorigin\fR.
752 .PP
753 If the installation is successful, execute
754 .B portsreinstall ok add
755 .I origin
756 so as to register the port to be "resolved".
757 .PP
758 Next clean up the work directory by
759 .RS
760 \fBmake \-C\fR /usr/ports/\fIorigin\fR clean
761 .RE
762 and try to restore the conflicts by
763 .RS
764 \fBpkg_add \-ifF\fR ./\fIpackage_conflict\fR.tbz
765 .RE
766 in case if the legacy packages, or
767 .RS
768 \fBpkg add\fR ./\fIpackage_conflict\fR.txz
769 .RE
770 in case if pkgng.
771 Here it is noted that the suffix of the pkgng packages may be different from the default (.txz).
772 The restoration process may fail if some file locations conflict with the reinstalled port.
773 In this case, leaving this situation temporarily and continue to the next step.
774 .PP
775 Then execute
776 .RS
777 .B portsreinstall redo
778 .RE
779 for completing (re)installation of the dependents of the resolved port.
780 The unsuccessful restoration, if any, may be resolved by this process.
781 If any conflicts still remain unresolved, refer to case 2.
782 .SS Workaround for failed ports: conflicts: case 2
783 If some upgraded ports fundamentally conflict with each other, the output log of this utility for do/redo processes will report a message entitled "The following ports are temporarily deleted due to conflicts".
784 In this case, although not always encouraged, the user may consider replacement of the conflicting ones with one of them by assuming and expecting compatibility between them.
785 .PP
786 This workaround can be done by the following procedure.
787 First edit the configuration file ${LOCALBASE}/etc/portsreinstall.conf so as to define the corresponding REPLACE_* values.
788 If \fBportupgrade\fR(1) is installed, the corresponding configuration should be made in ALT_PKGDEP section of \fBpkgtools.conf\fR(5).
789 .PP
790 Then execute
791 .RS
792 .B portsreinstall -L redo
793 .RE
794 .RS
795 (Recover options reset by \fB\-L\fR if any by checking with the aid of \fBportsreinstall options\fR.)
796 .RE
797 for (re)installation of the concerned port by reflecting the configuration changes.
798 .SS Workaround for failed ports: conflicts: case 3
799 If some conflicts are found to be unnecessary, they can be removed in the following way.
800 The unnecessary ports are registered by executing
801 .RS
802 .B portsreinstall noneed add
803 .I globs_unnecessary
804 .RE
805 where \fIglobs_unnecessary\fR denotes globs specifying the unnecessary ports.
806 .PP
807 Next execute
808 .RS
809 .B portsreinstall show dependents @run,full
810 .I globs_unnecessary
811 .RE
812 for checking whether any dependents seem unnecessary for the user.
813 Next execute
814 .RS
815 .B portsreinstall noneed add
816 .I globs_unnecessary_dependents
817 .RE
818 to register them, where \fIglobs_unnecessary_dependents\fR denotes globs specifying the unnecessary dependents.
819 .PP
820 Then execute
821 .RS
822 .B portsreinstall
823 .RE
824 .RS
825 (If it seems effective, reconfigure options for \fB\-B\fR, \fB\-b\fR and \fB\-o\fR by using \fB\-M\fR and \fB\-N\fR.)
826 .RE
827 for automatic evaluation and deinstallation of new leaf ports redefined by the new unnecessary ports.
828 If the registered ports are required by any non-leaf or non-unnecessary ports, this process will end up with no practical progress.
829 .SS Workaround for failed ports: reconfiguration of port options
830 .PP
831 If the problems may be resolved by reconfiguration of the port options, execute
832 .B portsreinstall reconf 
833 .I glob
834 which invokes the dialog for reselecting options.
835 Here \fIglob\fR denotes a glob specifying the concerned port.
836 .PP
837 If any change was made here, execute
838 .RS
839 .B portsreinstall
840 .RE
841 for retrial of (re)installation.
842 .SS Workaround for failed ports: reconfiguration of knobs
843 If the problems may be resolved by reconfiguration of the knobs, first edit the configuration file ${LOCALBASE}/etc/portsreinstall.conf so as to redefine the corresponding MARG_*, MENV_*, BEFOREBUILD_*, BEFOREDEINSTALL_* or AFTERINSTALL_* values.
844 If \fBportupgrade\fR(1) is installed, the corresponding configuration should be made in MAKE_ARGS, MAKE_ENV, BEFOREBUILD, BEFOREDEINSTALL or AFTERINSTALL section of \fBpkgtools.conf\fR(5).
845 .PP
846 Then execute
847 .RS
848 .B portsreinstall -L redo
849 .RE
850 .RS
851 (Recover options reset by \fB\-L\fR if any by checking with the aid of \fBportsreinstall options\fR.)
852 .RE
853 for (re)installation of the concerned port by reflecting the configuration changes.
854 .SH "ENVIRONMENT VARIABLES"
855 The following environment variables can be used to change the behavior of \fBportsreinstall\fR.
856 Some of them are the same as defined in \fBports\fR(7).
857 Usually they should be kept to be the system default or empty.
858 The configuration file (${LOCALBASE}/etc/portsreinstall.conf) takes priority over environment variables.
859 .TP
860 .B LOCALBASE
861 Where to install files of native applications.
862 The default is /usr/local.
863 .TP
864 .B LINUXBASE
865 Where to install files of Linux applications.
866 The default is /compat/linux.
867 .TP
868 .B PREFIX
869 Where to install things in general.
870 The default value is defined for each port; it is usually ${LOCALBASE} for most native applications and ${LINUXBASE} for Linux applications.
871 However, some ports customize it to their own defaults, e.g., ${LOCALBASE}/kde4 for KDE4-related ones.
872 Therefore, it is safer to keep this variable undefined by the user so as to define it automatically although traditionally this variable has been used for controlling installation paths by users.
873 .TP
874 .B PORT_DBDIR
875 Where to store port option values.
876 The default is /var/db/ports.
877 .TP
878 .B PORTSDIR
879 Location of the ports tree.
880 The default is /usr/ports.
881 .TP
882 .B DISTDIR
883 Where to store distfiles.
884 The default is ${PORTSDIR}/distfiles.
885 .TP
886 .B PACKAGES
887 Where to store package archives.
888 The default is ${PORTSDIR}/packages.
889 .TP
890 .B PKGREPOSITORYSUBDIR
891 Subdirectory under ${PACKAGES} to store substances of package archives.
892 The default is "All".
893 .TP
894 .B PKGREPOSITORY
895 Where to store substances of package archives.
896 The default is ${PACKAGES}/${PKGREPOSITORYSUBDIR}.
897 .TP
898 .B PKG_PATH
899 Overriding Synonym to PKGREPOSITORY for compatibility with \fBpkgtools.conf\fR(5).
900 .TP
901 .B PACKAGECHECKSUMROOTS
902 Roots of available sites for legacy package check sum to be randomly selected.
903 Each site is separated by "|" (vertical bar).
904 The default consists of ftp://ftp.FreeBSD.org/ and from ftp://ftp1.FreeBSD.org/ to ftp://ftp14.FreeBSD.org/.
905 .TP
906 .B PACKAGECHECKSUMDIR
907 Subdirectory pattern of legacy package check sum sites.
908 The first and second \fI%s\fR are substituted with the platform and version of OS, respectively.
909 The default is pub/FreeBSD/ports/%s/packages-%s/All/.
910 .TP
911 .B PACKAGEROOTS
912 Roots of available legacy package sites to be randomly selected.
913 Each site is separated by "|" (vertical bar).
914 The default is ${PACKAGECHECKSUMROOTS}, but it is relatively secure to be different from it.
915 .TP
916 .B PACKAGEDIR
917 Subdirectory pattern of legacy package sites.
918 The first and second \fI%s\fR are substituted with the platform and version of OS, respectively.
919 The default is ${PACKAGECHECKSUMDIR}.
920 .SH FILES/DIRECTORIES
921 The following files and directories are referred to.
922 .TP
923 ${LOCALBASE}/etc/portsreinstall.conf
924 Configuration file.
925 .TP
926 /var/tmp/portsreinstall.db
927 Temporal database directory.
928 The whole contents can be saved by \fBportsreinstall save\fR command.
929 .TP
930 ${LOCALBASE}/etc/pkgtools.conf
931 Configuration file of \fBportupgrade\fR(1).
932 .SH HISTORY
933 \fBportsreinstall\fR has been developed as below.
934 .TP
935 3.0.0 (? May 2013)
936 [NEW] Options of \fB-a\fR, \fB-A\fR, \fB-b\fR, \fB-B\fR, \fB-C\fR, \fB-D\fR, \fB-g\fR, \fB-G\fR, \fB-i\fR, \fB-I\fR, \fB-l\fR, \fB-L\fR, \fB-M\fR, \fB-n\fR, \fB-o\fR, \fB-O\fR, \fB-X\fR and \fB-Y\fR are added (\fB-X\fR was redefined as a different function).
937
938 [NEW] Long options are supported.
939
940 [NEW] Commands \fBneed\fR, \fBnoneed\fR, \fBreset\fR, \fBforget\fR, \fBreselect\fR, \fBglob\fR, \fBreconf\fR, \fBoptions\fR, \fBshow need\fR, \fBshow noneed\fR \fBshow restored\fR and \fBshow conflict\fR are added.
941
942 [NEW] (Re)installation by prebuilt packages for ports with default configurations is implemented.
943
944 [NEW] Controlling the dependency scope for \fBshow\fR command becomes available. 
945
946 [NEW] Commands of \fBdo\fR, \fBprepare\fR and \fBredo\fR are rearranged with \fBdo\fR and \fBredo\fR with an optional mode either of \fBprepare\fR or \fBall\fR so that the default and synonyms are compatible with the earlier versions.
947
948 [CHANGED] The function of \fBshow redo\fR is replaced with that of former \fBshow pending\fR, and \fBshow pending\fR is abandoned in exchange.
949
950 [CHANGED] Deinstallation of moved or obsolete packages becomes selectable by run\-time dialog.
951
952 [CHANGED] Deinstallation and ignorance of leaf ports becomes available via selection by run\-time dialog.
953
954 [CHANGED] The directory for saving packages of obsolete or removed leaf ports are changed to $PACKAGES/All whose default is /usr/ports/packages/All.
955
956 [CHANGED] The deinstallation process for unused packages which have been done before reinstallation is changed to be done after it.
957
958 [CHANGED] Compact forms of options is made to be accepted, e.g., \fB-b \-t \-o\fR as \fB\-bto\fR.
959
960 [CHANGED] The behaviors of \fB-q\fR, \fB\-t\fR and \fB\-T\fR options are changed to ignore build-time-only dependencies. The former function is reproduced with \fB-b\fR option. The document for \fB\-t\fR and \fB\-T\fR options are revised so as to correct wrong descriptions that they could newly install the specified ports.
961
962 [CHANGED] Syntax of \fB-t\fR and \fB\-T\fR options are changed so as to give all port globs by a single argument value as concatenation with colons as delimiters. Along this change, \fB-r\fR and \fB\-R\fR options are abandoned.
963
964 [CHANGED] Old options of \fB-x\fR and \fB\-X\fR are abandoned due to duplication with \fBtaboo add\fR command.
965
966 [CHANGED] Rules for transferring option settings to restarted runs are changed so as to let the all options renewable.
967
968 [CHANGED] Glob evaluation algorithm is changed to be fully original.
969
970 [CHANGED] The long help is unified with this manual page.
971
972 [IMPROVED] A change is made so as to carry out upgrade of ports-mgmt/pkg in advanced to everything in case of pkgng and as to ignore dependencies on ports-mgmt/pkg.
973
974 [IMPROVED] The treatment of backup packages is modified to be safer by considering possible format fluctuation in case of pkgng.
975
976 [IMPROVED] The evaluation algorithm of glob patters is improved.
977
978 [IMPROVED] Automatic solution to conflicts in (re)installation is implemented.
979
980 [MISC] Line feeds of the help and information messages are improved.
981
982 [BUG FIX] Meaningless warnings at the end of leaf ports are suppressed.
983
984 [BUG FIX] Inappropriate operations could have been attempted on the temporary database by non-superuser privilege.
985
986 [BUG FIX] Tarballs for ports which depend on other ports could have been lost in the step of cleaning distfiles.
987
988 [BUG FIX] Self-upgrade was carried out even for commands other than do or prepare.
989 .TP
990 2.2.2 (03 January 2013)
991 [BUG FIX] Commands \fBok add\fR and \fBok del\fR failed if no port has reinstalled in the latest do/redo process.
992
993 [BUG FIX] Makefile was problematic if ${LOCALBASE}/etc/portsreinstall.conf does not exist before installation.
994 .TP
995 2.2.1 (25 December 2012)
996 [CHANGED] Command \fBshow todo_next\fR is renamed to \fBshow pending\fR.
997
998 [IMPROVED] Changes are made so as to avoid retrying for dependents of failed ports when no problem has resolved.
999
1000 [BUG FIX] Removed a remained debugging code in the action for \fBsave\fR command.
1001 .TP
1002 2.2.0 (17 December 2012)
1003 [NEW] Command of \fBshow todo_next\fR is added.
1004
1005 [CHANGED] Changes are made so as to skip wasteful reinstallation where the target port is already reinstalled once (with \fB\-q\fR option, when its version is up-to-date) and no change has been made for either of its requirements afterwards.
1006
1007 [CHANGED] The default settings in portsreinstall.conf was changed so as to include a HOLD pattern for bsdpan.
1008
1009 [BUG FIX] There was a problem in evaluating glob patterns expressing origins.
1010
1011 [BUG FIX] Minor inappropriate messages and actions emerged when the target and replacement of ports substitution become the same.
1012
1013 [BUG FIX] The help messages and this manual page lacked the descriptions about \fBshow redo\fR command.
1014 .TP
1015 2.1.0 (10 December 2012)
1016 [NEW] New generation package (pkgng) is supported.
1017
1018 [IMPROVED] A countermeasure for a build failure in a restarted build from a terminated build is implemented.
1019
1020 [BUG FIX] Restoration of backup packages after failed installation was not working correctly.
1021
1022 [BUG FIX] The transferring mechanism of option values to restarted run was broken.
1023
1024 [BUG FIX] Error end in case that no packages are installed is fixed.
1025
1026 [BUG FIX] A glob evaluation routine used when \fBports_glob\fR(1) is not installed was broken.
1027 .TP
1028 2.0.0 (12 August 2012)
1029 [NEW] Options \fB\-X\fR, \fB\-r\fR and \fB\-R\fR are added so as to compensate a fact that \fB\-x\fR, \fB\-t\fR and \fB\-T\fR cannot specify package names with commas.
1030
1031 [NEW] Commands of \fBshow requirements\fR and  \fBshow dependents\fR are added.
1032
1033 [NEW] A functionality of self-upgrade is added so as to be carried out first if the port of portsreinstall is new.
1034
1035 [NEW] Option \fB\-k\fR is added for cases that upgrade of portsreinstall should be avoided.
1036
1037 [IMPROVED] Messages are extended to output configuration parameter values.
1038
1039 [CHANGED] Functionalities of options \fB\-t\fR and \fB\-T\fR are changed so as to prevent deinstallation of irrelevant packages and detect obsolete installed dependencies.
1040
1041 [CHANGED] Use of commas as delimiters in \fBok\fR and \fBtaboo\fR commands is abolished.
1042
1043 [CHANGED] The specification of \fBshow\fR command is changed to exclude irrelevant packages/ports and output messages about the matching targets when options \fB\-r\fR, \fB\-R\fR, \fB\-t\fR and \fB\-T\fR are enabled.
1044
1045 [CHANGED] The default behavior in case that the temporary database is older than the ports tree is changed from warnings to automatic reconstruction; the old behavior is recovered by option \fB\-c\fR.
1046
1047 [BUG FIX] Termination message is corrected (portsreinstall ok => portsreinstall ok add).
1048
1049 [BUG FIX] Values of BEFOREBUILD, BEFOREDEINSTALL and AFTERINSTALL were not correctly imported from \fBpkgtools.conf\fR(5).
1050
1051 [BUG FIX] The file name given by save command was with a wrong time stamp.
1052 .TP
1053 1.1.0 (28 April 2012)
1054 [NEW] Command of show deleted is newly added.
1055
1056 [CHANGED] Origin names in messages and results of show command are changed to be accompanied with package names.
1057
1058 [CHANGED] The default option for treating \fBpkgtools.conf\fR(5) is changed to \fB\-p\fR and \fB\-Q\fR is newly added.
1059
1060 [IMPROVED] Custom make environment variables and arguments are changed to be reflected in the stage of inspection of dependencies.
1061
1062 [IMPROVED] Command of show todo is now available before starting reinstallation.
1063
1064 [BUG FIX] Independence from ports\-mgmt/portupgrade* was incomplete.
1065
1066 [BUG FIX] Error messages for show command when the temporary database does not exist are improved.
1067
1068 [BUG FIX] Ports with names contaning '+' were not correctly treated.
1069
1070 [BUG FIX] Save and load commands were broken.
1071
1072 [BUG FIX] Deletion of MOVED-back packages is now prevented.
1073 .TP
1074 1.0.0 (14 March 2012)
1075 [MISC] Explanations for \fB\-p\fR and \fB\-P\fR are revised because the previous ones were somewhat confusing.
1076
1077 [MISC] The output device of helps is changed from stderr to stdout.
1078
1079 [MISC] Messages for termination during deinstallation and reinstallation are improved by showing the target port/package names at that time.
1080
1081 [BUG FIX] Glob patterns for package/port names were not fully supported.
1082
1083 [BUG FIX] Values of MARG_* and MENV_* (MAKE_ARGS and MAKE_ENV in \fBpkgtools.conf\fR(5)) were not working.
1084
1085 [BUG FIX] Globs of obsolete packages were not detected, so especially HOLD_PKGS and IGNORE_MOVED in \fBpkgtools.conf\fR(5) and portsreinstall.conf had lost their functionalities.
1086
1087 [BUG FIX] Values of IGNORE_MOVED partially overwrote HOLD_PKGS in \fBpkgtools.conf\fR(5).
1088
1089 [BUG FIX] Typographic and grammatical errors in the main script and documents are revised.
1090 .TP
1091 0.13.1 (29 October 2011)
1092 [BUG FIX] Inspection of missing ports was incomplete.
1093
1094 [BUG FIX] Origin names with '+' were not correctly treated.
1095
1096 [IMPROVED] Inspection of dependencies of installed packages gets faster.
1097 .TP
1098 0.13.0 (28 August 2011)
1099 [IMPROVED] Phase of "Order the ports considering dependencies" is accelerated.
1100 .TP
1101 0.12.0 (22 June 2011)
1102 [NEW] \fB\-q\fR, \fB\-d\fR and \fB\-N\fR options are added.
1103
1104 [CHANGED] Settings for \fB\-x\fR and \fB\-s\fR options becomes to be transferred to restarted runs.
1105 .TP
1106 0.11.0 (17 May 2011)
1107 [NEW] Causes of errors are added to the report of failed ports.
1108
1109 [CHANGED] Functionality of \fB\-t\fR option is changed and partly splitted into \fB\-T\fR.
1110
1111 [IMPROVED] Refetch after fetch failure becomes smarter so as not to clean up distfiles.
1112
1113 [MISC] Terminology 'abort' is corrected to be 'terminate'.
1114 .TP
1115 0.10.0 (11 Mar 2011)
1116 [NEW] Version check for temporary database and portupgrade is added (as a template).
1117
1118 [BUG FIX] Old packages for ports whose package names was renamed were not deleted.
1119
1120 [BUG FIX] Duplicated cleans were executed after successful installation.
1121 .TP
1122 0.9.8 (02 Mar 2011)
1123 [MISC] Installation methods of non-executable files in Makefile are improved again.
1124 .TP
1125 0.9.7 (02 Mar 2011)
1126 [MISC] Installation methods of non-executable files in Makefile are improved.
1127 .TP
1128 0.9.6 (01 Mar 2011)
1129 [BUG FIX] Fix at version 0.9.5 was incomplete.
1130
1131 [BUG FIX] The release date of 0.9.5 was wrong in the manpage.
1132 .TP
1133 0.9.5 (28 Feb 2011)
1134 [BUG FIX] "install" target in Makefile installed non-executable files as executables.
1135 .TP
1136 0.9.4 (17 Jan 2011)
1137 [BUG FIX] "all" target in Makefile was missing.
1138 .TP
1139 0.9.3 (16 Jan 2011)
1140 [MISC] Makefile is modified to compress manpage in the build process.
1141 .TP
1142 0.9.2 (10 Jan 2011)
1143 [MISC] The 2-Clause BSD License is applied from this version.
1144
1145 [NEW] Manpage is created.
1146
1147 [NEW] Makefile for installation/uninstallation is added.
1148
1149 [BUG FIX] Recovery from distfile checksum error was broken.
1150 .TP
1151 0.9.1 (27 Dec 2010)     
1152 [BUG FIX] Wrong warning for \fB-p\fR/\fB-P\fR options in the first run.
1153
1154 [BUG FIX] Broken support of recursive chase of MOVED ports.
1155
1156 [BUG FIX] Option configuration menus were not accessable.
1157
1158 [BUG FIX] The mechanism of loading the configuration file was broken.
1159
1160 [BUG FIX] Optionally added taboo ports were not always effective in restart.
1161 .TP
1162 0.9.0 (21 Nov 2010)
1163 First version.
1164 .SH APPENDIX: Conditions determining the package system (general specification of FreeBSD Ports/Packages)
1165 The current package system is automatically detected according to the OS version whose serial number is obtained by
1166 .RS
1167 .B sysctl -n kern.osreldate
1168 .RE
1169 and the configuration of /etc/make.conf.
1170 Pkgng is supported for systems with serial numbers of 800505 (just before 8.1-RELEASE) or later.
1171 For systems of 1000017 (10-CURRENT) or later, Pkgng is the default.
1172 .PP
1173 In order to choose pkgng in systems from 800505 (just before 8.1-RELEASE) to just before 1000017 (10-CURRENT), put
1174 .RS
1175 .B WITH_PKGNG=yes
1176 .RE
1177 in /etc/make.conf.
1178
1179 In order to choose the legacy one in systems of 1000017 (10-CURRENT) or later, put
1180 .RS
1181 .B WITHOUT_PKGNG=yes
1182 .RE
1183 in /etc/make.conf.
1184 .PP
1185 .SH "SEE ALSO"
1186 \fBpkg_add\fR(1),
1187 \fBpkg_create\fR(1),
1188 \fBpkg_delete\fR(1),
1189 \fBpkg_glob\fR(1),
1190 \fBportupgrade\fR(1),
1191 \fBportsdb\fR(1),
1192 \fBports_glob\fR(1),
1193 \fBpkgtools.conf\fR(5),
1194 \fBports\fR(7),
1195 \fBpkg-add\fR(8),
1196 \fBpkg-create\fR(8),
1197 \fBpkg-delete\fR(8),
1198 \fBportmaster\fR(8)
1199 .SH COPYRIGHT
1200 This software is distributed under the 2-Clause BSD License.
1201 .PP
1202 (C)\ 2010\-2013\ Mamoru\ Sakaue,\ MwGhennndo,\ All\ Rights\ Reserved.
1203 .PP
1204 Email:\ sakaue.mamoru@samurai.mwghennn.net
1205 .PP
1206 Homepage:\ http://www.mwghennndo.com/softwares/portsreinstall/