b=391958 r=rhelmer - backing uot (again) pending fixes for bug 375415

This commit is contained in:
ccooper@deadsquid.com 2008-01-07 20:24:46 -08:00
Родитель 044e09f0e0
Коммит 2687eb6a83
3 изменённых файлов: 9 добавлений и 45 удалений

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

@ -113,7 +113,7 @@ sub ProcessCommandLineArgs
Getopt::Long::GetOptions(\%args, Getopt::Long::GetOptions(\%args,
'help|h|?', 'man', 'version', 'app=s', 'config=s', 'verbose', 'help|h|?', 'man', 'version', 'app=s', 'config=s', 'verbose',
'dry-run', 'tools-dir=s', 'download-dir=s', 'deliverable-dir=s', 'dry-run', 'tools-dir=s', 'download-dir=s', 'deliverable-dir=s',
'tools-revision=s', 'partial-patchlist-file=s', @RUN_MODES) 'tools-revision=s', @RUN_MODES)
or return 0; or return 0;
$this->{'mConfigFilename'} = defined($args{'config'}) ? $args{'config'} : $this->{'mConfigFilename'} = defined($args{'config'}) ? $args{'config'} :
@ -127,7 +127,6 @@ sub ProcessCommandLineArgs
$args{'mDownloadDir'} : $DEFAULT_DOWNLOAD_DIR; $args{'mDownloadDir'} : $DEFAULT_DOWNLOAD_DIR;
$this->{'mDeliverableDir'} = defined($args{'mDeliverableDir'}) ? $this->{'mDeliverableDir'} = defined($args{'mDeliverableDir'}) ?
$args{'mDeliverableDir'} : $DEFAULT_DELIVERABLE_DIR; $args{'mDeliverableDir'} : $DEFAULT_DELIVERABLE_DIR;
$this->{'mPartialPatchlistFile'} = defined($args{'partial-patchlist-file'}) ? $args{'partial-patchlist-file'} : undef;
# Is this a dry run, and we'll just print what we *would* do? # Is this a dry run, and we'll just print what we *would* do?
$this->{'dryRun'} = defined($args{'dryRun'}) ? 1 : 0; $this->{'dryRun'} = defined($args{'dryRun'}) ? 1 : 0;

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

@ -71,7 +71,6 @@ use strict;
use vars qw($MAR_BIN $MBSDIFF_BIN $MAKE_BIN use vars qw($MAR_BIN $MBSDIFF_BIN $MAKE_BIN
$INCREMENTAL_UPDATE_BIN $UNWRAP_FULL_UPDATE_BIN $INCREMENTAL_UPDATE_BIN $UNWRAP_FULL_UPDATE_BIN
$FAST_INCREMENTAL_UPDATE_BIN
$TMPDIR_PREFIX $TMPDIR_PREFIX
%BOUNCER_PLATFORMS %AUS2_PLATFORMS %BOUNCER_PLATFORMS %AUS2_PLATFORMS
$DEFAULT_PARTIAL_MAR_OUTPUT_FILE $DEFAULT_PARTIAL_MAR_OUTPUT_FILE
@ -82,7 +81,6 @@ $MAR_BIN = 'dist/host/bin/mar';
$MBSDIFF_BIN = 'dist/host/bin/mbsdiff'; $MBSDIFF_BIN = 'dist/host/bin/mbsdiff';
$INCREMENTAL_UPDATE_BIN = 'tools/update-packaging/make_incremental_update.sh'; $INCREMENTAL_UPDATE_BIN = 'tools/update-packaging/make_incremental_update.sh';
$FAST_INCREMENTAL_UPDATE_BIN = 'tools/update-packaging/make_incremental_updates.py';
$UNWRAP_FULL_UPDATE_BIN = 'tools/update-packaging/unwrap_full_update.pl'; $UNWRAP_FULL_UPDATE_BIN = 'tools/update-packaging/unwrap_full_update.pl';
$MAKE_BIN = '/usr/bin/make'; $MAKE_BIN = '/usr/bin/make';
@ -163,7 +161,6 @@ sub ValidateToolsDirectory
return (-d $binPrefix and return (-d $binPrefix and
-x "$binPrefix/$MAR_BIN" and -x "$binPrefix/$MAR_BIN" and
-x "$binPrefix/$MBSDIFF_BIN" and -x "$binPrefix/$MBSDIFF_BIN" and
-x "$binPrefix/$FAST_INCREMENTAL_UPDATE_BIN" and
-x "$binPrefix/$INCREMENTAL_UPDATE_BIN" and -x "$binPrefix/$INCREMENTAL_UPDATE_BIN" and
-x "$binPrefix/$UNWRAP_FULL_UPDATE_BIN"); -x "$binPrefix/$UNWRAP_FULL_UPDATE_BIN");
} }

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

