=Name

pkg_noisrev--a fast way to summarize installed versions of FreeBSD packages.

==Synopsis

pkg_noisrev [options]

==Description

The pkg_noisrev utility is a very fast version of pkg_version program that ships with FreeBSD. Consider the example from virtualized FreeBSD 8.2 (with 696 installed packages) where virtual hdd is a main performance bottle neck:

% time pkg_version [...] 21.006u 68.076s 1:59.73 74.3% 403+713k 1155+0io 3pf+0w

% time pkg_noisrev [...] 12.261u 10.249s 0:26.29 85.5% 95+1128k 0+0io 0pf+0w

pkg_noisrev is basically ~ 4.6 times faster. It achieves this speed by doing its work in several parallel threads + making some not-so-interesting tricks of extracting version strings from Makefiles.

pkg_noisrev also adds filtering to the output, thus you can, for example, only see out of sync packages. If you are a portmaster user, you may like --likeportmaster option (I do!).

The options are as follows:

--config-dirs

List all possible locations for the configuration file. The first found wins.

--config NAME

The name of the configuration file. If it contains / in it, the list from --config-dirs is ignored.

-V

Show version and exit.

-v

Tries to create a log in /tmp/pkg_noisrev.log file.

--pkg-dir STR

Set the alternate package db directory.

--ports-dir STR

Set the alternate ports db directory.

--outofsync

Filter all but out of sync packages.

--missing

Filter all but packages that doesn't exists in ports.

--likeportmaster

Print like (but not quite) "portmaster -L".

==Installation

(Only if you are not installing the gem.)

pkg_noisrev ships with a shared library (the comparator of a 2 versions-as-a-string that was extracted from pkg_version sources) which must be compiled before you can use the program.

cd to a directory with pkg_noisrev sources and type:

% rake mydll:default

Then run bin/pkg_noisrev or make a symlink to it in one of your directories in PATH.

==Configuration

pkg_noisrev looks for its configuration at 3 places at start up.

  1. At PKG_NOISREV_CONF env variable. (Its format is exactly similar to CL options.)

  2. At the configuration file. Its default name is pkg_noisrev.yaml and it can be stored in several system directories which are observable by --config--dirs CL option.

  3. At command line.

Higher number levels overrides the values from lower number levels.

The configuration file must be in YAML format. Look into gem env gemdir/gems/pkg_noisrev-x.y.z/etc/ directory for samples.

==Examples

% ri Pkg_noisrev % pkg_noisrev --likeportmaster % pkg_noisrev --outofsync % pkg_noisrev --missing --likeportmaster