--- a/tools/patcher/patcher2.pl
+++ b/tools/patcher/patcher2.pl
@@ -273,16 +273,17 @@ sub download_complete_patches {
my $relPath = catfile($r, 'ftp');
MkdirWithPath(dir => $relPath, mask => 0751) or
die "MkdirWithPath($relPath) FAILED\n";
chdir($relPath);
my $download_url = $rl_config->{'completemarurl'};
$download_url = SubstitutePath(path => $download_url,
platform => $p,
+ version => $r,
locale => $l);
my $output_filename = SubstitutePath(
path => $MozAUSConfig::DEFAULT_MAR_NAME,
platform => $p,
locale => $l,
version => $r,
app => lc($config->GetApp()));
@@ -401,21 +402,23 @@ sub CreateCompletePatches {
my $from_path = $from->{'path'};
my $to_path = $to->{'path'};
my $to_name = $u_config->{$u}->{'to'};
my $gen_complete_path = $complete_path;
$gen_complete_path = SubstitutePath(path => $complete_path,
platform => $p,
+ version => $to->{'appv'},
locale => $l);
my $gen_complete_url = $complete_url;
$gen_complete_url = SubstitutePath(path => $complete_url,
platform => $p,
+ version => $to->{'appv'},
locale => $l);
#printf("%s", Data::Dumper::Dumper($to));
my $complete_pathname = catfile($u, 'ftp', $gen_complete_path);
# Go to next iteration if this partial patch already exists.
next if -e $complete_pathname;
@@ -499,21 +502,23 @@ sub CreatePartialPatches {
my $from_path = $from->{'path'};
my $to_path = $to->{'path'};
my $to_name = $u_config->{$u}->{'to'};
my $gen_partial_path = $partial_path;
$gen_partial_path = SubstitutePath(path => $partial_path,
platform => $p,
+ version => $to->{'appv'},
locale => $l );
my $gen_partial_url = $partial_url;
$gen_partial_url = SubstitutePath(path => $partial_url,
platform => $p,
+ version => $to->{'appv'},
locale => $l );
#printf("%s", Data::Dumper::Dumper($to));
my $partial_pathname = catfile($u, 'ftp', $gen_partial_path);
# Go to next iteration if this partial patch already exists.
next if -e $partial_pathname;
@@ -643,22 +648,24 @@ sub CreateCompletePatchinfo {
my $from_aus_app = ucfirst($config->GetApp());
my $from_aus_version = $from->{'appv'};
my $from_aus_platform = get_aus_platform_string($p);
my $from_aus_buildid = $from->{'build_id'};
my $gen_complete_path = $complete_path;
$gen_complete_path = SubstitutePath(path => $complete_path,
platform => $p,
+ version => $to->{'appv'},
locale => $l );
my $complete_pathname = "$u/ftp/$gen_complete_path";
my $gen_complete_url = SubstitutePath(path => $complete_url,
- platform => $p,
- locale => $l );
+ platform => $p,
+ version => $to->{'appv'},
+ locale => $l );
my $detailsUrl = SubstitutePath(
path => $u_config->{$u}->{'details'},
locale => $l,
version => $to->{'appv'});
my $licenseUrl = undef;
if (defined($u_config->{$u}->{'license'})) {
@@ -706,19 +713,20 @@ sub CreateCompletePatchinfo {
$complete_patch->{'appv'} = $to->{'appv'};
$complete_patch->{'extv'} = $to->{'extv'};
$complete_patch->{'size'} = (stat($to_path))[$ST_SIZE];
my $channelSpecificUrlKey = $c . '-url';
if (exists($complete->{$channelSpecificUrlKey})) {
$complete_patch->{'url'} = SubstitutePath(
- path => $complete->{$channelSpecificUrlKey},
- platform => $p,
- locale => $l);
+ path => $complete->{$channelSpecificUrlKey},
+ platform => $p,
+ version => $to->{'appv'},
+ locale => $l);
} else {
$complete_patch->{'url'} = $gen_complete_url;
}
$complete_patch->{'details'} = $detailsUrl;
$complete_patch->{'license'} = $licenseUrl;
$complete_patch->{'updateType'} = $updateType;
@@ -739,20 +747,21 @@ sub CreateCompletePatchinfo {
$testPatch->{'info_path'} = catfile($u,
'aus2.test', $from_aus_app,
$from_aus_version, $from_aus_platform,
$from_aus_buildid, $l, $testChan, 'complete.txt');
my $testUrlKey = $testChan . '-url';
if (exists($complete->{$testUrlKey})) {
- $testPatch->{'url'} = SubstitutePath(path =>
- $complete->{$testUrlKey},
- platform => $p,
- locale => $l );
+ $testPatch->{'url'} = SubstitutePath(
+ path => $complete->{$testUrlKey},
+ platform => $p,
+ version => $to->{'appv'},
+ locale => $l );
} else {
$testPatch->{'url'} = $gen_complete_url;
}
write_patch_info(patch => $testPatch,
schemaVer => $to->{'schema'});
}
}
@@ -851,22 +860,24 @@ sub CreatePastReleasePatchinfo {
# Build patch info
my $fromAusApp = ucfirst($config->GetApp());
my $fromAusVersion = $fromRelease->{'version'};
my $fromAusPlatform = get_aus_platform_string($fromPlatform);
my $fromAusBuildId = $fromRelease->{'platforms'}->{$fromPlatform}->{'build_id'};
my $genCompletePath = SubstitutePath(path => $completePath,
platform => $toPlatform,
+ version => $patchLocaleNode->{'appv'},
locale => $locale );
my $completePathname = "$prefixStr/ftp/$genCompletePath";
my $genCompleteUrl = SubstitutePath(path => $completeUrl,
platform => $toPlatform,
+ version => $patchLocaleNode->{'appv'},
locale => $locale );
my $detailsUrl = SubstitutePath(
path => $config->GetCurrentUpdate()->{'details'},
locale => $locale,
version => $patchLocaleNode->{'appv'});
my $licenseUrl = undef;
@@ -913,16 +924,17 @@ sub CreatePastReleasePatchinfo {
$completePatch->{'size'} = (stat($to_path))[$ST_SIZE];
my $channelSpecificUrlKey = $channel . '-url';
if (exists($complete->{$channelSpecificUrlKey})) {
$completePatch->{'url'} = SubstitutePath(
path => $complete->{$channelSpecificUrlKey},
platform => $toPlatform,
+ version => $patchLocaleNode->{'appv'},
locale => $locale);
} else {
$completePatch->{'url'} = $genCompleteUrl;
}
$completePatch->{'details'} = $detailsUrl;
$completePatch->{'license'} = $licenseUrl;
$completePatch->{'updateType'} = $updateType;
@@ -1011,21 +1023,23 @@ sub CreatePartialPatchinfo {
my $from_aus_app = ucfirst($config->GetApp());
my $from_aus_version = $from->{'appv'};
my $from_aus_platform = get_aus_platform_string($p);
my $from_aus_buildid = $from->{'build_id'};
my $gen_partial_path = $partial_path;
$gen_partial_path = SubstitutePath(path => $partial_path,
platform => $p,
+ version => $to->{'appv'},
locale => $l );
my $partial_pathname = "$u/ftp/$gen_partial_path";
my $gen_partial_url = SubstitutePath(path => $partial_url,
platform => $p,
+ version => $to->{'appv'},
locale => $l );
my $detailsUrl = SubstitutePath(
path => $u_config->{$u}->{'details'},
locale => $l,
version => $to->{'appv'});
my $licenseUrl = undef;
@@ -1073,19 +1087,20 @@ sub CreatePartialPatchinfo {
$partial_patch->{'appv'} = $to->{'appv'};
$partial_patch->{'extv'} = $to->{'extv'};
$partial_patch->{'size'} = (stat($partial_pathname))[$ST_SIZE];
my $channelSpecificUrlKey = $c . '-url';
if (exists($partial->{$channelSpecificUrlKey})) {
$partial_patch->{'url'} = SubstitutePath(
- path => $partial->{$channelSpecificUrlKey},
- platform => $p,
- locale => $l);
+ path => $partial->{$channelSpecificUrlKey},
+ platform => $p,
+ version => $to->{'appv'},
+ locale => $l);
} else {
$partial_patch->{'url'} = $gen_partial_url;
}
$partial_patch->{'details'} = $detailsUrl;
$partial_patch->{'license'} = $licenseUrl;
$partial_patch->{'updateType'} = $updateType;
@@ -1106,18 +1121,19 @@ sub CreatePartialPatchinfo {
$testPatch->{'info_path'} = catfile($u,
'aus2.test', $from_aus_app,
$from_aus_version, $from_aus_platform,
$from_aus_buildid, $l, $testChan, 'partial.txt');
my $testChanKey = $testChan . '-url';
if (exists($partial->{$testChanKey})) {
- $testPatch->{'url'} = SubstitutePath(path =>
- $partial->{$testChanKey},
+ $testPatch->{'url'} = SubstitutePath(
+ path => $partial->{$testChanKey},
+ version => $to->{'appv'},
platform => $p,
locale => $l );
} else {
$testPatch->{'url'} = $gen_partial_url;
}
write_patch_info(patch => $testPatch,
schemaVer => $to->{'schema'});