.. -*- coding: utf-8; indent-tabs-mode: nil; -*-

fports
======

.. program:: fports


Synopsis
--------

**fports**  **-h**\|\ **--help**

**fports**  **-V**\|\ **--version**

**fports deptree** [**-l** `maxlevel`\|\ **--maxlevel**\=\ `maxlevel`] [**-r**\|\ **--reverse**] [**-t**\|\ **--list**\|\ **--transitive**] `package` ...

**fports detail**  [**-A**] [**-b**\|\ **--nofreebsd**\|\ **--no-freebsd**] [**-n**\|\ **--noauto**\|\ **--no-auto**] [**-m**\|\ **--mapped**] [`package` ...]


Description
-----------

Report and check the version status of installed packages and compare
them to version in remote repositories and the local ports index.

By default (without any option) the status of every package is
printed with respect to repositories that have the package and have
differing versions. This includes the ports INDEX.

:command:`fpkg` provides some subcommands.

This tools is the successor of :manpage:`check-ports(8)`.


Subcommands
-----------

These global options are implemented:

.. option:: -h, --help

   Print a short usage message to stdout and exit.

.. option:: -V, --version

   Print the program name and version number to stdout and exit.


**fports deptree** [**-l** `maxlevel`\|\ **--maxlevel**\=\ `maxlevel`] [**-r**\|\ **--reverse**] [**-t**\|\ **--list**\|\ **--transitive**] `package` ...

  Print a dependency tree for every given `package`. A package tree is
  a hierarchical list of packages that `packages` depends on.

  .. program:: fports deptree

  .. option:: -t, --list, --transitive

     Instead of printing the dependencies as tree print them as a sorted
     list. This list is the transitive closure of all dependencies.

  .. option:: -l <maxlevel>, --maxlevel=<maxlevel>

     Limit the output to sub-levels up to `maxlevel`. To print only
     direct dependencies use a `maxlevel` of `1`.
     Default is 0 (i.e. no limit).

  .. option:: -r, --reverse

     Use reversed dependencies and print the package tree for all packages
     that depend on a given `package`.


**fports detail**  [**-A**] [**-b**\|\ **--nofreebsd**\|\ **--no-freebsd**] [**-n**\|\ **--noauto**\|\ **--no-auto**] [**-m**\|\ **--mapped**] [`package` ...]

  Print the status of all given or selected packages in the most
  detail possible.

  The status of the package is printed with regard to its installation status,
  local index (if it exists) and all configured and active repositories.

  A package mapping is considered also if applicable.
  See :manpage:`package-mapping.conf(5)`.

  .. program:: fports detail

  .. option:: -A

     Shorthand for using :option:`fports detail -b -n -m`.

  .. option:: -b, --nofreebsd, --no-freebsd

     Automatically select all packages that are *not* installed from the
     standard FreeBSD repository.

  .. option:: -n, --noauto, --no-auto

     Automatically select all packages that are *not* installed automatically.

  .. option:: -m, --mapped

     Automatically select all packages that have a package mapping entry
     in :file:`package-mapping.conf`. See :manpage:`package-mapping.conf(5)`.


Environment
-----------

.. envvar:: INDEXDIR

   If set, the directory to search for `INDEXFILE`. If unset,
   :envvar:`PORTSDIR` will be used instead.

.. envvar:: INDEXFILE

   The filename of the ports index, search for in :envvar:`INDEXDIR` or
   :envvar:`PORTSDIR`.
   Default: `INDEX-<N>` where `N` is the OS major version number.

.. envvar:: PORTSDIR

   Specifies the location to the Ports directory.
   Default: :file:`/usr/ports`.

See also :manpage:`pkg(8)`.


Files
-----

:file:`/usr/local/etc/local-bsdtools/package-mapping.conf`

:file:`/usr/local/etc/local-bsdtools/pkgtools.conf`

See also :manpage:`pkg.conf(5)`.


Examples
--------

