A brief comparison of packages vs. ports:
- Faster installation as compared to compiling ports.
- The package is compiled using the default configuration options.
- If the package has language dependencies then the FreeBSD system default versions of those languages are used.
- Slower installation as compared to pre-compiled binary packages.
- Ability to customize configuration options.
- If the port has language dependencies then DEFAULT_VERSIONS of those languages can be specified in /etc/make.conf.
Once a port has been compiled and installed, it is from then on considered a package.
Use portsnap to download as well as update the FreeBSD ports tree.
Internet documentation on portsnap often advises using the manual fetch cron extract update commands. This can be entirely automated with the auto command:
auto Run fetch or cron depending on whether stdin is a terminal; then run update or extract depending on whether portsdir exists.
Checking for Updates
You can keep the ports tree up to date and check for available updates for your installed packages with the following entry in root's crontab.
portsnap auto > /dev/null; pkg version -vPL=
If you are always keeping up to date by installing/upgrading any given LANG port e.g. Perl, Python, etc. to their latest stable release versions, then using the prevailing suggested command
pkg version-vIL= results in unwanted notifications like this:
perl5-5.28.0 > succeeds index (index has 5.26.2)
py37-Babel-2.6.0 ? orphaned: devel/py-babel
py37-Jinja2-2.10 ? orphaned: devel/py-Jinja2
This is because DEFAULT_VERSIONS and FLAVORS you are using on the local system do not necessarily match the versions that are used on the system that created the INDEX file fetched by portsnap.
By default the pkg version command compares installed packages against /usr/ports/INDEX-N file if it exists and/or if you specify the -I option
. Using the -P option instead of the -I option will cause pkg to instead compare your installed ports to the local ports tree and uses your system's locally configured DEFAULT_VERSIONS.
pkg version -vPL=
This method is much more accurate and the output will not contain notices about installed languages and related utilities 'succeeding' or being 'orphaned'.