mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 20:30:41 +00:00
Bug 336338: Localize detailsUrls for updates. Also, slip in fixes for: the progress meter, which never got incremented during a run, and be more explicit about calls to SubtitutePath() which may not be doing what we expect (since we're using it in a number of different ways than we originally were). r=rhelmer
This commit is contained in:
parent
9d55b1c7ae
commit
3edcac8a49
@ -350,18 +350,19 @@ sub SubstitutePath
|
||||
{
|
||||
my %args = @_;
|
||||
|
||||
my $string = $args{'path'};
|
||||
my $platform = $args{'platform'};
|
||||
my $locale = $args{'locale'};
|
||||
my $version = $args{'version'};
|
||||
my $app = $args{'app'};
|
||||
my $string = $args{'path'} ||
|
||||
die 'ASSERT: SubstitutePath() called with null path';
|
||||
my $platform = $args{'platform'} || 'UNDEFINED';
|
||||
my $locale = $args{'locale'} ||'UNDEFINED';
|
||||
my $version = $args{'version'} || 'UNDEFINED';
|
||||
my $app = $args{'app'} || 'UNDEFINED';
|
||||
|
||||
my %bouncer_platforms = GetBouncerPlatformStrings();
|
||||
my $bouncer_platform = $bouncer_platforms{$platform};
|
||||
|
||||
$string =~ s/%platform%/$platform/g;
|
||||
$string =~ s/%locale%/$locale/g;
|
||||
$string =~ s/%bouncer-platform%/$bouncer_platform/g;
|
||||
$string =~ s/%bouncer\-platform%/$bouncer_platform/g;
|
||||
$string =~ s/%version%/$version/g;
|
||||
$string =~ s/%app%/$app/g;
|
||||
|
||||
|
@ -501,7 +501,7 @@ sub CreateCompletePatches {
|
||||
my $start_time = time();
|
||||
|
||||
# copy complete to the expected result
|
||||
PrintProgress(total => $total, current => $i,
|
||||
PrintProgress(total => $total, current => ++$i,
|
||||
string => "$u/$p/$l");
|
||||
$complete_pathname =~ m/^(.*)\/[^\/]*/;
|
||||
my $parentdir = $1;
|
||||
@ -699,8 +699,6 @@ sub CreateCompletePatchinfo {
|
||||
#printf("%s", Data::Dumper::Dumper($config->{'app_config'}->{'update_data'}));
|
||||
|
||||
for my $u (@updates) {
|
||||
my $details = $u_config->{$u}->{'details'};
|
||||
|
||||
my $complete = $u_config->{$u}->{'complete'};
|
||||
my $complete_path = $complete->{'path'};
|
||||
my $complete_url = $complete->{'url'};
|
||||
@ -736,6 +734,11 @@ sub CreateCompletePatchinfo {
|
||||
platform => $p,
|
||||
locale => $l );
|
||||
|
||||
my $detailsUrl = SubstitutePath(
|
||||
path => $u_config->{$u}->{'details'},
|
||||
locale => $l,
|
||||
version => $to->{'appv'});
|
||||
|
||||
for my $c (@channels) {
|
||||
my $aus_prefix = "$u/aus2/$from_aus_app/$from_aus_version/$from_aus_platform/$from_aus_buildid/$l/$c";
|
||||
|
||||
@ -767,7 +770,7 @@ sub CreateCompletePatchinfo {
|
||||
$complete_patch->{'size'} = (stat($to_path))[7];
|
||||
$complete_patch->{'url'} = $gen_complete_url;
|
||||
|
||||
$complete_patch->{'details'} = $details;
|
||||
$complete_patch->{'details'} = $detailsUrl;
|
||||
|
||||
write_patch_info(patch => $complete_patch);
|
||||
|
||||
@ -907,6 +910,11 @@ sub CreatePastReleasePatchinfo {
|
||||
platform => $toPlatform,
|
||||
locale => $locale );
|
||||
|
||||
my $detailsUrl = SubstitutePath(
|
||||
path => $config->GetCurrentUpdate()->{'details'},
|
||||
locale => $locale,
|
||||
version => $patchLocaleNode->{'appv'});
|
||||
|
||||
foreach my $channel (@{$pastUpd->{'channels'}}) {
|
||||
my $ausDir = ($channel =~ /test$/) ? 'aus2.test' : 'aus2';
|
||||
my $ausPrefix = "$prefixStr/$ausDir/$fromAusApp/$fromAusVersion/$fromAusPlatform/$fromAusBuildId/$locale/$channel";
|
||||
@ -936,7 +944,7 @@ sub CreatePastReleasePatchinfo {
|
||||
$completePatch->{'url'} = ($channel =~ /test$/) ?
|
||||
$genCompleteTestUrl : $genCompleteUrl;
|
||||
|
||||
$completePatch->{'details'} = $config->GetCurrentUpdate()->{'details'};
|
||||
$completePatch->{'details'} = $detailsUrl;
|
||||
|
||||
write_patch_info(patch => $completePatch);
|
||||
print("done\n");
|
||||
@ -1035,6 +1043,11 @@ sub CreatePartialPatchinfo {
|
||||
platform => $p,
|
||||
locale => $l );
|
||||
|
||||
my $detailsUrl = SubstitutePath(
|
||||
path => $u_config->{$u}->{'details'},
|
||||
locale => $l,
|
||||
version => $to->{'appv'});
|
||||
|
||||
for my $c (@channels) {
|
||||
my $aus_prefix = "$u/aus2/$from_aus_app/$from_aus_version/$from_aus_platform/$from_aus_buildid/$l/$c";
|
||||
|
||||
@ -1062,6 +1075,7 @@ sub CreatePartialPatchinfo {
|
||||
$partial_patch->{'extv'} = $to->{'extv'};
|
||||
$partial_patch->{'size'} = (stat($partial_pathname))[7];
|
||||
$partial_patch->{'url'} = $gen_partial_url;
|
||||
$partial_patch->{'details'} = $detailsUrl;
|
||||
|
||||
write_patch_info(patch => $partial_patch);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user