@ -95,7 +95,6 @@ sub main {
PrintUsage(exitCode => 1) if ($config eq undef); PrintUsage(exitCode => 1) if ($config eq undef);
if (not $config->RequestedStep('build-tools') and if (not $config->RequestedStep('build-tools') and
not ValidateToolsDirectory(toolsDir => $config->GetToolsDir())) { not ValidateToolsDirectory(toolsDir => $config->GetToolsDir())) {
my $badDir = $config->GetToolsDir(); my $badDir = $config->GetToolsDir();
@ -468,17 +467,11 @@ sub CreateCompletePatches {
return $i; return $i;
} # create_complete_patches } # create_complete_patches
sub CreatePartialPatches { sub CreatePartialPatches {
my %args = @_; my %args = @_;
my $config = $args{'config'}; my $config = $args{'config'};
my $useFastPatcher = defined($config->{'mPartialPatchlistFile'});
if ($useFastPatcher) {
print STDERR "fast patcher on!\n";
open(PARTIAL_PATCHLIST_FILE, ">$config->{'mPartialPatchlistFile'}")
or die "open() of $config->{'mPartialPatchlistFile'} failed: $!";
}
my $update = $config->GetCurrentUpdate(); my $update = $config->GetCurrentUpdate();
my $total = 0; my $total = 0;
@ -539,15 +532,6 @@ sub CreatePartialPatches {
if ( -f $from_path and if ( -f $from_path and
-f $to_path and -f $to_path and
! -e $partial_pathname ) { ! -e $partial_pathname ) {
if ($useFastPatcher) {
$partial_pathname =~ m/^(.*)\/[^\/]*$/g;
print PARTIAL_PATCHLIST_FILE
getcwd() . '/' . $from_path . ',' . getcwd() . '/'
. $to_path . ',' . getcwd() . '/' .
$partial_pathname . ',' .
Data::Dumper::Dumper($forcedUpdateList);
} else {
my $start_time = time(); my $start_time = time();
PrintProgress(total => $total, current => $i, PrintProgress(total => $total, current => $i,
@ -564,7 +548,7 @@ sub CreatePartialPatches {
die 'Partial mar creation failed (see error above?); ' . die 'Partial mar creation failed (see error above?); ' .
'aborting.'; 'aborting.';
} }
print $partial_pathname."\n\n";
# rename partial.mar to the expected result # rename partial.mar to the expected result
$partial_pathname =~ m/^(.*)\/[^\/]*$/g; $partial_pathname =~ m/^(.*)\/[^\/]*$/g;
my $partial_pathname_parent = $1; my $partial_pathname_parent = $1;
@ -578,36 +562,20 @@ sub CreatePartialPatches {
printf("done (" . $total_time . "s)\n"); printf("done (" . $total_time . "s)\n");
} }
#last if $i > 2;
#$i++;
select(undef, undef, undef, 0.5);
} }
#last;
} }
} #last;
} }
#printf("%s", Data::Dumper::Dumper($u_config)); #printf("%s", Data::Dumper::Dumper($u_config));
chdir($startdir); chdir($startdir);
if ($useFastPatcher) {
close(PARTIAL_PATCHLIST_FILE);
# -u turns of output buffering so we get real-time updates
my $fastIncrementalUpdateBinary =
catfile($config->GetToolsDir(), 'mozilla',
$MozAUSLib::FAST_INCREMENTAL_UPDATE_BIN);
my $args = ['-u', $fastIncrementalUpdateBinary, '-f',
$config->{'mPartialPatchlistFile'}];
my $rv = RunShellCommand(command => 'python',
args => $args,
output => 1);
if ($rv->{'exitValue'} != 0) {
die "FAILED: make_incremental_updates.py: $rv->{'exitValue'}, " .
"output: $rv->{'output'}\n";
}
}
if (defined($total)) { if (defined($total)) {
printf("\n"); printf("\n");
} }