.\" -*-nroff-*-
.\"
-.\" $Id: sw.1,v 1.3 1999/06/18 18:58:25 mdw Exp $
+.\" $Id: sw.1,v 1.4 1999/06/24 15:52:12 mdw Exp $
.\"
.\" Manual page for `sw'
.\"
.\"----- Revision history ---------------------------------------------------
.\"
.\" $Log: sw.1,v $
+.\" Revision 1.4 1999/06/24 15:52:12 mdw
+.\" Add documentation for the `sw-precommit' script.
+.\"
.\" Revision 1.3 1999/06/18 18:58:25 mdw
.\" Various tidyings.
.\"
file to the installed packages index file
.IB prefix /sw-index\fR.
.PP
-All expected architectures must be built before a commit will work.
+\*(sw performs some checks before committing information to the index
+file. Firstly, all the expected architectures must be successfully
+built. Secondly, the script
+.IB prefix /share/sw-precommit\fR
+is run, if it exists. This script must exit successfully if the commit
+is to proceed. The script can be configured to enforce local policy
+requirements on installed software.
+.PP
+The
+.B sw-precommit
+script is passed a single argument, which is the package name to be
+committed. Other useful information is passed in the environment:
+.TP
+.B SW_PACKAGE
+The package name (again).
+.TP
+.B SW_VERSION
+The package version number.
+.TP
+.B SW_MAINTAINER
+The package's maintainer.
+.TP
+.B SW_DATE
+The last date on whicy the package was modified.
+.TP
+.B SW_ARCHLIST
+The list of architectures on which the package has been built (separated
+by spaces or commas).
+.TP
+.B SW_PREFIX
+The installation prefix with which \*(sw was configured.
+.PP
+The script should report any errors it finds to its standard error
+stream.
.\"
.SS configure \fR[\fIconfigure-arg\fR...]
Equivalent to the command
.BR sw-env (5)
for file format details.
.TP
+.IB prefix /share/sw\-precommit
+Optional script used to approve commit requests. See the
+.B commit
+command above for calling details.
+.BR sw-env (5)
+for file format details.
+.TP
.IB package /.sw\-info
Contains the persistent information about a particular package's build
status. See