    VERVERVER
    ---------

The ververver program implements a software package version
compatibility system.  It is designed to be run automatically by
Makefiles to check whether it's ok to install a given package and to
update information about what packages are installed.  The data file
that is input to the system for each package allows the package to
claim to be backwards-compatible with any number of versions of the
package, specify any number of prerequisites, either package names or
package and version pairs, and any number of other packages or package
and version pairs with which it is incompatible.  Version labels are
arbitrary printable non-space ASCII strings; package names are the
same with the additional restriction that slashes are disallowed.

The database is kept in an easy-to-read format.  In a database
directory, there is a file for each package that is installed with the
name of the package as its filename.  The body of the file consists of
a set of version labels, one per line.  The versions are the version
number of the installed version and any versions with which it claims
to be backward compatible.  For example, if it contained 1.2, 1.3, and
1.4, that would indicate that the given package will function with
anything expecting versions 1.2, 1.3, or 1.4.  Besides being easy to
read, this format makes it possible to use patchfiles with a
``prereq:'' line to demand particular versions be installed according
to this database.

The ververver program is called as follows:

    ververver <flag> <package-name> <data-file> <installed-data-dir>

The <package-name> can be any valid package name label.  <data-file>
is the file in which the information for <package-name> can be read.
<installed-data-dir> is the directory containing the database of
already installed packages.  <flag> is either -check, -install, or
-deinstall.

The -check flag just checks to see if it would be ok to install
<package-name>.  If so, a normal return code (zero) is returned and
nothing is printed.  If not, an error return code (one) is returned,
and messages are written to standard error explaining all the
conflicts.

The -install flag first does what -check would do, and if that fails,
it just returns a failure error code (and prints out all the error
message -check would).  If the check succeeds, the information that
<package-name> is installed is entered into the database.

The -deinstall flag changes the database to reflect the fact that
<package-name> is no longer installed.

The <data-file> uses the following format.  All lines begining with
``#'' or whitespace followed by ``#'' are comments and are ignored, as
are lines containing only whitespace.
The rest of the file is divided into lines.  Each line is broken into
words by whitespace.  It is illegal to have any non-printing
characters in these words.  There are three kinds of lines that are
meaningful to ververver; they are lines begining with one of these
three words: ``compatibility:'', ``incompatibility:'', or
``prerequisite:'' (note that the colons are parts of the words).  For
``compatibility:'' lines, each of the rest of the words in the line is
taken as a version label and the package is assumed to be
backward-compatible with the given version number.  For
``incompatibility:'' lines, each of the rest of the words in the line
is taken as either a package name (if it contains no slash character)
or a package name and version label separated by a slash.  The package
name alone means that any version of that package is incompatible with
this one; a package name and version means only that version of the
package is incompatible with this package.  Finally, for
``prerequisite:'' lines, each subsequent word is taken as a package
name or package name and version pair, as for ``incompatibility:''
lines, but this time it specifies a package which must be installed
before this package may be.  Note that there can be any number of any
of these lines in any order in the file.

Here's an example:

    compatibility: 1.2 1.3 1.4
    incompatibility: varpar bbpar/3.5 bbpar/3.7
    prerequisite: suif/1.2 builder/3.4

The first line says that the given package can act like any of
versions 1.2, 1.3, or 1.4 for the sake of other packages requiring any
of those.  The second line says that the given package may not be
installed if any version of the varpar package is installed or if
version 3.5 or 3.7 of bbpar is installed.  The last line says that
before this package can be installed, version 1.2 of the suif package
and version 3.4 of the builder package is required.

The ververver program is written entirely in ANSI C, so it should be
quite portable.

        --Chris Wilson <cwilson@cs.stanford.edu> 12/8/1995
