2002-10-03 19:41:44 +04:00
|
|
|
.\" $NetBSD: rcorder.8,v 1.5 2002/10/03 15:41:44 wiz Exp $
|
1999-11-19 07:30:55 +03:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1998
|
|
|
|
.\" Perry E. Metzger. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgment:
|
|
|
|
.\" This product includes software developed for the NetBSD Project
|
|
|
|
.\" by Perry E. Metzger.
|
|
|
|
.\" 4. The name of the author may not be used to endorse or promote products
|
|
|
|
.\" derived from this software without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\"
|
2000-07-17 18:16:22 +04:00
|
|
|
.Dd July 17, 2000
|
1999-11-23 08:50:08 +03:00
|
|
|
.Dt RCORDER 8
|
1999-11-19 07:30:55 +03:00
|
|
|
.Os
|
|
|
|
.Sh NAME
|
1999-11-19 09:12:16 +03:00
|
|
|
.Nm rcorder
|
1999-11-19 07:30:55 +03:00
|
|
|
.Nd print a dependency ordering of interdependent files
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2000-07-17 18:16:22 +04:00
|
|
|
.Op Fl k Ar keep
|
|
|
|
.Op Fl s Ar skip
|
1999-11-19 07:30:55 +03:00
|
|
|
.Ar
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
|
|
|
is designed to print out a dependency ordering of a set of
|
2002-10-03 19:41:44 +04:00
|
|
|
interdependent files.
|
|
|
|
Typically it is used to find an execution sequence for a set of
|
|
|
|
shell scripts in which certain files must be executed before others.
|
1999-11-19 07:30:55 +03:00
|
|
|
.Pp
|
|
|
|
Each file passed to
|
|
|
|
.Nm
|
|
|
|
must be annotated with special lines (which look like comments to the
|
|
|
|
shell) which indicate the dependencies the files have upon certain
|
|
|
|
points in the sequence, known as
|
|
|
|
.Dq conditions ,
|
|
|
|
and which indicate, for each file, which
|
|
|
|
.Dq conditions
|
|
|
|
may be expected to be filled by that file.
|
|
|
|
.Pp
|
|
|
|
Within each file, a block containing a series of
|
|
|
|
.Dq REQUIRE ,
|
2000-07-17 18:16:22 +04:00
|
|
|
.Dq PROVIDE ,
|
1999-11-19 07:30:55 +03:00
|
|
|
.Dq BEFORE
|
2000-07-17 18:16:22 +04:00
|
|
|
and
|
|
|
|
.Dq KEYWORD
|
1999-11-19 07:30:55 +03:00
|
|
|
lines must appear.
|
2002-10-03 19:41:44 +04:00
|
|
|
The format of the lines is rigid.
|
|
|
|
Each line must begin with a single
|
1999-11-19 07:30:55 +03:00
|
|
|
.Dq # ,
|
|
|
|
followed by a single space, followed by
|
|
|
|
.Dq PROVIDE: ,
|
2000-07-17 18:16:22 +04:00
|
|
|
.Dq REQUIRE: ,
|
|
|
|
.Dq BEFORE: ,
|
1999-11-19 07:30:55 +03:00
|
|
|
or
|
2000-07-17 18:16:22 +04:00
|
|
|
.Dq KEYWORD: .
|
1999-11-19 07:30:55 +03:00
|
|
|
No deviation is permitted.
|
|
|
|
Each dependency line is then followed by a series of conditions,
|
2002-10-03 19:41:44 +04:00
|
|
|
separated by whitespace.
|
|
|
|
Multiple
|
1999-11-19 07:30:55 +03:00
|
|
|
.Dq PROVIDE ,
|
2000-07-17 18:16:22 +04:00
|
|
|
.Dq REQUIRE ,
|
1999-11-19 07:30:55 +03:00
|
|
|
.Dq BEFORE
|
2000-07-17 18:16:22 +04:00
|
|
|
and
|
|
|
|
.Dq KEYWORD
|
2001-11-16 13:25:42 +03:00
|
|
|
lines may appear, but all such lines must appear in a sequence without
|
1999-11-19 07:30:55 +03:00
|
|
|
any intervening lines, as once a line that does not follow the format
|
|
|
|
is reached, parsing stops.
|
2000-07-17 18:16:22 +04:00
|
|
|
.Pp
|
|
|
|
The options are as follows:
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl k
|
|
|
|
Add the specified keyword to the
|
|
|
|
.Dq keep list .
|
|
|
|
If any
|
|
|
|
.Fl k
|
|
|
|
option is given, only those files containing the matching keyword are listed.
|
|
|
|
.It Fl s
|
|
|
|
Add the specified keyword to the
|
|
|
|
.Dq skip list .
|
|
|
|
If any
|
|
|
|
.Fl s
|
|
|
|
option is given, files containing the matching keyword are not listed.
|
|
|
|
.El
|
1999-11-19 07:30:55 +03:00
|
|
|
.Pp
|
|
|
|
An example block follows:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
# REQUIRE: networking syslog
|
|
|
|
# REQUIRE: usr
|
|
|
|
# PROVIDE: dns nscd
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
This block states that the file in which it appears depends upon the
|
|
|
|
.Dq networking ,
|
|
|
|
.Dq syslog ,
|
|
|
|
and
|
|
|
|
.Dq usr
|
|
|
|
conditions, and provides the
|
|
|
|
.Dq dns
|
|
|
|
and
|
|
|
|
.Dq nscd
|
|
|
|
conditions.
|
|
|
|
.Pp
|
|
|
|
A file may contain zero
|
|
|
|
.Dq PROVIDE
|
|
|
|
lines, in which case it provides no conditions, and may contain zero
|
|
|
|
.Dq REQUIRE
|
|
|
|
lines, in which case it has no dependencies.
|
|
|
|
There must be at least one file with no dependencies in the set of
|
|
|
|
arguments passed to
|
|
|
|
.Nm
|
|
|
|
in order for it to find a starting place in the dependency ordering.
|
|
|
|
.Sh DIAGNOSTICS
|
|
|
|
.Nm
|
|
|
|
may print one of the following error messages and exit with a non-zero
|
|
|
|
status if it encounters an error while processing the file list.
|
|
|
|
.Bl -diag
|
|
|
|
.It "Requirement %s has no providers, aborting."
|
|
|
|
No file has a
|
|
|
|
.Dq PROVIDE
|
|
|
|
line corresponding to a condition present in a
|
|
|
|
.Dq REQUIRE
|
|
|
|
line in another file.
|
|
|
|
.It "Circular dependency on provision %s, aborting."
|
|
|
|
A set of files has a circular dependency which was detected while
|
|
|
|
processing the stated condition.
|
|
|
|
.It "Circular dependency on file %s, aborting."
|
|
|
|
A set of files has a circular dependency which was detected while
|
|
|
|
processing the stated file.
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
2000-07-05 19:45:28 +04:00
|
|
|
.Xr rc 8
|
1999-11-19 07:30:55 +03:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
program first appeared in
|
1999-11-19 12:56:28 +03:00
|
|
|
.Nx 1.5 .
|
1999-11-19 07:30:55 +03:00
|
|
|
.Sh AUTHORS
|
2002-10-03 19:41:44 +04:00
|
|
|
Written by Perry E. Metzger (perry@piermont.com) and
|
|
|
|
Matthew R. Green (mrg@eterna.com.au).
|