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

check-ports
===========

Synopsis
--------

**check-ports -hV**

**check-ports** **-n** `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.

.. program:: check-ports

.. option:: -h

   Print a short usage message to stdout and exit.

.. option:: -V

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

.. option:: -A

   Print for every package the status of all repositories.

.. option:: -a

   Print the data of all repos that have the package.

.. option:: -n

   Print the status of given packages in `package` in all details.
   No other options are respected.

.. option:: -s

   Print the status of all packages that need some attention;
   version differences with regard to the ports INDEX only are to be ignored.

.. option:: -v

   Print the title and repository of every installed package always.


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


Files
-----

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

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


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)`
