From 4f71fd6ca62c1e6f218bb52e9fa9dc35340f4e99 Mon Sep 17 00:00:00 2001 From: mdw Date: Thu, 24 Jun 1999 15:52:12 +0000 Subject: [PATCH] Add documentation for the `sw-precommit' script. --- sw.1 | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/sw.1 b/sw.1 index e92cebe..e15f990 100644 --- a/sw.1 +++ b/sw.1 @@ -1,6 +1,6 @@ .\" -*-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' .\" @@ -27,6 +27,9 @@ .\"----- 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. .\" @@ -594,7 +597,40 @@ Writes information from the 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 @@ -959,6 +995,13 @@ Contains global environment variable settings. See .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 -- 2.11.0