From 0fbce30315a9e3cf8dc8d403c19a3b90ed28b9cf Mon Sep 17 00:00:00 2001 From: Dag-Erling Smørgrav Date: Thu, 15 May 2003 13:12:57 +0000 Subject: 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. --- tools/tools/tinderbox/tbmaster.pl | 12 ++++++------ tools/tools/tinderbox/tinderbox.pl | 20 +++++++++++--------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/tools/tools/tinderbox/tbmaster.pl b/tools/tools/tinderbox/tbmaster.pl index 1e38b890a1d47..1759a3465f738 100644 --- a/tools/tools/tinderbox/tbmaster.pl +++ b/tools/tools/tinderbox/tbmaster.pl @@ -38,7 +38,7 @@ my %CONFIGS = ( # Global settings 'global' => { 'LOGDIR' => '/home/des/public_html', - 'OPTIONS' => [ '--update', '--verbose' ], + 'OPTIONS' => [ '--verbose' ], 'EMAIL' => 'des+%%arch%%-%%branch%%@freebsd.org', 'ENV' => { }, }, @@ -46,7 +46,7 @@ my %CONFIGS = ( 'cueball' => { 'COMMENT' => "-CURRENT tinderbox", 'BRANCHES' => [ 'CURRENT' ], - 'TARGETS' => [ 'world', 'generic', 'lint' ], + 'TARGETS' => [ 'update', 'world', 'generic', 'lint' ], 'ARCHES' => { 'alpha' => [ 'alpha' ], 'i386' => [ 'i386', 'pc98' ], @@ -59,7 +59,7 @@ my %CONFIGS = ( 'triangle' => { 'COMMENT' => "-STABLE tinderbox", 'BRANCHES' => [ 'RELENG_4' ], - 'TARGETS' => [ 'world', 'generic', 'lint' ], + 'TARGETS' => [ 'update', 'world', 'generic', 'lint' ], 'ARCHES' => { 'alpha' => [ 'alpha' ], 'i386' => [ 'i386', 'pc98' ], @@ -73,7 +73,7 @@ my %CONFIGS = ( '9ball' => { 'COMMENT' => "Experimental platforms", 'BRANCHES' => [ 'CURRENT' ], - 'TARGETS' => [ 'world', 'generic', 'lint' ], + 'TARGETS' => [ 'update', 'world', 'generic', 'lint' ], 'ARCHES' => { 'amd64' => [ 'amd64' ], 'powerpc' => [ 'powerpc' ], @@ -87,7 +87,7 @@ my %CONFIGS = ( 'ada' => { 'COMMENT' => "Tinderbox development", 'BRANCHES' => [ 'RELENG_4' ], - 'TARGETS' => [ 'world', 'lint', 'release' ], + 'TARGETS' => [ 'update', 'world', 'lint', 'release' ], 'ARCHES' => { 'i386' => [ 'i386' ], }, @@ -106,7 +106,7 @@ my %CONFIGS = ( 'dwp' => { 'COMMENT' => "Tinderbox development", 'BRANCHES' => [ 'CURRENT' ], - 'TARGETS' => [ 'world', 'lint', 'release' ], + 'TARGETS' => [ 'update', 'world', 'lint', 'release' ], 'ARCHES' => { 'i386' => [ 'i386' ], }, diff --git a/tools/tools/tinderbox/tinderbox.pl b/tools/tools/tinderbox/tinderbox.pl index f623a8ff57485..9f5034645f999 100644 --- a/tools/tools/tinderbox/tinderbox.pl +++ b/tools/tools/tinderbox/tinderbox.pl @@ -35,7 +35,7 @@ use Fcntl qw(:DEFAULT :flock); use POSIX; use Getopt::Long; -my $VERSION = "2.0"; +my $VERSION = "2.1"; my $COPYRIGHT = "Copyright (c) 2003 Dag-Erling Smørgrav. " . "All rights reserved."; @@ -54,6 +54,8 @@ my $verbose; # Verbose mode my %userenv; my %cmds = ( + 'clean' => 0, + 'update' => 0, 'world' => 0, 'generic' => 0, 'lint' => 0, @@ -237,8 +239,6 @@ Usage: $0 [options] [parameters] command [...] Options: - -c, --clean Clean sandbox before building - -u, --update Update sources before building -v, --verbose Verbose mode Parameters: @@ -252,6 +252,8 @@ Parameters: -s, --sandbox=DIR Location of sandbox Commands: + clean Clean the sandbox + update Update the source tree world Build the world generic Build the GENERIC kernel lint Build the LINT kernel @@ -282,14 +284,12 @@ MAIN:{ GetOptions( "a|arch=s" => \$arch, "b|branch=s" => \$branch, - "c|clean" => \$clean, "d|date=s" => \$date, "j|jobs=i" => \$jobs, "l|logfile=s" => \$logfile, "m|machine=s" => \$machine, "r|repository=s" => \$repository, "s|sandbox=s" => \$sandbox, - "u|update" => \$update, "v|verbose+" => \$verbose, ) or usage(); @@ -361,20 +361,22 @@ MAIN:{ $SIG{__WARN__} = \&sigwarn; # Clean up remains from old runs - if ($clean) { - logstage("cleaning up sandbox"); + if ($cmds{'clean'}) { + logstage("cleaning the sandbox"); remove_dir("$sandbox/src") or error("unable to remove old source directory"); remove_dir("$sandbox/obj") or error("unable to remove old object directory"); + remove_dir("$sandbox/root") + or error("unable to remove old chroot directory"); make_dir("$sandbox/obj") or error("$sandbox/obj: $!"); } # Check out new source tree - if ($update) { + if ($cmds{'update'}) { cd("$sandbox"); - logstage("checking out sources"); + logstage("checking out the source tree"); my @cvsargs = ( "-f", "-R", -- cgit v1.3