portsreinstall man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

PORTSREINSTALL(8)	FreeBSD System Manager's Manual	     PORTSREINSTALL(8)

NAME
       portsreinstall - ports upgrading utility for massive forced reinstalla‐
       tion

SYNOPSIS
       portsreinstall [ OPTIONS ] [ -- ] [ command ]

DESCRIPTION
       This utility is an alternative to portupgrade(1) and portmaster(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 pack‐
       ages.

NOTATIONS
	A glob is an extended regular expression or a shell-type glob  pattern
       matching either of a unique name, package names or port origins.
	The  glob  syntax is compatible with portupgrade(1) and its accompani‐
       ments such as portsdb(1), pkg_glob(1) and ports_glob(1).
	If a glob starts with a colon ":", the following string is  parsed  as
       an extended regular expression, and otherwise a shell-type glob.
	A shell-type glob is evaluated by matching an asterisk "*" to an arbi‐
       trary string of an arbitrary length, a question mark "?"	 to  an	 arbi‐
       trary  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 charac‐
       ters.
	Here, the evaluation of the bracket is actually done by passing it  to
       an  extended regular expression by simply converting the prefix "[!" to
       "[^".
	A glob is recognized as a unique name (package name without  the  ver‐
       sion  part)  if	no  slash "/" or any special character for an extended
       regular expression or a shell-type glob is included in the pattern.
	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".

ARGUMENTS
       One of the following commands can be given for optional	operations  or
       confirmation.

       do
       do all Full execution (default).
       prepare
       do prepare
	      Just build (or continue to build or rebuild) the temporary data‐
	      base and stop before the actual operations  to  the  ports/pack‐
	      ages.
       redo
       redo all
	      Execute again for failed ports and their dependents.
       redo prepare
	      Just  rebuild  the temporary database and stop before the actual
	      operations for the  redo	process.   In  case  of	 restarting  a
	      stopped  redo  prepare process, execute by prepare or do prepare
	      command instead of this command.
       clean
       clean [normal]
	      Clean up the temporary database.
       clean force
	      Clean up the temporary database without checking the privilege.
       reset
       reset all
	      Reset the temporary database by preserving the initial  snapshot
	      of  installed  packages.	This is for a rescue in case that some
	      ports or the temporary database is broken.
       reset keepopts
	      Reset the temporary database by preserving the initial  snapshot
	      of installed packages and option settings.  This is for a rescue
	      in case that some ports or the temporary database is broken.
       ok add glob1 [glob2 ...]
	      Register manually resolved ports.	 The port globs are  separated
	      from each other by comma or space.
       ok del glob1 [glob2 ...]
	      deregister  manually  resolved  ports.  The port globs are sepa‐
	      rated from each other by comma or space.
       taboo add glob1 [glob2 ...]
	      Register	taboo  ports  that  must  not  be   built   or	 newly
	      (re)installed.   The port globs are separated from each other by
	      comma or space.  Registration to be "taboo" practically  invali‐
	      dates "necessary" registered by noneed add command.  Ports spec‐
	      ified in the HOLD section in the	configuration  file  are  pro‐
	      tected  from  deinstallation.  The port globs are separated from
	      each other by comma or space.  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.  This com‐
	      mand is  for  temporal  definitions  and	permanent  definitions
	      should be given as TABOO_* values in ${LOCALBASE}/etc/portsrein‐
	      stall.conf instead.
       taboo del glob1 [glob2 ...]
	      Deregister taboo ports.  The port globs are separated from  each
	      other by comma or space.
       need add glob1 [glob2 ...]
	      Register	necessary  ports that should be newly installed if not
	      yet and kept installed even if being obsolete.  The  port	 globs
	      are  separated  from each other by comma or space.  Registration
	      to be "necessary" takes priority over  "unnecessary"  registered
	      by noneed add command.  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.
       need del glob1 [glob2 ...]
	      Deregister necessary ports.  The port globs are  separated  from
	      each  other by comma or space.  The deregistered ports are added
	      to leaf port candidates if they are not initially installed.  In
	      this  case,  information	on the deregistered ports remain until
	      removal by forget command.
       noneed add glob1 [glob2 ...]
	      Register unnecessary ports that  should  be  deinstalled	unless
	      required	by other non-leaf ports.  The port globs are separated
	      from each other by comma or space.  In other words,  the	regis‐
	      tered  ports  are	 added	to leaf ports if they have no non-leaf
	      dependent, and otherwise have no effect  on  the	actual	opera‐
	      tions.  Requirements of the registered ports are also recognized
	      as leaves if all of their dependents are leaves.	 Ports	speci‐
	      fied  in	the  HOLD  section  in the configuration file are pro‐
	      tected.  For example, just after installing  new	ports  due  to
	      need  add	 command  or  -i option as requirements of a specified
	      target, registering only the target will let  the	 all  required
	      ports  be	 leaves	 as  well as the target.  Actually deinstalled
	      ports are selected via dialog together with  the	original  leaf
	      ports.
       noneed del glob1 [glob2 ...]
	      Deregister unnecessary ports.  The port globs are separated from
	      each other by comma or space.
       reselect leaves
	      Reselect leaf ports to delete.  This command is  effective  only
	      after the temporary database is once built.
       reselect obsolete
	      Reselect	obsolete  ports	 to delete.  This command is effective
	      only after the temporary database is once built.
       save [dir]
	      Save the current temporary database as a .tar.gz	archive.   The
	      file  name  is  created  automatically by containing the current
	      date time.  By default save directory is the current directory.
       load path
	      Load a temporary database archive.  Note that the currently tem‐
	      porary database is removed.
       glob glob [glob2 ...]
	      Evaluate	port globs and show matched origins both for installed
	      and uninstalled packages.
       options
	      Show saved option settings and expected effects of option-reset‐
	      ting  options  -L, -M and -N.  With -a option, the first, second
	      and third columns denote	the  option-resetting  options,	 reset
	      options and remaining options, respectively.
       rmconf glob [glob2 ...]
	      Reset  port  options  for the specified ports to the default and
	      reset affected parts in the temporary database.
       reconf glob [glob2 ...]
	      Reconfigure port options	for  the  specified  ports  and	 reset
	      affected parts in the temporary database.
       forget glob [glob2 ...]
	      Try  to  let  the	 temporary database forget about the specified
	      ports as much as possible.  Concretely, the data on each of  the
	      specified ports and their requirements/dependents is unless ini‐
	      tially installed or required by  other  preserved	 ports.	  This
	      command  is  mainly  for removing information on ports which had
	      been added due to -i option or need add command but have	become
	      unneeded again.  In advance to executing this command, deinstal‐
	      lation for the specified ports should be completed by noneed add
	      command followed by redo command.	 It is noted that ports regis‐
	      tered by ok, taboo and noneed commands are NOT deleted.	Inter‐
	      nal  tables used for show command keep their information regard‐
	      less of this command.
       pkgsanity [glob ...]
	      Examine the sanity of  installed	packages,  i.e.,  whether  the
	      installed	 files	exist  and  match  the checksum.  If arguments
	      globs are given, only the matching packages are  examined.   For
	      each insane package, the user is queried whether to reinstall it
	      forcedly in the following do/redo runs.  The default  choice  is
	      "yes"  for packages which have any ELF binaries or include files
	      changed or any type of files overwritten by other packages,  and
	      "no"  for	 the  others.	Insane packages already assigned to be
	      reinstalled are skipped.	With -a enabled, all  insane  packages
	      are assigned to be the above mentioned default and the output is
	      given in a form that the first  to  fourth  columns  denote  the
	      package  name,  port  origin, whether assigned to be reinstalled
	      (yes or no), and file path with a notice, respectively.	It  is
	      noted  that  this	 sanity check can detect some configuration or
	      cache files which are changed during normal use and need not  to
	      be recovered.
       escape glob [glob2 ...]
	      Back  up	and delete packages specified by globs for a temporary
	      escape mainly for resolving undeclared conflicts.	  The  escaped
	      packages	are  registered	 as  taboo  as	same as taboo add glob
	      [glob2 ...].
       restore glob [glob2 ...]
	      Restore packages specified by globs escaped by  escape  command.
	      The  escaped  packages  are  deregistered	 from taboo as same as
	      taboo del glob [glob2 ...].
       show [subject] [@[run|build|all][,[direct|full]]] [arguments]
	      Show the list of ports to be reinstalled.	 The applied scope  of
	      dependencies  can	 be  controlled	 by "show option" proceeded by
	      "@"; run, build and all employ the run-time, build-time or both-
	      time ones, respectively; direct and full include only the direct
	      or fully recursive ones, respectively.   The  default  scope  is
	      determined by the saved option settings for -B, -b and -o.  Some
	      subject's require arguments.  The following subject's are avail‐
	      able.
	       todo   Ports  to	 be reinstalled in the current do/redo process
		      (default).  With -a option, the first and second columns
		      denote  the origin and initial/new/current package name,
		      respectively.
	       done   Ports which have been already reinstalled to  be	up-to-
		      date  with  their all requirements.  With -a option, the
		      first and second columns	denote	the  origin  and  ini‐
		      tial/new/current package name, respectively.
	       resolved
		      Manually	reinstalled  ports  registered	by ok command.
		      With -a option, the first and second columns denote  the
		      origin  and  initial/new/current	package	 name, respec‐
		      tively.
	       failure
		      Failed ports.  With -a 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.
	       redo   Ports  to	 be  reinstalled after success in any of their
		      failed requirements.  With -a option, the first and sec‐
		      ond  columns  denote  the origin and initial/new/current
		      package name, respectively.
	       taboo  Taboo  ports  registered	by  taboo  command.   With  -a
		      option,  the  first and second columns denote the origin
		      and initial/new/current package name, respectively.
	       need   Necessary ports registered by  need  command.   With  -a
		      option,  the  first and second columns denote the origin
		      and initial/new/current package name, respectively.
	       noneed Unnecessary ports registered by noneed command.  With -a
		      option,  the  first and second columns denote the origin
		      and initial/new/current package name, respectively.
	       restored
		      Leaf, obsolete or unneeded ports	which  had  been  once
		      deleted  but  are	 to be or have been restored.  With -a
		      option, the first and second columns denote  the	origin
		      and initial/new/current package name, respectively.
	       deleted
		      Leaf,  obsolete or unneeded ports are to be or have been
		      deleted.	With -a option, the first and  second  columns
		      denote  the origin and initial/new/current package name,
		      respectively.
	       conflict
		      Conflicting ports which are temporarily  deleted.	  With
		      -a  option,  the	first, second and third columns denote
		      the origin, initial/new/current package name, and	 oppo‐
		      nent ports concatenated by comma respectively.
	       requirements glob1 [glob2 ...]
		      Ports  required  by  matching  ports/packages.   With -a
		      option, the first,  second,  third  and  fourth  columns
		      denote  the origin of the queried port, initial/new/cur‐
		      rent package name of  the	 queried  port,	 origin	 of  a
		      requirement  of the queried port and initial/new/current
		      package name of the requirement, respectively.
	       dependents glob1 [glob2 ...]
		      Ports depending on  matching  ports/packages.   With  -a
		      option,  the  first,  second,  third  and fourth columns
		      denote the origin of the queried port,  initial/new/cur‐
		      rent  package  name  of  the  queried  port, origin of a
		      dependent of the queried	port  and  initial/new/current
		      package name of the dependent, respectively.
	       initrequirements glob1 [glob2 ...]
		      Ports initially required by matching initially installed
		      ports/packages.  With  -a	 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.
	       initdependents glob1 [glob2 ...]
		      Ports  initially	 depending   on	  matching   initially
		      installed	 ports/packages.   With	 -a option, the first,
		      second, third and fourth columns denote  the  origin  of
		      the queried port, package name of the queried port, ori‐
		      gin of a dependent of the queried port and package  name
		      of the dependent, respectively.
	       status glob1 [glob2 ...]
		      Current  success/failure	status	in (re)installation of
		      matching	ports/packages.	  Returned  values  are	 null,
		      "todo",  "done", "resolved", "failure", "redo", "taboo",
		      "need", "noneed", "restored", "deleted"  or  "conflict",
		      where  null means that they are untouched in the current
		      option configuration or temporary reset due to  configu‐
		      ration changes.
OPTIONS
       If duplicated or conflicting ones are set, the last ones are effective.
       The end of options can be explicitly specified by  --.	Short  options
       can be given in compact forms, for example, -i -q -P to be -iqP.

       *NOTE* 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.  In the following
	      runs for any commands, the  corresponding	 option	 settings  are
	      loaded  from  the saved configuration unless explicitly reset by
	      -L, -M or -N option.  The saved options can be checked by	 port‐
	      sreinstall options command.

   Group 1: Just show messages and exit without operation
       -H
       --long-help
	      Show a long help whose content is the same as the manual page.

       -h
       --help
       --short-help
	      Show a short help.

       -V
       --show-version
	      Show the current version.

   Group 2: Effective anytime
       -a
       --batch-mode
	      Suppress	messages  so  as  to be friendly for batch operations.
	      The output formats for options and show commands and  -V	option
	      are  arranged  to	 be more batch-friendly.  It is noted that log
	      output in build/installation processes are not suppressed.

       -i
       --allow-new-targets
	      Allow -O, -T or -t options to specify  not-yet-installed	ports.
	      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.

       -M
       --reset-minor-options
	      Reset  option  settings for minor controls.  Option settings for
	      group 4 are once reset and replaced  with	 the  newly  specified
	      ones.  Check the saved options by portsreinstall options command
	      before specifying this option.

   Group 3: Effective only with redo command
       -L
       --reload-conf
	      Reload configuration files.  This option is effective only  with
	      redo  command.   Option  settings for group 6 are once reset and
	      replaced with the newly specified ones.  Check the saved options
	      by portsreinstall options command before specifying this option.

       -N
       --reset-targets
	      Re-scan  installed packages and reset option settings for target
	      specification.  This option is effective only with redo command.
	      Option settings for group 5 are once reset and replaced with the
	      newly specified ones.  Check the saved options by portsreinstall
	      options command before specifying this option.

   Group 4: Saved and transferred to restarted runs, renewable by -M option
       Option settings in this group are saved at the first do or prepare run,
       and transferred to the following runs.  Reset of the saved  values  for
       this group is available by appending -M with newly specified options.

       -A
       --non-interactive-ports-only
	      Operations  of  (re)installation are made only on ports which do
	      not require manual interaction.  This option conflicts with -I.

       -B
       --exclude-runtime-dependencies
	      Exclude run-time dependencies  in	 evaluation  of	 dependencies.
	      This option affects behaviors of -t, -T and -q options.

       -b
       --include-buildtime-dependencies
	      Include  build-time  dependencies in evaluation of dependencies.
	      This option affects behaviors of -t, -T and -q options.

       -C
       --apply-default-config
	      The temporary database is built by skipping executing make  con‐
	      fig  and	applying default values for unconfigured port options.
	      The port options are unchanged and unsaved (they	are  saved  in
	      case  of	old  ports trees in which dialog(1) is used instead of
	      dialog4ports(1)).

       -c
       --suppress-cleaning-obsolete-database
	      Suppress cleaning the temporary database even if	its  obsolete.
	      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.	Use of
	      this option may cause unexpected results and basically  unrecom‐
	      mended.

       -D
       --suppress-entire-inspection-distinfo
	      Suppress	entire	inspection of distinfo files in the ports tree
	      as a preparation for deleting obsolete distfiles.	  By  default,
	      viz.,  without  this  option, all distfiles are preserved unless
	      being obsolete in the current version of the  ports  tree.   For
	      this  purpose,  entire inspection of distinfo files in the ports
	      tree is carried out in order to get the complete list  of	 dist‐
	      files.   This  inspection can take an extremely long time if the
	      ports tree is located in file systems with  low  access  speeds.
	      With  this  option  specified,  distfiles	 for ports are deleted
	      unless they are initially installed, added due to -i option,  or
	      required by any of the installed or added ports.

       -d
       --keep-distfiles
	      Do not clean up obsolete or unused distfiles.

       -G
       --use-prebuilt-package
	      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.	This option is
	      useful for new installation and will not be harmful for the most
	      other cases.  The actual merit of this  option  depends  on  the
	      service  levels and qualities of the remote package sites; since
	      October 31, 2013, weekly-updated pkgng packages are provided for
	      major OS distributions (as of November 15, 2013, i386 and amd64)
	      until their end-of-life while legacy packages are provided  only
	      at  each	release timing in case of existing release versions of
	      major architectures; the situations are different for STABLE and
	      CURRENT  versions	 and  more various architectures are supported
	      for legacy packages.  The official support  of  legacy  packages
	      were  abandoned  at  September 1, 2014, but third-party services
	      might be used by configuring PACKAGECHECKSUMROOTS	 and  PACKAGE‐
	      ROOTS  if available somewhere.  It is noted that 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.  This
	      problem can  be  resolved	 by  configuring  NOPKG_*  section  in
	      ${LOCALBASE}/etc/portsreinstall.conf.

       -g
       --suppress-pkgtools-upadte
	      Keep  indispensable  packages  for  the standard function of the
	      ports/packages system untouched.	Concretely, this  option  sup‐
	      presses  upgrade,	 de/re-installation of the currently installed
	      ports-mgmt/pkg(-devel) and ports-mgmt/dialog4ports.

       -I
       --interactive-ports-only
	      Operations of (re)installation are  made	only  on  ports	 which
	      require manual interaction.  This option conflicts with -A.

       -k
       --suppress-self-upadte
	      Keep  portsreinstall  itself  untouched.	This option suppresses
	      upgrade, deinstallation  and  reinstallation  of	the  currently
	      installed portsreinstall.

       -l
       -use-legacy-package-for-missing-pkgng
	      If  prebuilt  pkgng  packages  are missing, use of corresponding
	      legacy ones is attempted instead by  converting  them  to	 pkgng
	      using  pkg2ng.   This option is effective only when -G option is
	      enabled and pkgng is employed for the current  packages  system,
	      but will not be harmful even in the other cases.

       -n
       --dry-run
	      No operation is carried out (just for seeing what will be done).
	      This option is effective for do and redo	commands  so  that  no
	      deinstallation  and (re)installation process is actually carried
	      out.  By	this  option,  ports/packages  to  be  deinstalled  or
	      (re)installed  can  be  confirmed	 without making changes to the
	      current situation of packages.

       -q
       --skip-unchanged-ports
	      Only new ports  and  their  dependents  are  reinstalled.	  This
	      option  is  convenient  when the all of the major version of the
	      system and configurations	 of  ports  (options  and  knobs)  are
	      unchanged.  The behavior can be modified by -b option.

       -s
       --avoid-vulnerability-check
	      Build  of	 vulnerable  ports  are	 avoided by triggering errors.
	      Note that already installed vulnerable packages  are  untouched.
	      If you desire to uninstall them, do it manually.

       -X
       --deselect-all
	      Automatically deselect all candidates for deinstallation of leaf
	      or obsolete ports.  This option conflicts with -Y option.

       -Y
       --select-all
	      Automatically select all candidates for deinstallation  of  leaf
	      or obsolete ports.  This option conflicts with -X option.

   Group 5: Saved and transferred to restarted runs, renewable by -N option
       Option settings in this group are saved at the first do or prepare run,
       and transferred to the following runs.  Reset of the saved  values  for
       this group is available in the initial run of redo command by appending
       -N with newly specified options.

       -O glob1[:glob2[:...]]
       --target-only-itself=glob1[:glob2[:...]]
	      Restrict (re/de)installation within a scope  consisting  of  the
	      specified	 target	 ports	and  their missing build-time require‐
	      ments.  Available ports matching the specified target globs  are
	      automatically  registered	 as  necessary	ports  equivalently to
	      portsreinstall  need  add	 command.    Records   of   successful
	      (re)installation	for  the all ports in the scope are deleted so
	      that they are to be reinstalled forcedly.	  So  this  option  is
	      usable for fixing packages whose data in the package database or
	      content files are broken.	 Without -i option, target ports  must
	      be  already installed or inspected.  Without -o option, the tem‐
	      porary database is maintained to have complete data on dependen‐
	      cies  of	all  installed	and necessary ports.  Combination with
	      options -T and -t is available.  The behavior can be modified by
	      -B, -b, -i and -o options.

       -o
       --only-target-scope
	      Ignore  ports which are outside of target scopes of -O, -T or -t
	      options.	Inspection of dependencies is made within  the	least-
	      required	scope  for  (re)installing the targets.	 If given with
	      -O, targets  themselves  and  their  missing  direct  build-time
	      requirements  are in the scope.  If given with -T, targets them‐
	      selves, their  direct  requirements  and	their  missing	direct
	      build-time  requirements	are  in	 the scope.  If given with -t,
	      targets themselves, their already-inspected dependents and their
	      missing  direct build-time requirements are in the scope.	 Ports
	      outside of the scopes  are  kept	untouched  even	 if  they  are
	      updated.	 It  is	 noted that this option disables detection and
	      deinstallation of new leaf ports.	 This option  will  be	useful
	      for  quick  upgrades  or new installation (only) before complete
	      construction of the temporary database  for  the	all  installed
	      ports.

       -T glob1[:glob2[:...]]
       --target-and-requirements=glob1[:glob2[:...]]
	      Restrict	(re/de)installation  within  a scope consisting of the
	      specified target ports, their  requirements  and	their  missing
	      build-time requirements.	Available ports matching the specified
	      target globs are automatically  registered  as  necessary	 ports
	      equivalently  to	portsreinstall	need  add command.  Records of
	      successful (re)installation for the all ports in the  scope  are
	      deleted  so  that	 they are to be reinstalled forcedly.  So this
	      option is usable for fixing packages whose data in  the  package
	      database or content files are broken.  Without -i option, target
	      ports must  be  already  installed  or  inspected.   Without  -o
	      option,  the  temporary  database is maintained to have complete
	      data on dependencies of all installed and necessary ports.  Com‐
	      bination	with options -T and -t is available.  The behavior can
	      be modified by -B, -b, -i and -o options.

       -t glob1[:glob2[:...]]
       --target-and-dependents=glob1[:glob2[:...]]
	      Restrict (re/de)installation within a scope  consisting  of  the
	      specified	 target	 ports,	 their	dependents  and	 their missing
	      build-time requirements.	Available ports matching the specified
	      target  globs  are  automatically	 registered as necessary ports
	      equivalently to portsreinstall need  add	command.   Records  of
	      successful  (re)installation  for the all ports in the scope are
	      deleted so that they are to be reinstalled  forcedly.   So  this
	      option  is  usable for fixing packages whose data in the package
	      database or content files are broken.  Without -i option, target
	      ports  must  be  already	installed  or  inspected.   Without -o
	      option, the temporary database is maintained  to	have  complete
	      data on dependencies of all installed and necessary ports.  Com‐
	      bination with options -T and -t is available.  The behavior  can
	      be modified by -B, -b, -i and -o options.

   Group 6: Saved and transferred to restarted runs, renewable by -L option
       Option settings in this group are saved at the first do or prepare run,
       and transferred to the following runs.  Reset of the saved  values  for
       this group is available in the initial run of redo command by appending
       -L with newly specified options.

       -P
       --load-pkgtoolsconf-as-override
	      Import settings from pkgtools.conf(5) as	the  secondary.	  This
	      option  is effective only when portupgrade(1) is installed.  For
	      duplicated configurations,  values  in  portsreinstall.conf  are
	      applied  first  and  then	 those	in pkgtools.conf(5) are.  This
	      option overrides preceding -p option.

       -p
       --load-pkgtoolsconf-as-default
	      Import settings from pkgtools.conf(5) as the primary  (default).
	      This  option is effective only when portupgrade(1) is installed.
	      For duplicated configurations, values  in	 pkgtools.conf(5)  are
	      applied  first  and then those in portsreinstall.conf are.  This
	      option overrides preceding -P option.

       -Q
       --ignore-pkgtoolsconf
	      Ignore pkgtools.conf(5) even if it exists.

DETAILS
   Overview
       This utility is a ports/packages management tool which  upgrades	 pack‐
       ages to be as much as consistent regarding their dependencies by allow‐
       ing repetitional retrials called "redo runs".   The  implementation  of
       this  utility  is designed for smart entire reinstallation of installed
       packages which takes a very long time.  A temporary  database  is  used
       for  managing  the  starting point, intermediate status and goal of the
       upgrade processes.  The starting point is determined by	the  initially
       installed  packages.  The intermediate status contains various informa‐
       tion on successes and failures of  ports	 to  judge  the	 necessity  of
       upgrade	considering dependencies during redo runs.  The goal is deter‐
       mined by the ports tree, replacement to compatible ports and configura‐
       tions  for  each port, i.e., port options configured by make config and
       knobs (make environment variables and make  arguments).	 In  order  to
       make  this  utility  work  smartly,  knob should be defined in ${LOCAL‐
       BASE}/etc/portsreinstall.conf (or pkgtools.conf(5) if portupgrade(1) is
       installed)  but	not in /etc/make.conf The temporary database is avail‐
       able until the ports tree is updated.   Each  port  is  built  for  its
       (re)installation	 in  principle,	 however, -G 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.

       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.  Nevertheless, the all function‐
       alities 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.

       In a standard case, the entire reinstallation will proceed in the  fol‐
       lowing step:

       1.     Update  the  ports tree and (in case of pkgng) the pkgng reposi‐
	      tory catalog;

       2.     Clean up a temporary database which stores the  all  information
	      used  for	 the whole task of reinstallation (first do or prepare
	      run);

       3.     Record the snapshot of the all installed packages as the initial
	      point of reinstallation (first do or prepare run);

       4.     Build up the database to store data on configurations and depen‐
	      dencies (which may depend on  the	 configurations)  of  the  all
	      (re/de)installing packages to be the latest version according to
	      the current ports tree (do or prepare run);

       5.     Select obsolete packages or new leaf ports/packages to deinstall
	      or exclude if any (do or prepare run);

       6.     Execute the actual (re/de)installation (do run);

       7.     If  some	ports  failed,	retry  the (re/de)installation for the
	      failed ones and their dependents (redo run);

       8.     Make modification to the temporary database or  manually	re/de-
	      install packages in concern (ok, taboo, noneed, etc.).

       9.     Repeat from 6 to 7 until the all available ports succeed.

       A typical instance of actually executed commands for upgrading packages
       will be in the following flow:

       1.     portsnap fetch update

       2.     pkg update
	      (In case of pkgng)

       3.     script
	      (Enter script(1) environment for logging)

       4.     portsreinstall
	      (Possibly end up with some failed ports)

       5.     portsreinstall redo
	      (Possibly end up with some failed ports)

       6.
	       ... Countermeasure to failures ...

       7.     portsreinstall redo
	      (Possibly end up with some failed ports)

       8.
	       ... Repetition from 7 to 8 ...

       9.     portsreinstall redo
	      (All available ports succeed)

       Here, in case of entire reinstallation after a major version upgrade of
       the  operating  system,	-q  option  should  be removed.	 It is usually
       encouraged to execute the command on script(1) in order to  record  the
       make  outputs  for catching reasons of failures if any.	In many cases,
       the user may undergo failures in build or installation  of  some	 ports
       during  do/redo	runs.	Refer  to subsections entitled "Workaround for
       failed ports: ..." for the techniques and  procedures  to  resolve  the
       problems.

       This  utility  is  implemented  to  be flexible and robust about inter‐
       rupt/restart operations so as to allow the users to run only  when  the
       machine	is  free  and  terminate when it becomes busy on demand.  Con‐
       cretely, the users can stop the process by CTRL+C  (or  even  by	 unex‐
       pected  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.  This func‐
       tionality 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.

       Compatibility   with   portupgrade(1)  is  well	considered  if	it  is
       installed; settings in pkgtools.conf(5) are reflected and  the  portup‐
       grade  database	is  updated  at the end of each do/redo run.  The main
       difference of this utility with portupgrade(1) or portmaster(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 par‐
       tial  upgrade to get the latest versions available as quickly as possi‐
       ble by applying the least "patches" to  the  environment.   While  this
       utility	also has options for partial upgrade (-t, -T and -O), they are
       intended as auxiliary modification of  (re)installing  packages.	  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 appropri‐
       ate definition of them.	Many of the  UPDATING  advisories  on  trouble
       shooting in packages upgrade will be unnecessary to follow if the users
       use this utility instead of portupgrade(1) or portmaster(8).

       If this utility has been installed by  ports/packages  and  the	corre‐
       sponding	 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.

       New  leaf ports (primary leaves) and their exclusive requirements (sec‐
       ondary leaves)  are  automatically  detected.   The  user  may  specify
       unneeded	 ports explicitly by portsreinstall noneed command so that the
       specified ports are added to the new leaves if they  have  no  non-leaf
       dependents.   If	 any  leaf ports are detected, the user is prompted to
       select ones to delete by dialog.	 Similarly, obsolete ports  to	delete
       are also selectable by dialog.  Here, both for leaf and obsolete ports,
       the selection can be modified afterward	and  unselected	 ones  can  be
       restored by following redo runs.

       The scheme of this utility is divided into stages of temporary database
       construction and actual (re/de)installation.  Execution	by  portsrein‐
       stall prepare procedes to the end the first stage, and that without any
       argument procedes to the end of the second stage.  Each	of  these  two
       major  stages  is  divided into minor stages.  When a previously termi‐
       nated  process  is  restarted,  completed  minor	 stages	 are  skipped.
       Changes of the configurations made or notified by corresponding options
       or commands of this utility are reflected to the database by  automati‐
       cally re-executing the concerned stages in the following do/redo runs.

       When  option(s)	-O,  -t	 or  -T is/are specified, only the targets and
       their  requirements  or	dependents  within  the	 specified  scope  are
       inspected  and  (re/de)installed.  Inspected data on the ports are pre‐
       served in the temporary database and reused in the following runs  even
       if  the	targets	 are reset or changed with aid of -N option.  The pre‐
       served data are basically harmless even if the corresponding ports  are
       out of scope of new targets unless conflicts arise.

   New installation of ports: case 1
       If  the	user  has  not	executed  this	utility for entire reinstalla‐
       tion/upgrade never or after the final clean up of the  temporary	 data‐
       base,
	      portsreinstall -i -Glq -oO globs
       will be a quick way to install new packages matching glob patters globs
       (here the options are separated into each group just  for  easy	under‐
       standing).  More automated operation is possible by appending -C and -Y
       options so as to skip all dialog queries by letting all	configurations
       default.

   New installation of ports: case 2
       If  the	user  already  has  a complete temporary database by executing
       entire reinstallation/upgrade,
	      portsreinstall need add globs
       followed by
	      portsreinstall -MGlq -N redo
       will be a quick and smart way to install	 new  packages	matching  glob
       patters	globs.	 More  automated operation is possible by appending -C
       and -Y options so as to skip all dialog queries by letting all configu‐
       rations default.

   Deinstallation and restoration of leaf and obsolete ports
       If  any	new leaf ports and obsolete (lost) ports are detected, dialogs
       are displayed for selecting which ports/packages to delete.  Here it is
       noted  that  detection and operations on new leaf ports are invalidated
       when the temporary database is incomplete due to -o option.   Deinstal‐
       lation  and restoration of the packages are carried out after reinstal‐
       lation of the all ports	are  attempted.	  The  selected	 packages  are
       backed up before deinstallation.

       The selection can be modified by executing
	      portsreinstall reselect leaves
       for new leaf ports, and
	      portsreinstall reselect obsolete
       for obsolete ports.

       Then following execution of
	      portsreinstall
       deinstalls newly selected packages and restores unselected ones.

   Workaround for failed ports: conflicts: case 1
       This utility automatically resolves conflicts between ports/packages by
       temporary deinstallation during concerned build	or  installation  pro‐
       cesses  according  to  CONFLICTS, CONFLICTS_BUILD and CONFLICTS_INSTALL
       defined by each port.  This means that ports lacking proper  CONFLICTS,
       CONFLICTS_BUILD and CONFLICTS_INSTALL definitions may undergo failures.
       Some of the undeclared conflicts may be resolved by simple redo runs.

       Some problems may be due to coexistence of the same or related software
       of  different  versions	of  the requirements or the unsuccessful ports
       themselves.  For analysis of the upgraded and initial requirements,
	      portsreinstall show requirements @all,direct  glob
       and
	      portsreinstall show initrequirements @all,direct glob
       can be used, respectively, where glob denotes  a	 glob  specifying  the
       unsuccessful  ports.   For  analysis  of ports for the same software of
       different versions,
	      portsreinstall glob glob_req
       can be used, where glob_req denotes a glob  specifying  the  suspicious
       requirements.

       If  a conflict is found, first escape (back up and delete) the conflict
       by
	      portsreinstall escape package_conflict
       where package_conflict is the conflicting package.

	      Then execute
		     portsreinstall redo
	      for  completing  (re)installation	 of  the  dependents  of   the
	      resolved port.

	      If the (re)installation is successful, execute
		     portsreinstall restore package_conflict
	      to  restore  the	escaped	 package (reinstallation may fail if a
	      newer version is installed but there is  no  problem).   If  any
	      conflicts still remain unresolved, refer to case 2.

   Workaround for failed ports: conflicts: case 2
       If some upgraded ports fundamentally conflict with each other, the out‐
       put log of this utility for do/redo processes  will  report  a  message
       entitled	 "The  following  ports	 are  temporarily  deleted due to con‐
       flicts".	 In this case, although not always encouraged,	the  user  may
       consider replacement of the conflicting ones with one of them by assum‐
       ing and expecting compatibility between them.

       This workaround can be done by the following procedure.	First edit the
       configuration file ${LOCALBASE}/etc/portsreinstall.conf so as to define
       the corresponding REPLACE_* values.  If	portupgrade(1)	is  installed,
       the corresponding configuration should be made in ALT_PKGDEP section of
       pkgtools.conf(5).

       Then execute
	      portsreinstall -L redo
	      (Recover options reset by -L if any by checking with the aid  of
	      portsreinstall options.)
       for (re)installation of the concerned port by reflecting the configura‐
       tion changes.

   Workaround for failed ports: conflicts: case 3
       If some conflicts are found to be unnecessary, they can be  removed  in
       the following way.  The unnecessary ports are registered by executing
	      portsreinstall noneed add globs_unnecessary
       where globs_unnecessary denotes globs specifying the unnecessary ports.

       Next execute
	      portsreinstall show dependents @run,full globs_unnecessary
       for  checking  whether  any  dependents	seem unnecessary for the user.
       Next execute
	      portsreinstall noneed add globs_unnecessary_dependents
       to register  them,  where  globs_unnecessary_dependents	denotes	 globs
       specifying the unnecessary dependents.

       Then execute
	      portsreinstall
	      (If it seems effective, reconfigure options for -B, -b and -o by
	      using -M and -N.)
       for automatic evaluation and deinstallation of new leaf ports redefined
       by  the new unnecessary ports.  If the registered ports are required by
       any non-leaf or non-unnecessary ports, this process will end up with no
       practical progress.

   Workaround for failed ports: reconfiguration of port options
       If the problems may be resolved by reconfiguration of the port options,
       execute portsreinstall reconf glob which invokes the dialog  for	 rese‐
       lecting	options.   Here	 glob  denotes a glob specifying the concerned
       port.

       If any change was made here, execute
	      portsreinstall
       for retrial of (re)installation.

   Workaround for failed ports: reconfiguration of knobs
       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_*,  BEFOREDE‐
       INSTALL_*  or  AFTERINSTALL_*  values.  If portupgrade(1) is installed,
       the corresponding configuration should be made in MAKE_ARGS,  MAKE_ENV,
       BEFOREBUILD,   BEFOREDEINSTALL	or   AFTERINSTALL   section   of  pkg‐
       tools.conf(5).

       Then execute
	      portsreinstall -L redo
	      (Recover options reset by -L if any by checking with the aid  of
	      portsreinstall options.)
       for (re)installation of the concerned port by reflecting the configura‐
       tion changes.

   Workaround for failed ports: update of ports tree
       If the ports are fundamentally broken, updating the ports tree may  fix
       the problems.  In this case, execute
	      portsnap fetch update
       and, in case of pkgng, followed by
	      pkg update
       and then
	      portsreinstall reset keepopts
       to clean everything but the option settings and information of the ini‐
       tially installed packages.  Then execute
	      portsreinstall
       and see whether the problems are resolved.

ENVIRONMENT VARIABLES
       The following environment variables can be used to change the  behavior
       of  portsreinstall.   Some of them are the same as defined in ports(7).
       Usually they should be kept to be the system  default  or  empty.   The
       configuration  file (${LOCALBASE}/etc/portsreinstall.conf) takes prior‐
       ity over environment variables.

       LOCALBASE
	      Where to install files of native applications.  The  default  is
	      /usr/local.

       LINUXBASE
	      Where  to	 install  files of Linux applications.	The default is
	      /compat/linux.

       PREFIX Where to install	things	in  general.   The  default  value  is
	      defined  for  each  port;	 it  is	 usually ${LOCALBASE} for most
	      native applications and  ${LINUXBASE}  for  Linux	 applications.
	      However,	some  ports  customize it to their own defaults, e.g.,
	      ${LOCALBASE}/kde4 for KDE4-related ones.	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.

       PORT_DBDIR
	      Where   to   store   port	  option   values.    The  default  is
	      /var/db/ports.

       PORTSDIR
	      Location of the ports tree.  The default is /usr/ports.

       DISTDIR
	      Where to store distfiles.	 The default is ${PORTSDIR}/distfiles.

       PACKAGES
	      Where to	store  package	archives.   The	 default  is  ${PORTS‐
	      DIR}/packages.

       PKGREPOSITORYSUBDIR
	      Subdirectory  under  ${PACKAGES}	to store substances of package
	      archives.	 The default is "All".

       PKGREPOSITORY
	      Where to store substances of package archives.  The  default  is
	      ${PACKAGES}/${PKGREPOSITORYSUBDIR}.

       PKG_PATH
	      Overriding  Synonym to PKGREPOSITORY for compatibility with pkg‐
	      tools.conf(5).

       PACKAGECHECKSUMROOTS
	      Roots of available sites for legacy package check sum to be ran‐
	      domly  selected.	 Each site is separated by "|" (vertical bar).
	      The  default  consists  of   ftp://ftp.FreeBSD.org/   and	  from
	      ftp://ftp1.FreeBSD.org/ to ftp://ftp14.FreeBSD.org/.

       PACKAGECHECKSUMDIR
	      Subdirectory  pattern  of	 legacy	 package check sum sites.  The
	      first and second %s are substituted with the platform  and  ver‐
	      sion   of	  OS,	respectively.	 The   default	 is  pub/Free‐
	      BSD/ports/%s/packages-%s/All/.

       PACKAGEROOTS
	      Roots of available legacy package sites to be randomly selected.
	      Each  site  is  separated by "|" (vertical bar).	The default is
	      ${PACKAGECHECKSUMROOTS}, but it is relatively secure to be  dif‐
	      ferent from it.

       PACKAGEDIR
	      Subdirectory  pattern  of	 legacy	 package sites.	 The first and
	      second %s are substituted with the platform and version  of  OS,
	      respectively.  The default is ${PACKAGECHECKSUMDIR}.

FILES/DIRECTORIES
       The following files and directories are referred to.

       ${LOCALBASE}/etc/portsreinstall.conf
	      Configuration file.

       /var/tmp/portsreinstall.db
	      Temporal database directory.  The whole contents can be saved by
	      portsreinstall save command.

       ${LOCALBASE}/etc/pkgtools.conf
	      Configuration file of portupgrade(1).

HISTORY
       portsreinstall has been developed as below.

       3.2.1 (27 January 2015)
	      [BUG FIX] The  automatic	resolution  of	installation  conflict
	      implemented  in  the  previous  version was seriously broken and
	      judged conflicts incorrectly.

       3.2.0 (30 December 2014)
	      [IMPROVED] The automatic resolution of installation conflict  is
	      improved	to avoid stripping due to restore-and-delete of backup
	      packages that possibly occurs when the default version changes.

	      [IMPROVED]  Support  for	cases  that  alternative  version   of
	      ports-mgmt/pkg   (ports-mgmt/pkg-devel,	switched  by  defining
	      WITH_PKG=devel  in  /etc/make.conf)  or  ports-mgmt/dialog4ports
	      (DIALOGPORT=port_origin  in  /etc/make.conf,  reserved  for  the
	      future) is used are implemented.

	      [BUG FIX] Reinstallation of pkg(8) could encounter error	termi‐
	      nation.

       3.1.1 (17 December 2014)
	      [IMPROVED]  The automatic resolution of installation conflict is
	      improved to detect actual conflict not described in CONFLICTS or
	      CONFLICTS_INSTALL (for the sake of the staging mechanism).

	      [BUG  FIX]  MOVED	 or  REPLACED ports were sometimes incorrectly
	      detected as duplicated ports.

	      [BUG FIX] Command pkgsanity was confused	by  the	 specification
	      change of pkg-check(8).

	      [BUG FIX] Option -q did not work correctly in version 3.1.0.

       3.1.0 (9 August 2014)
	      [IMPROVED]  Command  reset  is  now  available  to  work with an
	      updated ports tree by preserving information  of	the  initially
	      installed packages.  The manual page is updated by adding "Work‐
	      around for failed ports: update of  ports	 tree"	subsection  to
	      explain an example to utilize this improved specification.

	      [IMPROVED]  A  countermeasure operation is implemented for a bug
	      of pkg-1.3.4 that pkg delete -q does not work.

	      [IMPROVED] Revisions are made so that packages whose  ports  are
	      replaced	or  moved  are	deinstalled before installation of the
	      alternative ports.

	      [IMPROVED] Reinstalltion of ports-mgmt/pkg  becomes  smarter  in
	      systems where Pkgng is the default.

	      [BUG  FIX] Command prepare was possibly aborted at a port any of
	      whose requirements or dependents is obsolete.

	      [BUG FIX] It silently failed to launch  if  the  ports  tree  is
	      missing or broken.

	      [BUG FIX] The short help lacked descriptions on need command.

	      [BUG FIX] Some message output failed with a warning "3: Bad file
	      descriptor" in some environment (detected in 10.0-RELEASE).

	      [BUG FIX] The error message for specifying option -L or  -N  for
	      other than redo command was wrong (-L was missing).

	      [BUG  FIX]  Control  sequences  in output of the long help by -H
	      option was not correctly handled in some	environment  (detected
	      in 10.0-RELEASE).

	      [BUG  FIX]  Reload  of  configuration  where replacement rule is
	      changed possibly caused errors in the phase  of  "Inspection  of
	      necessity".

	      [BUG  FIX]  Messages  about failed ports were inappropriate when
	      failed ports were changed to unneeded.

	      [BUG FIX] Evaluation of glob was incorrect when the  pattern  is
	      regular expression containing multiple slashes.

	      [BUG  FIX]  Warning  messages  might have arise by attempting to
	      restore nonexistent backed-up requirements.

	      [BUG FIX] The error message for invalid  operation  on  reselect
	      command was wrong.

	      [BUG  FIX] Selection of leaf packages remained after all of them
	      changed to non-leaves.

	      [BUG FIX] Ports with periods or  underscores  in	their  package
	      name, port name or origin were not be treated correctly.

	      [BUG  FIX] Changes in "REPLACE_*" in ${LOCALBASE}/etc/portsrein‐
	      stall.conf were not correctly reflected in recursive reinstalla‐
	      tion  of dependents. The specification of the temporary database
	      is changed for this fix.

	      [BUG FIX] Execution of  reset  command  unintentionally  removed
	      temporally  deinstalled  leaf  ports out of scope of reinstalla‐
	      tion.

	      [BUG FIX] A wrong option was given to pkg-info(8) in a  compati‐
	      ble command for pkg_info -qoX.

	      [BUG  FIX]  Variables  "NOPKG_*"	in ${LOCALBASE}/etc/portsrein‐
	      stall.conf were not parsed.

       3.0.5 (14 December 2013)
	      [NEW] Command of rmconf is added.

	      [IMPROVED] Automatic resolution of duplicated  registrations  of
	      multiple	packages  for  the  same port origin is implemented in
	      pkgsanity command.

	      [CHANGED] Specification changes are made so  that	 (re)installa‐
	      tion  processes  are skipped for ports any of whose requirements
	      is missing. This results in  improvement	to  avoid  attempt  of
	      unsuccessful builds due to unsuccessful installation of require‐
	      ments and a fix of the  following	 bug  regarding	 unintentional
	      reinstallation of escaped packages.

	      [BUG  FIX]  Execution  of reconf command confused the work of -G
	      option.

	      [BUG FIX] Escaped packages by escape command  were  unintention‐
	      ally reinstalled in (re)installation of their dependents.

       3.0.4 (16 November 2013)
	      [IMPROVED]  Support for systems in which pkgng is the default or
	      legacy package tools are abandoned is improved.

	      [IMPROVED] Changes are made so that MAKE_JOBS_UNSAFE=yes is  set
	      in retrials of build and installation.

	      [MISC]  The  manual  page	 is  updated  regarding	 -G  option by
	      reflecting the official service  start  of  pkgng	 packages  and
	      abandonment of the legacy packages.

	      [BUG FIX] Commands of forget and reconf and option -L could have
	      caused error ends in following show failure command and the part
	      showing  the failure list at the end of execution of do and redo
	      commands.

	      [BUG  FIX]  The  execution  was	terminated   by	  error	  when
	      /etc/make.conf does not exist.

	      [BUG FIX] The execution was terminated by error when there is no
	      INDEX file for the current OS version is prepared.

	      [BUG FIX] Some meaningless warnings are suppressed.

	      [BUG FIX] Comments at termination during building the  temporary
	      database were inconsistent.

       3.0.3 (2 August 2013)
	      [BUG  FIX]  Cleaning of distfiles before retrial of failed fetch
	      was forgotten.

       3.0.2 (10 July 2013)
	      [NOTE] Version 3.0.1 has a serious defect that  newly  installed
	      files can be spoiled by restoration of conflicting old packages.
	      When the current version is to executed only for	limited	 ports
	      (with -q, -t, -T or -O) after this previous version was used, in
	      advance to that, it is strongly encouraged to execute
		     portsreinstall pkgsanity
	      and select "y" in the queries for spoiled packages.

	      [NEW] Commands of pkgsanity and show status are added.

	      [IMPROVED] Changes are made so as to deinstall conflicts	before
	      the first trials in build and installation.

	      [IMPROVED]  Changes  are	made  so  as to prevent restoration of
	      backed-up packages deinstalled due to matching CONFLICTS_INSTALL
	      of installed packages.

	      [IMPROVED] Changes are made so as to retry build by deinstalling
	      the current package and packages matching CONFLICTS_INSTALL even
	      if not in CONFLICTS_BUILD nor CONFLICTS.

	      [IMPROVED]  Command  show conflict is changed to append a column
	      of opponent ports of each conflict.

	      [CHANGED] Changes are made so that  FORCE_PKG_REGISTER  is  dis‐
	      abled  in	 the all operations. This had become obsolete and even
	      harmful after the implementation	of  the	 automatic  workaround
	      function for conflicts.

	      [MISC]  Minor  changes are made on HISTORY section of the manual
	      page in the level of coding and terminology.

	      [BUG FIX] Configuration changes in  replacement  were  not  com‐
	      pletely  reflected  by  redo  with  -L  option and ended up with
	      errors.

	      [BUG FIX] Deinstallation of obsolete or new leaf ports  did  not
	      work in version 3.0.1.

	      [BUG FIX] Conflicts escape was not implemented for (re)installa‐
	      tion by prebuilt packages.

	      [BUG FIX] The message format in enumerating port origins	or  so
	      on was broken.

       3.0.1 (11 June 2013)
	      [NEW] Commands escape and restore are added.

	      [IMPROVED]  The behavior of -C option is changed in case of dia‐
	      log4ports(1) so that the port options are unchanged and  unsaved
	      throughout  the  all stages from the temporary database build to
	      (re)installation. This allows the all stages to run on script(1)
	      and nohup(1).

	      [IMPROVED]  Changes are made so that installation by packages is
	      split into fetch and installation stages and backup/deletion  of
	      old packages are skipped if the fetch is unsuccessful.

	      [IMPROVED]  Changes  are	made  so  that	uninspected  ports are
	      skipped in reconf command.

	      [IMPROVED] A measure to cases of	duplicated  packages  for  the
	      same port is implemented.

	      [BUG FIX] Commands permitted for unprivileged users did not work
	      for the users.

	      [BUG FIX] This manual page, comments and messages contained some
	      wrong English words and incorrect descriptions.

	      [BUG FIX] Runs by unprivileged users could end up with errors in
	      message output if /dev/stdin cannot provide information  of  the
	      console size.

	      [BUG FIX] Meaningless warnings are suppressed.

	      [BUG FIX] Leaf ports replaced by REPLACE_* were recognized to be
	      new leaf ports to delete even if they are targets of -O,	-T  or
	      -t or in the needed list.

	      [BUG  FIX]  Evaluation  of  glob patterns which have the form of
	      port origin was inappropriately ambiguous.

	      [BUG FIX] Reinstallation processes were  unintentionally	termi‐
	      nated when the backup package creation was unsuccessful.

	      [BUG  FIX] Options -O, -T and -t did not work for once-succeeded
	      ports.

       3.0.0 (01 June 2013)
	      [NEW] Options of -a, -A, -b, -B, -C, -D, -g, -G, -i, -I, -l, -L,
	      -M,  -n,	-o, -O, -X and -Y are added (-X is redefined as a dif‐
	      ferent function).

	      [NEW] Long options are supported.

	      [NEW] Commands need,  noneed,  reset,  forget,  reselect,	 glob,
	      reconf,  options, show need, show noneed, show restored and show
	      conflict are added.

	      [NEW] (Re)installation  by  prebuilt  packages  for  ports  with
	      default configurations is implemented.

	      [NEW]  Controlling the dependency scope for show command becomes
	      available.

	      [NEW] Commands of do, prepare and redo are  rearranged  with  do
	      and  redo with an optional mode either of prepare or all so that
	      the default and synonyms are compatible with  the	 earlier  ver‐
	      sions.

	      [CHANGED]	 The  function	of  show redo is replaced with that of
	      former show pending, and show pending is abandoned in exchange.

	      [CHANGED] Deinstallation of obsolete packages becomes selectable
	      by run-time dialog.

	      [CHANGED]	 Deinstallation	 and  ignorance	 of leaf ports becomes
	      available via selection by run-time dialog.

	      [CHANGED] The directory  for  saving  packages  of  obsolete  or
	      removed leaf ports are changed to $PACKAGES/All whose default is
	      /usr/ports/packages/All.

	      [CHANGED] The deinstallation process for unused  packages	 which
	      have been done before reinstallation is changed to be done after
	      it.

	      [CHANGED] Compact forms of options is made to be accepted, e.g.,
	      -b -t -o as -bto.

	      [CHANGED]	 The behaviors of -q, -t and -T options are changed to
	      ignore build-time-only  dependencies.  The  former  function  is
	      reproduced  with	-b  option. The document for -t and -T options
	      are revised so as to correct wrong descriptions that they	 could
	      newly install the specified ports.

	      [CHANGED]	 Syntax of -t and -T options are changed so as to give
	      all port globs by a single argument value as concatenation  with
	      colons  as  delimiters. Along this change, -r and -R options are
	      abandoned.

	      [CHANGED] Old options of -x and -X are abandoned due to duplica‐
	      tion with taboo add command.

	      [CHANGED]	 Rules	for  transferring option settings to restarted
	      runs are changed so as to let the all options renewable.

	      [CHANGED] The evaluation algorithm of glob patterns is  improved
	      and changed to be fully original.

	      [CHANGED] The long help is unified with this manual page.

	      [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.

	      [IMPROVED]  The  treatment  of backup packages is modified to be
	      safer by considering possible  format  fluctuation  in  case  of
	      pkgng.

	      [IMPROVED]  Automatic  solution to conflicts in (re)installation
	      is implemented.

	      [MISC] Line feeds of  the	 help  and  information	 messages  are
	      improved.

	      [BUG FIX] Meaningless warnings at the end of leaf ports are sup‐
	      pressed.

	      [BUG FIX] Inappropriate operations could have been attempted  on
	      the temporary database by non-superuser privilege.

	      [BUG  FIX]  Tarballs for ports which depend on other ports could
	      have been lost in the step of cleaning distfiles.

	      [BUG FIX] Self-upgrade was carried out even for  commands	 other
	      than do or prepare.

       2.2.2 (03 January 2013)
	      [BUG FIX] Commands ok add and ok del failed if no port has rein‐
	      stalled in the latest do/redo process.

	      [BUG FIX] Makefile was problematic if  ${LOCALBASE}/etc/portsre‐
	      install.conf does not exist before installation.

       2.2.1 (25 December 2012)
	      [CHANGED] Command show todo_next is renamed to show pending.

	      [IMPROVED]  Changes  are made so as to avoid retrying for depen‐
	      dents of failed ports when no problem has resolved.

	      [BUG FIX] Removed a remained debugging code in  the  action  for
	      save command.

       2.2.0 (17 December 2012)
	      [NEW] Command of show todo_next is added.

	      [CHANGED] Changes are made so as to skip wasteful reinstallation
	      where the target port  is	 already  reinstalled  once  (with  -q
	      option,  when  its version is up-to-date) and no change has been
	      made for either of its requirements afterwards.

	      [CHANGED]	 The  default  settings	 in  portsreinstall.conf   was
	      changed so as to include a HOLD pattern for bsdpan.

	      [BUG  FIX]  There	 was  a	 problem  in  evaluating glob patterns
	      expressing origins.

	      [BUG FIX] Minor inappropriate messages and actions emerged  when
	      the  target  and	replacement  of	 ports substitution become the
	      same.

	      [BUG FIX] The help messages and  this  manual  page  lacked  the
	      descriptions about show redo command.

       2.1.0 (10 December 2012)
	      [NEW] New generation package (pkgng) is supported.

	      [IMPROVED]  A  countermeasure for a build failure in a restarted
	      build from a terminated build is implemented.

	      [BUG FIX] Restoration of backup packages after failed  installa‐
	      tion was not working correctly.

	      [BUG  FIX]  The  transferring  mechanism	of  option  values  to
	      restarted run was broken.

	      [BUG FIX] Error end in case that no packages  are	 installed  is
	      fixed.

	      [BUG  FIX]  A glob evaluation routine used when ports_glob(1) is
	      not installed was broken.

       2.0.0 (12 August 2012)
	      [NEW] Options -X, -r and -R are added so as to compensate a fact
	      that -x, -t and -T cannot specify package names with commas.

	      [NEW]  Commands  of  show	 requirements and  show dependents are
	      added.

	      [NEW] A functionality of self-upgrade is added so as to be  car‐
	      ried out first if the port of portsreinstall is new.

	      [NEW]  Option  -k	 is added for cases that upgrade of portsrein‐
	      stall should be avoided.

	      [IMPROVED] Messages are extended to output configuration parame‐
	      ter values.

	      [CHANGED] Functionalities of options -t and -T are changed so as
	      to prevent deinstallation	 of  irrelevant	 packages  and	detect
	      obsolete installed dependencies.

	      [CHANGED]	 Use  of commas as delimiters in ok and taboo commands
	      is abolished.

	      [CHANGED] The  specification  of	show  command  is  changed  to
	      exclude  irrelevant packages/ports and output messages about the
	      matching targets when options -r, -R, -t and -T are enabled.

	      [CHANGED] The default behavior in case that the temporary	 data‐
	      base  is	older  than the ports tree is changed from warnings to
	      automatic reconstruction;	 the  old  behavior  is	 recovered  by
	      option -c.

	      [BUG FIX] Termination message is corrected (portsreinstall ok =>
	      portsreinstall ok add).

	      [BUG FIX] Values of BEFOREBUILD,	BEFOREDEINSTALL	 and  AFTERIN‐
	      STALL were not correctly imported from pkgtools.conf(5).

	      [BUG  FIX]  The file name given by save command was with a wrong
	      time stamp.

       1.1.0 (28 April 2012)
	      [NEW] Command of show deleted is newly added.

	      [CHANGED] Origin names in messages and results of	 show  command
	      are changed to be accompanied with package names.

	      [CHANGED]	 The  default  option for treating pkgtools.conf(5) is
	      changed to -p and -Q is newly added.

	      [IMPROVED] Custom make environment variables and	arguments  are
	      changed  to be reflected in the stage of inspection of dependen‐
	      cies.

	      [IMPROVED] Command of show todo is now available before starting
	      reinstallation.

	      [BUG FIX] Independence from portupgrade(1) was incomplete.

	      [BUG  FIX]  Error	 messages  for show command when the temporary
	      database does not exist are improved.

	      [BUG FIX] Ports with names  contaning  '+'  were	not  correctly
	      treated.

	      [BUG FIX] Save and load commands were broken.

	      [BUG FIX] Deletion of MOVED-back packages is now prevented.

       1.0.0 (14 March 2012)
	      [MISC] Explanations for -p and -P are revised because the previ‐
	      ous ones were somewhat confusing.

	      [MISC] The output device of helps is changed from stderr to std‐
	      out.

	      [MISC]  Messages for termination during deinstallation and rein‐
	      stallation are improved by showing the target port/package names
	      at that time.

	      [BUG  FIX]  Glob	patterns for package/port names were not fully
	      supported.

	      [BUG FIX] Values of MARG_* and MENV_* (MAKE_ARGS and MAKE_ENV in
	      pkgtools.conf(5)) were not working.

	      [BUG FIX] Globs of obsolete packages were not detected, so espe‐
	      cially HOLD_PKGS and IGNORE_MOVED in pkgtools.conf(5) and	 port‐
	      sreinstall.conf had lost their functionalities.

	      [BUG  FIX]  Values of IGNORE_MOVED partially overwrote HOLD_PKGS
	      in pkgtools.conf(5).

	      [BUG FIX] Typographic and grammatical errors in the main	script
	      and documents are revised.

       0.13.1 (29 October 2011)
	      [BUG FIX] Inspection of missing ports was incomplete.

	      [BUG FIX] Origin names with '+' were not correctly treated.

	      [IMPROVED] Inspection of dependencies of installed packages gets
	      faster.

       0.13.0 (28 August 2011)
	      [IMPROVED] Phase of "Order the ports  considering	 dependencies"
	      is accelerated.

       0.12.0 (22 June 2011)
	      [NEW] -q, -d and -N options are added.

	      [CHANGED]	 Settings  for	-x and -s options becomes to be trans‐
	      ferred to restarted runs.

       0.11.0 (17 May 2011)
	      [NEW] Causes of errors are added to the report of failed ports.

	      [CHANGED] Functionality of  -t  option  is  changed  and	partly
	      splitted into -T.

	      [IMPROVED] Refetch after fetch failure becomes smarter so as not
	      to clean up distfiles.

	      [MISC] Terminology 'abort' is corrected to be 'terminate'.

       0.10.0 (11 Mar 2011)
	      [NEW] Version check for temporary database  and  portupgrade  is
	      added (as a template).

	      [BUG FIX] Old packages for ports whose package names was renamed
	      were not deleted.

	      [BUG FIX]	 Duplicated  cleans  were  executed  after  successful
	      installation.

       0.9.8 (02 Mar 2011)
	      [MISC]  Installation methods of non-executable files in Makefile
	      are improved again.

       0.9.7 (02 Mar 2011)
	      [MISC] Installation methods of non-executable files in  Makefile
	      are improved.

       0.9.6 (01 Mar 2011)
	      [BUG FIX] Fix at version 0.9.5 was incomplete.

	      [BUG FIX] The release date of 0.9.5 was wrong in the manpage.

       0.9.5 (28 Feb 2011)
	      [BUG  FIX] "install" target in Makefile installed non-executable
	      files as executables.

       0.9.4 (17 Jan 2011)
	      [BUG FIX] "all" target in Makefile was missing.

       0.9.3 (16 Jan 2011)
	      [MISC] Makefile is modified to compress  manpage	in  the	 build
	      process.

       0.9.2 (10 Jan 2011)
	      [MISC] The 2-Clause BSD License is applied from this version.

	      [NEW] Manpage is created.

	      [NEW] Makefile for installation/uninstallation is added.

	      [BUG FIX] Recovery from distfile checksum error was broken.

       0.9.1 (27 Dec 2010)
	      [BUG FIX] Wrong warning for -p/-P options in the first run.

	      [BUG FIX] Broken support of recursive chase of MOVED ports.

	      [BUG FIX] Option configuration menus were not accessable.

	      [BUG  FIX]  The  mechanism of loading the configuration file was
	      broken.

	      [BUG FIX] Optionally added taboo ports were not always effective
	      in restart.

       0.9.0 (21 Nov 2010)
	      First version.

APPENDIX:  Conditions determining the package system (general specification of
       FreeBSD Ports/Packages)
       The current package system is automatically detected according  to  the
       OS version whose serial number is obtained by
	      sysctl -n kern.osreldate
       and  the	 configuration of /etc/make.conf.  Pkgng is supported for sys‐
       tems with serial numbers of 800505 (just before 8.1-RELEASE) or	later.
       For systems of 1000017 (10-CURRENT) or later, Pkgng is the default.

       In   order  to  choose  pkgng  in  systems  from	 800505	 (just	before
       8.1-RELEASE) to just before 1000017 (10-CURRENT), put
	      WITH_PKGNG=yes
       in /etc/make.conf.

       In order to choose the legacy one in systems of 1000017 (10-CURRENT) or
       later, put
	      WITHOUT_PKGNG=yes
       in /etc/make.conf.

SEE ALSO
       pkg_add(1),  pkg_create(1), pkg_delete(1), pkg_glob(1), portupgrade(1),
       portsdb(1), ports_glob(1), pkgtools.conf(5), ports(7), pkg-add(8), pkg-
       create(8), pkg-delete(8), portmaster(8)

COPYRIGHT
       This software is distributed under the 2-Clause BSD License.

       (C) 2010-2014 Mamoru Sakaue, MwGhennndo, All Rights Reserved.

       Email: sakaue.mamoru@samurai.mwghennn.net

       Homepage: http://www.mwghennndo.com/software/portsreinstall/

FreeBSD				27 January 2015		     PORTSREINSTALL(8)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net