[tor-commits] [tor-browser-bundle/master] Bug 13857: allow making incrementals MARs for a specific channel

gk at torproject.org gk at torproject.org
Thu Jan 8 13:28:52 UTC 2015


commit 0f37c120647be48614d3af9512bcc06ba295fa34
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Mon Dec 8 14:43:12 2014 +0100

    Bug 13857: allow making incrementals MARs for a specific channel
    
    The gen_incrementals can now receive a channel name as argument. In that
    case, incremental MARs will be created for this channel only.
    
    If there is no argument, incremental MARs for all channels are created.
    
    Makefile rules have been added for the different channels.
---
 gitian/Makefile                         |    8 +++++++-
 gitian/README.build                     |    4 ++++
 tools/update-responses/update_responses |   24 +++++++++++++++---------
 3 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/gitian/Makefile b/gitian/Makefile
index 9613db6..1fce05e 100644
--- a/gitian/Makefile
+++ b/gitian/Makefile
@@ -33,7 +33,13 @@ build-beta:
 	./hash-bundles.sh versions.beta
 
 incrementals:
-	../tools/update-responses/gen_incrementals
+	../tools/update-responses/gen_incrementals release
+
+incrementals-alpha:
+	../tools/update-responses/gen_incrementals alpha
+
+incrementals-beta:
+	../tools/update-responses/gen_incrementals beta
 
 signmars:
 	./signmars.sh versions
diff --git a/gitian/README.build b/gitian/README.build
index 670e84c..dd7af91 100644
--- a/gitian/README.build
+++ b/gitian/README.build
@@ -78,6 +78,10 @@ Detailed Explanation of Scripts:
      - hash-nightly: The equivalent to the 'hash' rule for nightly packages
      - hash-alpha: The equivalent to the 'hash' rule for alpha packages
      - hash-beta: The equivalent to the 'hash' rule for beta packages
+     - incrementals-alpha: The equivalent to the 'incrementals' rule for
+       alpha packages
+     - incrementals-beta: The equivalent to the 'incrementals' rule for
+       beta packages
      - signmars-nightly: The equivalent to the 'signmars' rule for nightly packages
      - signmars-alpha: The equivalent to the 'signmars' rule for alpha packages
      - signmars-beta: The equivalent to the 'signmars' rule for beta packages
diff --git a/tools/update-responses/update_responses b/tools/update-responses/update_responses
index 5b85037..e66b27d 100755
--- a/tools/update-responses/update_responses
+++ b/tools/update-responses/update_responses
@@ -180,14 +180,6 @@ sub create_missing_incremental_mars_for_version {
     $pm->wait_all_children;
 }
 
-sub create_all_missing_incremental_mars {
-    my ($config) = @_;
-    foreach my $version (values %{$config->{channels}}) {
-        get_version_files($config, $version);
-        create_missing_incremental_mars_for_version($config, $version);
-    }
-}
-
 sub get_config {
     my ($config, $version, $os, $name) = @_;
     return $config->{versions}{$version}{$os}{$name}
@@ -195,6 +187,16 @@ sub get_config {
         // $config->{$name};
 }
 
+sub channel_to_version {
+    my ($config, @channels) = @_;
+    return values %{$config->{channels}} unless @channels;
+    foreach my $channel (@channels) {
+        exit_error "Unknown channel $channel"
+                unless $config->{channels}{$channel};
+    }
+    return map { $config->{channels}{$_} } @channels;
+}
+
 sub get_response {
     my ($config, $version, $os, @patches) = @_;
     my $res;
@@ -325,9 +327,13 @@ my %actions = (
         clean_htdocs;
     },
     gen_incrementals => sub {
+        my ($config) = @_;
         extract_martools;
         check_deps;
-        create_all_missing_incremental_mars(@_);
+        foreach my $version (channel_to_version($config, @ARGV)) {
+            get_version_files($config, $version);
+            create_missing_incremental_mars_for_version($config, $version);
+        }
     },
 );
 





More information about the tor-commits mailing list