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

gk at torproject.org gk at torproject.org
Fri Jan 9 21:18:53 UTC 2015


commit c39111b403e519aa56660c32c65fc9a64519ac17
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                     |    7 +++++++
 tools/update-responses/update_responses |   24 +++++++++++++++---------
 3 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/gitian/Makefile b/gitian/Makefile
index b2e3224..5b646c8 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
 
 update_responses:
 	../tools/update-responses/update_responses
diff --git a/gitian/README.build b/gitian/README.build
index 24a67a8..a5de8e2 100644
--- a/gitian/README.build
+++ b/gitian/README.build
@@ -71,6 +71,13 @@ Detailed Explanation of Scripts:
      - match-nightly: The equivalent to the 'match' rule for nightly packages
      - match-alpha: The equivalent to the 'match' rule for alpha packages
      - match-beta: The equivalent to the 'match' rule for beta packages
+     - 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
 
  1. check-prerequisites.sh: This script checks if your system is capable of
     running Gitian, and if it is not, it tells you what you need to do.
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 tbb-commits mailing list