Report the status of all installed packages with respect to all configured
repositories and the ports index (if available)::

   # check-ports -A
   tdb                                  1.4.3,1           (FreeBSD)
     INDEX          : 1.4.7,1           < needs updating (index has 1.4.7,1)
     FreeBSD        : 1.4.7,1           < needs updating (remote has 1.4.7,1)
     LocalBSDPorts  :                   ?
     SharedLocalRepo:                   ?
     LocalRepo      :                   ?
   teckit                               2.5.11            (FreeBSD)
     INDEX          : 2.5.11            = up-to-date with index
     FreeBSD        : 2.5.11            = up-to-date with remote
     LocalBSDPorts  :                   ?
     SharedLocalRepo:                   ?
     LocalRepo      :                   ?
   tevent                               0.10.2_1          (FreeBSD)
     INDEX          : 0.13.0_1          < needs updating (index has 0.13.0_1)
     FreeBSD        : 0.13.0            < needs updating (remote has 0.13.0)
     LocalBSDPorts  :                   ?
     SharedLocalRepo:                   ?
     LocalRepo      :                   ?
   tex-basic-engines                    20210325          (FreeBSD)
     INDEX          : 20210325          = up-to-date with index
     FreeBSD        : 20210325          = up-to-date with remote
     LocalBSDPorts  :                   ?
     SharedLocalRepo:                   ?
     LocalRepo      :                   ?
   #

Report the status of all installed packages with respect to all configured
repositories that provide the package::

   # check-ports -a
   tdb                                  1.4.3,1           (FreeBSD)
     INDEX          : 1.4.7,1           < needs updating (index has 1.4.7,1)
     FreeBSD        : 1.4.7,1           < needs updating (remote has 1.4.7,1)
   teckit                               2.5.11            (FreeBSD)
     INDEX          : 2.5.11            = up-to-date with index
     FreeBSD        : 2.5.11            = up-to-date with remote
   tevent                               0.10.2_1          (FreeBSD)
     INDEX          : 0.13.0_1          < needs updating (index has 0.13.0_1)
     FreeBSD        : 0.13.0            < needs updating (remote has 0.13.0)
   tex-basic-engines                    20210325          (FreeBSD)
     INDEX          : 20210325          = up-to-date with index
     FreeBSD        : 20210325          = up-to-date with remote
   #

The standard output considers installed packages with versions that differ in any of
the configured repositories *including*  a ports INDEX::

   # check-ports
   tdb                                  1.4.3,1           (FreeBSD)
     INDEX          : 1.4.7,1           < needs updating (index has 1.4.7,1)
     FreeBSD        : 1.4.7,1           < needs updating (remote has 1.4.7,1)
   tevent                               0.10.2_1          (FreeBSD)
     INDEX          : 0.13.0_1          < needs updating (index has 0.13.0_1)
     FreeBSD        : 0.13.0            < needs updating (remote has 0.13.0)
   tex-xetex                            0.99993_1         (FreeBSD)
     INDEX          : 0.99993_2         < needs updating (index has 0.99993_2)
     FreeBSD        : 0.99993_1         = up-to-date with remote
   texlive-base                         20210325_5        (FreeBSD)
     INDEX          : 20210325_10       < needs updating (index has 20210325_10)
     FreeBSD        : 20210325_8        < needs updating (remote has 20210325_8)
   #

