зеркало из https://github.com/mozilla/pjs.git
- revert partial patch improvements until after 2.0.0.11
This commit is contained in:
Родитель
45a5cf86de
Коммит
847d7ff2be
|
@ -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',
|
||||
'tools-revision=s', 'partial-patchlist-file=s', @RUN_MODES)
|
||||
'tools-revision=s', @RUN_MODES)
|
||||
or return 0;
|
||||
|
||||
$this->{'mConfigFilename'} = defined($args{'config'}) ? $args{'config'} :
|
||||
|
@ -127,7 +127,6 @@ sub ProcessCommandLineArgs
|
|||
$args{'mDownloadDir'} : $DEFAULT_DOWNLOAD_DIR;
|
||||
$this->{'mDeliverableDir'} = defined($args{'mDeliverableDir'}) ?
|
||||
$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?
|
||||
$this->{'dryRun'} = defined($args{'dryRun'}) ? 1 : 0;
|
||||
|
|
|
@ -71,7 +71,6 @@ use strict;
|
|||
|
||||
use vars qw($MAR_BIN $MBSDIFF_BIN $MAKE_BIN
|
||||
$INCREMENTAL_UPDATE_BIN $UNWRAP_FULL_UPDATE_BIN
|
||||
$FAST_INCREMENTAL_UPDATE_BIN
|
||||
$TMPDIR_PREFIX
|
||||
%BOUNCER_PLATFORMS %AUS2_PLATFORMS
|
||||
$DEFAULT_PARTIAL_MAR_OUTPUT_FILE
|
||||
|
@ -82,7 +81,6 @@ $MAR_BIN = 'dist/host/bin/mar';
|
|||
$MBSDIFF_BIN = 'dist/host/bin/mbsdiff';
|
||||
|
||||
$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';
|
||||
|
||||
$MAKE_BIN = '/usr/bin/make';
|
||||
|
@ -163,7 +161,6 @@ sub ValidateToolsDirectory
|
|||
return (-d $binPrefix and
|
||||
-x "$binPrefix/$MAR_BIN" and
|
||||
-x "$binPrefix/$MBSDIFF_BIN" and
|
||||
-x "$binPrefix/$FAST_INCREMENTAL_UPDATE_BIN" and
|
||||
-x "$binPrefix/$INCREMENTAL_UPDATE_BIN" and
|
||||
-x "$binPrefix/$UNWRAP_FULL_UPDATE_BIN");
|
||||
}
|
||||
|
|
|
@ -461,17 +461,11 @@ sub CreateCompletePatches {
|
|||
return $i;
|
||||
} # create_complete_patches
|
||||
|
||||
|
||||
sub CreatePartialPatches {
|
||||
my %args = @_;
|
||||
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 $total = 0;
|
||||
|
@ -532,15 +526,6 @@ sub CreatePartialPatches {
|
|||
if ( -f $from_path and
|
||||
-f $to_path and
|
||||
! -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();
|
||||
|
||||
PrintProgress(total => $total, current => $i,
|
||||
|
@ -557,7 +542,7 @@ sub CreatePartialPatches {
|
|||
die 'Partial mar creation failed (see error above?); ' .
|
||||
'aborting.';
|
||||
}
|
||||
print $partial_pathname."\n\n";
|
||||
|
||||
# rename partial.mar to the expected result
|
||||
$partial_pathname =~ m/^(.*)\/[^\/]*$/g;
|
||||
my $partial_pathname_parent = $1;
|
||||
|
@ -571,36 +556,20 @@ sub CreatePartialPatches {
|
|||
|
||||
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));
|
||||
|
||||
chdir($startdir);
|
||||
|
||||
if ($useFastPatcher) {
|
||||
close(PARTIAL_PATCHLIST_FILE);
|
||||
# -u turns off 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)) {
|
||||
printf("\n");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче