NAME

brep-clean – clean brep databases

SYNOPSIS

brep-clean --help
brep-clean --version
brep-clean [options] builds buildtab [timeout...]
brep-clean [options] tenants timeout

DESCRIPTION

brep-clean deletes expired package builds from the brep build database or deletes/archives tenants from the brep package database.

The first form considers a build as expired if the corresponding package version is not in the package database, or the configuration is not listed in the buildtab file, or its age is older than the specified timeout for this build toolchain.

Build timeout, if specified, should have the [name=]hours form. Specify zero for hours to make builds for a toolchain to never expire. Omit name (including =) to specify the default timeout. It will apply to all the toolchains that don't have a toolchain-specific timeout.

The second form considers a tenant as expired if its age is older than the specified timeout.

If the --archive option is specified, then the tenant is archived rather than deleted. In this state the tenant packages (and their builds) are still visible in brep but are not (re-)built by build bots.

Note that brep-clean expects the build and package database schemas to have already been created using brep-migrate(1).

OPTIONS

--archive
Archive old tenants.
--db-user user
Database user name. If not specified, then operating system (login) name is used.
--db-password pass
Database password. If not specified, then login without password is expected to work.
--db-name name
Database name. If not specified, then brep_build is used for the first form and brep_package for the second.
--db-host host
Database host name, address, or socket. If not specified, then connect to localhost using the operating system-default mechanism (Unix-domain socket, etc).
--db-port port
Database port number. If not specified, the default port is used.
--pager path
The pager program to be used to show long text. Commonly used pager programs are less and more. You can also specify additional options that should be passed to the pager program with --pager-option. If an empty string is specified as the pager program, then no pager will be used. If the pager program is not explicitly specified, then brep-clean will try to use less. If it is not available, then no pager will be used.
--pager-option opt
Additional option to be passed to the pager program. See --pager for more information on the pager program. Repeat this option to specify multiple pager options.
--help
Print usage information and exit.
--version
Print version and exit.

EXIT STATUS

0
Success.
1
Fatal error.
2
An instance of brep-clean or some other brep utility is already running. Try again.
3
Recoverable database error. Try again.

BUGS

Send bug reports to the users@build2.org mailing list.