The effect of an additional :option:`-v` on :command:`check-ports` is::

   # check-ports -v
   tdb                                  1.4.3,1           (FreeBSD)
     INDEX          : 1.4.7,1           < needs updating (index has 1.4.7,1)
     FreeBSD        : 1.4.7,1           < needs updating (remote has 1.4.7,1)
   teckit                               2.5.11            (FreeBSD)
   tevent                               0.10.2_1          (FreeBSD)
     INDEX          : 0.13.0_1          < needs updating (index has 0.13.0_1)
     FreeBSD        : 0.13.0            < needs updating (remote has 0.13.0)
   tex-basic-engines                    20210325          (FreeBSD)
   tex-dvipdfmx                         20210325          (FreeBSD)
   tex-dvipsk                           2021.1            (FreeBSD)
   tex-formats                          20210325_1        (FreeBSD)
   tex-jadetex                          3.13_4            (FreeBSD)
   tex-kpathsea                         6.3.3             (FreeBSD)
   tex-libtexlua                        5.3.6             (FreeBSD)
   tex-libtexluajit                     2.1.0             (FreeBSD)
   tex-luatex                           1.12.0            (FreeBSD)
   tex-ptexenc                          1.3.9             (FreeBSD)
   tex-synctex                          2.0.0_1           (FreeBSD)
   tex-web2c                            20210325          (FreeBSD)
   tex-xdvik                            22.87.06          (FreeBSD)
   tex-xetex                            0.99993_1         (FreeBSD)
     INDEX          : 0.99993_2         < needs updating (index has 0.99993_2)
     FreeBSD        : 0.99993_1         = up-to-date with remote
   tex-xmltex                           1.9_3             (FreeBSD)
   texlive-base                         20210325_5        (FreeBSD)
     INDEX          : 20210325_10       < needs updating (index has 20210325_10)
     FreeBSD        : 20210325_8        < needs updating (remote has 20210325_8)
   #

The :option:`-s` suppresses the output if only the version of a ports INDEX differs::

   # check-ports -s
   tdb                                  1.4.3,1           (FreeBSD)
     INDEX          : 1.4.7,1           < needs updating (index has 1.4.7,1)
     FreeBSD        : 1.4.7,1           < needs updating (remote has 1.4.7,1)
   tevent                               0.10.2_1          (FreeBSD)
     INDEX          : 0.13.0_1          < needs updating (index has 0.13.0_1)
     FreeBSD        : 0.13.0            < needs updating (remote has 0.13.0)
   texlive-base                         20210325_5        (FreeBSD)
     INDEX          : 20210325_10       < needs updating (index has 20210325_10)
     FreeBSD        : 20210325_8        < needs updating (remote has 20210325_8)
   #

The effect of an additional :option:`-v` on :command:`checkports -s` is::

   # check-ports -sv
   tdb                                  1.4.3,1           (FreeBSD)
     INDEX          : 1.4.7,1           < needs updating (index has 1.4.7,1)
     FreeBSD        : 1.4.7,1           < needs updating (remote has 1.4.7,1)
   teckit                               2.5.11            (FreeBSD)
   tevent                               0.10.2_1          (FreeBSD)
     INDEX          : 0.13.0_1          < needs updating (index has 0.13.0_1)
     FreeBSD        : 0.13.0            < needs updating (remote has 0.13.0)
   tex-basic-engines                    20210325          (FreeBSD)
   tex-dvipdfmx                         20210325          (FreeBSD)
   tex-dvipsk                           2021.1            (FreeBSD)
   tex-formats                          20210325_1        (FreeBSD)
   tex-jadetex                          3.13_4            (FreeBSD)
   tex-kpathsea                         6.3.3             (FreeBSD)
   tex-libtexlua                        5.3.6             (FreeBSD)
   tex-libtexluajit                     2.1.0             (FreeBSD)
   tex-luatex                           1.12.0            (FreeBSD)
   tex-ptexenc                          1.3.9             (FreeBSD)
   tex-synctex                          2.0.0_1           (FreeBSD)
   tex-web2c                            20210325          (FreeBSD)
   tex-xdvik                            22.87.06          (FreeBSD)
   tex-xetex                            0.99993_1         (FreeBSD)
   tex-xmltex                           1.9_3             (FreeBSD)
   texlive-base                         20210325_5        (FreeBSD)
     INDEX          : 20210325_10       < needs updating (index has 20210325_10)
     FreeBSD        : 20210325_8        < needs updating (remote has 20210325_8)
   #


See Also
--------

:manpage:`fpkg(8)`, :manpage:`check-ports(8)`,
:manpage:`pkgtools.conf(5)`, :manpage:`package-mapping.conf(5)`
