зеркало из https://github.com/mozilla/pjs.git
Bug 366650: patcher2 should use license and updateType settings; Fixes errors where you don't have a licenseUrl defined (popped the following assertion: ASSERT: SubstitutePath() called with null path at line 353.); always defines $updateType, even if it's not defined. write_patch_info(), which is the consumer of this data, can handle undef, but the rest of the app has troubles w/ that. r=rhelmer.
This commit is contained in:
Родитель
6e5d945b23
Коммит
152992a6de
|
@ -749,10 +749,14 @@ sub CreateCompletePatchinfo {
|
||||||
locale => $l,
|
locale => $l,
|
||||||
version => $to->{'appv'});
|
version => $to->{'appv'});
|
||||||
|
|
||||||
my $licenseUrl = SubstitutePath(
|
my $licenseUrl = undef;
|
||||||
|
if (defined($u_config->{$u}->{'license'})) {
|
||||||
|
$licenseUrl = SubstitutePath(
|
||||||
path => $u_config->{$u}->{'license'},
|
path => $u_config->{$u}->{'license'},
|
||||||
locale => $l,
|
locale => $l,
|
||||||
version => $to->{'appv'});
|
version => $to->{'appv'});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for my $c (@channels) {
|
for my $c (@channels) {
|
||||||
my $aus_prefix = "$u/aus2/$from_aus_app/$from_aus_version/$from_aus_platform/$from_aus_buildid/$l/$c";
|
my $aus_prefix = "$u/aus2/$from_aus_app/$from_aus_version/$from_aus_platform/$from_aus_buildid/$l/$c";
|
||||||
|
@ -933,10 +937,15 @@ sub CreatePastReleasePatchinfo {
|
||||||
locale => $locale,
|
locale => $locale,
|
||||||
version => $patchLocaleNode->{'appv'});
|
version => $patchLocaleNode->{'appv'});
|
||||||
|
|
||||||
my $licenseUrl = SubstitutePath(
|
my $licenseUrl = undef;
|
||||||
|
if (defined($config->GetCurrentUpdate()->{'license'})) {
|
||||||
|
$licenseUrl = SubstitutePath(
|
||||||
path => $config->GetCurrentUpdate()->{'license'},
|
path => $config->GetCurrentUpdate()->{'license'},
|
||||||
locale => $locale,
|
locale => $locale,
|
||||||
version => $patchLocaleNode->{'appv'});
|
version => $patchLocaleNode->{'appv'});
|
||||||
|
}
|
||||||
|
|
||||||
|
my $updateType = $config->GetCurrentUpdate()->{'updateType'};
|
||||||
|
|
||||||
foreach my $channel (@{$pastUpd->{'channels'}}) {
|
foreach my $channel (@{$pastUpd->{'channels'}}) {
|
||||||
my $ausDir = ($channel =~ /test(-\w+)?$/) ? 'aus2.test' : 'aus2';
|
my $ausDir = ($channel =~ /test(-\w+)?$/) ? 'aus2.test' : 'aus2';
|
||||||
|
@ -969,6 +978,7 @@ sub CreatePastReleasePatchinfo {
|
||||||
|
|
||||||
$completePatch->{'details'} = $detailsUrl;
|
$completePatch->{'details'} = $detailsUrl;
|
||||||
$completePatch->{'license'} = $licenseUrl;
|
$completePatch->{'license'} = $licenseUrl;
|
||||||
|
$completePatch->{'updateType'} = $updateType;
|
||||||
|
|
||||||
write_patch_info(patch => $completePatch,
|
write_patch_info(patch => $completePatch,
|
||||||
schemaVer => $patchLocaleNode->{'schema'});
|
schemaVer => $patchLocaleNode->{'schema'});
|
||||||
|
@ -1074,10 +1084,15 @@ sub CreatePartialPatchinfo {
|
||||||
locale => $l,
|
locale => $l,
|
||||||
version => $to->{'appv'});
|
version => $to->{'appv'});
|
||||||
|
|
||||||
my $licenseUrl = SubstitutePath(
|
my $licenseUrl = undef;
|
||||||
|
if (defined($u_config->{$u}->{'license'})) {
|
||||||
|
$licenseUrl = SubstitutePath(
|
||||||
path => $u_config->{$u}->{'license'},
|
path => $u_config->{$u}->{'license'},
|
||||||
locale => $l,
|
locale => $l,
|
||||||
version => $to->{'appv'});
|
version => $to->{'appv'});
|
||||||
|
}
|
||||||
|
|
||||||
|
my $updateType = $u_config->{$u}->{'updateType'};
|
||||||
|
|
||||||
for my $c (@channels) {
|
for my $c (@channels) {
|
||||||
my $aus_prefix = "$u/aus2/$from_aus_app/$from_aus_version/$from_aus_platform/$from_aus_buildid/$l/$c";
|
my $aus_prefix = "$u/aus2/$from_aus_app/$from_aus_version/$from_aus_platform/$from_aus_buildid/$l/$c";
|
||||||
|
@ -1108,6 +1123,7 @@ sub CreatePartialPatchinfo {
|
||||||
$partial_patch->{'url'} = $gen_partial_url;
|
$partial_patch->{'url'} = $gen_partial_url;
|
||||||
$partial_patch->{'details'} = $detailsUrl;
|
$partial_patch->{'details'} = $detailsUrl;
|
||||||
$partial_patch->{'license'} = $licenseUrl;
|
$partial_patch->{'license'} = $licenseUrl;
|
||||||
|
$partial_patch->{'updateType'} = $updateType;
|
||||||
|
|
||||||
write_patch_info(patch => $partial_patch,
|
write_patch_info(patch => $partial_patch,
|
||||||
schemaVer => $to->{'schema'});
|
schemaVer => $to->{'schema'});
|
||||||
|
|
Загрузка…
Ссылка в новой задаче