Make 'clean' and 'update' commands rather than options. Invoke 'update'

(but not 'clean') in all setups.  Bump tinderbox.pl version to 2.1, mostly
for the 'release' command added in the previous commit.
This commit is contained in:
Dag-Erling Smørgrav 2003-05-15 13:12:57 +00:00
parent 9aad97c0eb
commit 0fbce30315
2 changed files with 17 additions and 15 deletions

View File

@ -38,7 +38,7 @@ my %CONFIGS = (
# Global settings # Global settings
'global' => { 'global' => {
'LOGDIR' => '/home/des/public_html', 'LOGDIR' => '/home/des/public_html',
'OPTIONS' => [ '--update', '--verbose' ], 'OPTIONS' => [ '--verbose' ],
'EMAIL' => 'des+%%arch%%-%%branch%%@freebsd.org', 'EMAIL' => 'des+%%arch%%-%%branch%%@freebsd.org',
'ENV' => { }, 'ENV' => { },
}, },
@ -46,7 +46,7 @@ my %CONFIGS = (
'cueball' => { 'cueball' => {
'COMMENT' => "-CURRENT tinderbox", 'COMMENT' => "-CURRENT tinderbox",
'BRANCHES' => [ 'CURRENT' ], 'BRANCHES' => [ 'CURRENT' ],
'TARGETS' => [ 'world', 'generic', 'lint' ], 'TARGETS' => [ 'update', 'world', 'generic', 'lint' ],
'ARCHES' => { 'ARCHES' => {
'alpha' => [ 'alpha' ], 'alpha' => [ 'alpha' ],
'i386' => [ 'i386', 'pc98' ], 'i386' => [ 'i386', 'pc98' ],
@ -59,7 +59,7 @@ my %CONFIGS = (
'triangle' => { 'triangle' => {
'COMMENT' => "-STABLE tinderbox", 'COMMENT' => "-STABLE tinderbox",
'BRANCHES' => [ 'RELENG_4' ], 'BRANCHES' => [ 'RELENG_4' ],
'TARGETS' => [ 'world', 'generic', 'lint' ], 'TARGETS' => [ 'update', 'world', 'generic', 'lint' ],
'ARCHES' => { 'ARCHES' => {
'alpha' => [ 'alpha' ], 'alpha' => [ 'alpha' ],
'i386' => [ 'i386', 'pc98' ], 'i386' => [ 'i386', 'pc98' ],
@ -73,7 +73,7 @@ my %CONFIGS = (
'9ball' => { '9ball' => {
'COMMENT' => "Experimental platforms", 'COMMENT' => "Experimental platforms",
'BRANCHES' => [ 'CURRENT' ], 'BRANCHES' => [ 'CURRENT' ],
'TARGETS' => [ 'world', 'generic', 'lint' ], 'TARGETS' => [ 'update', 'world', 'generic', 'lint' ],
'ARCHES' => { 'ARCHES' => {
'amd64' => [ 'amd64' ], 'amd64' => [ 'amd64' ],
'powerpc' => [ 'powerpc' ], 'powerpc' => [ 'powerpc' ],
@ -87,7 +87,7 @@ my %CONFIGS = (
'ada' => { 'ada' => {
'COMMENT' => "Tinderbox development", 'COMMENT' => "Tinderbox development",
'BRANCHES' => [ 'RELENG_4' ], 'BRANCHES' => [ 'RELENG_4' ],
'TARGETS' => [ 'world', 'lint', 'release' ], 'TARGETS' => [ 'update', 'world', 'lint', 'release' ],
'ARCHES' => { 'ARCHES' => {
'i386' => [ 'i386' ], 'i386' => [ 'i386' ],
}, },
@ -106,7 +106,7 @@ my %CONFIGS = (
'dwp' => { 'dwp' => {
'COMMENT' => "Tinderbox development", 'COMMENT' => "Tinderbox development",
'BRANCHES' => [ 'CURRENT' ], 'BRANCHES' => [ 'CURRENT' ],
'TARGETS' => [ 'world', 'lint', 'release' ], 'TARGETS' => [ 'update', 'world', 'lint', 'release' ],
'ARCHES' => { 'ARCHES' => {
'i386' => [ 'i386' ], 'i386' => [ 'i386' ],
}, },

View File

@ -35,7 +35,7 @@ use Fcntl qw(:DEFAULT :flock);
use POSIX; use POSIX;
use Getopt::Long; use Getopt::Long;
my $VERSION = "2.0"; my $VERSION = "2.1";
my $COPYRIGHT = "Copyright (c) 2003 Dag-Erling Smørgrav. " . my $COPYRIGHT = "Copyright (c) 2003 Dag-Erling Smørgrav. " .
"All rights reserved."; "All rights reserved.";
@ -54,6 +54,8 @@ my $verbose; # Verbose mode
my %userenv; my %userenv;
my %cmds = ( my %cmds = (
'clean' => 0,
'update' => 0,
'world' => 0, 'world' => 0,
'generic' => 0, 'generic' => 0,
'lint' => 0, 'lint' => 0,
@ -237,8 +239,6 @@ Usage:
$0 [options] [parameters] command [...] $0 [options] [parameters] command [...]
Options: Options:
-c, --clean Clean sandbox before building
-u, --update Update sources before building
-v, --verbose Verbose mode -v, --verbose Verbose mode
Parameters: Parameters:
@ -252,6 +252,8 @@ Parameters:
-s, --sandbox=DIR Location of sandbox -s, --sandbox=DIR Location of sandbox
Commands: Commands:
clean Clean the sandbox
update Update the source tree
world Build the world world Build the world
generic Build the GENERIC kernel generic Build the GENERIC kernel
lint Build the LINT kernel lint Build the LINT kernel
@ -282,14 +284,12 @@ MAIN:{
GetOptions( GetOptions(
"a|arch=s" => \$arch, "a|arch=s" => \$arch,
"b|branch=s" => \$branch, "b|branch=s" => \$branch,
"c|clean" => \$clean,
"d|date=s" => \$date, "d|date=s" => \$date,
"j|jobs=i" => \$jobs, "j|jobs=i" => \$jobs,
"l|logfile=s" => \$logfile, "l|logfile=s" => \$logfile,
"m|machine=s" => \$machine, "m|machine=s" => \$machine,
"r|repository=s" => \$repository, "r|repository=s" => \$repository,
"s|sandbox=s" => \$sandbox, "s|sandbox=s" => \$sandbox,
"u|update" => \$update,
"v|verbose+" => \$verbose, "v|verbose+" => \$verbose,
) or usage(); ) or usage();
@ -361,20 +361,22 @@ MAIN:{
$SIG{__WARN__} = \&sigwarn; $SIG{__WARN__} = \&sigwarn;
# Clean up remains from old runs # Clean up remains from old runs
if ($clean) { if ($cmds{'clean'}) {
logstage("cleaning up sandbox"); logstage("cleaning the sandbox");
remove_dir("$sandbox/src") remove_dir("$sandbox/src")
or error("unable to remove old source directory"); or error("unable to remove old source directory");
remove_dir("$sandbox/obj") remove_dir("$sandbox/obj")
or error("unable to remove old object directory"); or error("unable to remove old object directory");
remove_dir("$sandbox/root")
or error("unable to remove old chroot directory");
make_dir("$sandbox/obj") make_dir("$sandbox/obj")
or error("$sandbox/obj: $!"); or error("$sandbox/obj: $!");
} }
# Check out new source tree # Check out new source tree
if ($update) { if ($cmds{'update'}) {
cd("$sandbox"); cd("$sandbox");
logstage("checking out sources"); logstage("checking out the source tree");
my @cvsargs = ( my @cvsargs = (
"-f", "-f",
"-R", "-R",