Skip to content
Snippets Groups Projects
Unverified Commit 985fe814 authored by boklm's avatar boklm
Browse files

Bug 40699: Fix input_files in projects/firefox-l10n/config

In input_files in projects/firefox-l10n/config we are doing this:

  my $locales = project_config($project, 'var/locales', $options);
  foreach my $locale (@$locales) {
    $locale = process_template($project, $locale, '.');

In this foreach loop, `$locale` is pointing to the real string from
`var/locales` and not a copy, and we are updating it with the output
from `process_template`. This means that the template will be processed
the first time the function is called (for example for a linux-x86_64
build) and the processed value from the first call reused on subsequent
calls (for example a macos build, where the `ja` locale is supposed to
be different).

This is what caused the reproducibility issue in
tpo/applications/tor-browser-build!591 (comment 2857042)

To fix that we just use a separate variable to store the processed
template.
parent 983f9860
No related branches found
No related tags found
No related merge requests found
......@@ -24,8 +24,8 @@ steps:
my $changesets_json = project_config('firefox', 'var/l10n-changesets', { %$options, origin_project => $project });
my $d = decode_json $changesets_json;
my $locales = project_config($project, 'var/locales', $options);
foreach my $locale (@$locales) {
$locale = process_template($project, $locale, '.');
foreach my $loc (@$locales) {
my $locale = process_template($project, $loc, '.');
next unless my $revision = $d->{$locale}{revision};
my $input_file = {
name => $locale,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment