Bug 381172, use DisableCompleteJump to override of code that forces complete update, r=preed
authornrthomas@gmail.com
Wed, 23 May 2007 02:58:30 -0700
changeset 1766 fa0332467b77530e4dbf5018420e520e631e3311
parent 1765 16f7b8bb679568f9420f6c5d00ddaf21c05173c3
child 1767 d4f19bbb6508c3744004856850020b153d8bea3b
push idunknown
push userunknown
push dateunknown
reviewerspreed
bugs381172
milestone1.9a5pre
Bug 381172, use DisableCompleteJump to override of code that forces complete update, r=preed
tools/patcher/MozAUSConfig.pm
tools/patcher/patcher2.pl
--- a/tools/patcher/MozAUSConfig.pm
+++ b/tools/patcher/MozAUSConfig.pm
@@ -425,16 +425,23 @@ sub CreateUpdateGraph
                 $u_config->{$u_key}->{$testKey} = $u->{$testKey};
             }
         }
 
         # Creates a hash of channel -> rc number the channel thinks its on
         $u_config->{$u_key}->{'rc'} = {};
         if (defined($u_rcInfo)) {
             foreach my $channel (keys(%{$u_rcInfo})) {
+                # Such a hack... this isn't a channel name at all; it's a config
+                # variable, to control the behavior of sending the complete 
+                # "jump" updates to the RC channels...
+                if ($channel eq 'DisableCompleteJump') {
+                    $u_config->{$u_key}->{'DisableCompleteJump'} = $u_rcInfo->{$channel};
+                    next;
+                }
                 $u_config->{$u_key}->{'rc'}->{$channel} = $u_rcInfo->{$channel};
             }
         }
 
         my $r_config = $this->{'mAppConfig'}->{'release'};
         my @releases = keys %$r_config;
 
         # Find the set of locales that intersect for each platform by calculating how many times they appear.
--- a/tools/patcher/patcher2.pl
+++ b/tools/patcher/patcher2.pl
@@ -1072,16 +1072,21 @@ sub CreatePartialPatchinfo {
         # not going to re-create partial updates from every rc build we do. 
         # We track this throughout this horrid function via 
         # $serveCompleteUpdateToRcs (further down below)
         my $complete = $u_config->{$u}->{'complete'};
         my $complete_path = $complete->{'path'};
         my $complete_url = $complete->{'url'};
 
         my $currentUpdateRcInfo = $u_config->{$u}->{'rc'};
+        # Used in the case where we never released rc1, so rc2 or 3 or 4 is
+        # actually the "first" release rc.
+        my $disableCompleteJumpForRcs =
+         exists($u_config->{$u}->{'DisableCompleteJump'}) && 
+         int($u_config->{$u}->{'DisableCompleteJump'});
 
         my @channels = @{$u_config->{$u}->{'all_channels'}};
         my $channel = $u_config->{$u}->{'channel'};
         my @platforms = sort keys %{$u_config->{$u}->{'platforms'}};
         for my $p (@platforms) {
             my $ul_config = $u_config->{$u}->{'platforms'}->{$p}->{'locales'};
             my @locales = sort keys %$ul_config;
             for my $l (@locales) {
@@ -1157,16 +1162,17 @@ sub CreatePartialPatchinfo {
 
                     my $snippetToAppVersion = $to->{'appv'};
                     foreach my $channel (keys(%{$currentUpdateRcInfo})) {
                         if ($c eq $channel) {
                             $snippetToAppVersion = $to->{'appv'} . 'rc' .
                              $currentUpdateRcInfo->{$channel};
 
                             $serveCompleteUpdateToRcs =
+                             (!$disableCompleteJumpForRcs) &&
                              (int($currentUpdateRcInfo->{$channel}) > 1);
 
                             if ($serveCompleteUpdateToRcs) {
                                 $snippetPathname = $complete_pathname;
                                 $snippetUrl = $gen_complete_url;
                             }
 
                             last;