Bug 363108: allow patcher's --build-tools to pull from something other than the trunk head; r=rhelmer

This commit is contained in:
preed%mozilla.com 2007-02-27 23:28:36 +00:00
Родитель 8a159231d3
Коммит 3d83223223
2 изменённых файлов: 19 добавлений и 3 удалений

Просмотреть файл

@ -113,7 +113,7 @@ sub ProcessCommandLineArgs
Getopt::Long::GetOptions(\%args,
'help|h|?', 'man', 'version', 'app=s', 'config=s', 'verbose',
'dry-run', 'tools-dir=s', 'download-dir=s', 'deliverable-dir=s',
@RUN_MODES)
'tools-revision=s', @RUN_MODES)
or return 0;
$this->{'mConfigFilename'} = defined($args{'config'}) ? $args{'config'} :
@ -143,6 +143,10 @@ sub ProcessCommandLineArgs
}
}
# the tag we would use for pulling the mozilla tree in BuildTools()
$this->{'mToolsRevision'} = defined($args{'tools-revision'}) ?
$args{'tools-revision'} : 'HEAD';
$this->{'run'} = [];
foreach my $mode (@RUN_MODES) {
@ -753,4 +757,10 @@ sub IsDryRun
return 1 == $this->{'dryRun'};
}
sub GetToolsRevision
{
my $this = shift;
return $this->{'mToolsRevision'};
}
1;

Просмотреть файл

@ -146,6 +146,7 @@ sub BuildTools {
my %args = @_;
my $config = $args{'config'};
my $codir = $config->GetToolsDir();
my $toolsRevision = $config->GetToolsRevision();
my $startdir = getcwd();
@ -165,9 +166,13 @@ sub BuildTools {
}
{ # Checkout 'client.mk'.
printf("Checking out 'client.mk'... \n");
printf("Checking out 'client.mk' from $toolsRevision... \n");
my $cvsroot = $ENV{'CVSROOT'} || $DEFAULT_CVSROOT;
my $checkoutArgs = ["-d$cvsroot", 'co', 'mozilla/client.mk'];
my $checkoutArgs = ["-d$cvsroot", 'co',
'-r' . $toolsRevision,
'mozilla/client.mk'];
my $rv = RunShellCommand(command => 'cvs',
args => $checkoutArgs,
output => 1);
@ -191,6 +196,7 @@ sub BuildTools {
# bug 329686 gets fixed.
$mozconfig = "mk_add_options MOZ_CO_PROJECT=all\n";
$mozconfig .= "mk_add_options MOZ_CO_TAG=$toolsRevision\n";
$mozconfig .= "ac_add_options --enable-application=tools/update-packaging\n";
# these aren't required and introduce more dependencies
$mozconfig .= "ac_add_options --disable-dbus\n";