[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser-build/master] Bug 40027: Fix incremental .mar creation for esr78



commit 8f114d54cc6a7c8f3a66c59512cb5f8f1f381714
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
Date:   Thu Jul 23 10:42:19 2020 +0000

    Bug 40027: Fix incremental .mar creation for esr78
---
 tools/update-responses/update_responses | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tools/update-responses/update_responses b/tools/update-responses/update_responses
index 6b25435..de703ee 100755
--- a/tools/update-responses/update_responses
+++ b/tools/update-responses/update_responses
@@ -190,7 +190,7 @@ sub mar_filename {
 }
 
 sub create_incremental_mar {
-    my ($config, $pm, $from_version, $new_version, $os, $lang) = @_;
+    my ($config, $pm, $from_version, $new_version, $os, $lang, $channel) = @_;
     my $appname = $config->{appname_marfile};
     my $mar_file = "$appname-$os-${from_version}-${new_version}_$lang.incremental.mar";
     my $mar_file_path = version_dir($config, $new_version) . '/' . $mar_file;
@@ -230,6 +230,8 @@ sub create_incremental_mar {
             exit_error "Missing code signature while creating $mar_file";
         }
     }
+    $ENV{MOZ_PRODUCT_VERSION} = $new_version;
+    $ENV{MAR_CHANNEL_ID} = "torbrowser-torproject-$channel";
     my ($out, $err, $success) = capture_exec('make_incremental_update.sh',
                                    $mar_file_path, "$tmpdir/A", "$tmpdir/B");
     if (!$success) {
@@ -240,7 +242,7 @@ sub create_incremental_mar {
 }
 
 sub create_incremental_mars_for_version {
-    my ($config, $version) = @_;
+    my ($config, $version, $channel) = @_;
     my $pm = Parallel::ForkManager->new(get_nbprocs);
     $pm->run_on_finish(sub { $_[2]->(@_) });
     my $v = $config->{versions}{$version};
@@ -251,7 +253,7 @@ sub create_incremental_mars_for_version {
         foreach my $os (keys %{$v->{files}}) {
             foreach my $lang (keys %{$v->{files}{$os}}) {
                 next unless defined $from_v->{files}{$os}{$lang}{complete};
-                create_incremental_mar($config, $pm, $from_version, $version, $os, $lang);
+                create_incremental_mar($config, $pm, $from_version, $version, $os, $lang, $channel);
             }
         }
     }
@@ -640,10 +642,11 @@ my %actions = (
     },
     gen_incrementals => sub {
         my ($config) = @_;
-        foreach my $version (channel_to_version($config, @ARGV)) {
+        foreach my $channel (@ARGV) {
+            my ($version) = channel_to_version($config, $channel);
             extract_martools($config, $version);
             get_version_files($config, $version);
-            create_incremental_mars_for_version($config, $version);
+            create_incremental_mars_for_version($config, $version, $channel);
         }
     },
     download_missing_versions => sub {

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits