Index: /tags/ipp-20100701/ippScripts/scripts/dist_bundle.pl
===================================================================
--- /tags/ipp-20100701/ippScripts/scripts/dist_bundle.pl	(revision 28738)
+++ /tags/ipp-20100701/ippScripts/scripts/dist_bundle.pl	(revision 28739)
@@ -237,5 +237,7 @@
     if ($stage ne "raw") {
         &my_die("no mask image found in file list", $component, $PS_EXIT_CONFIG_ERROR) if !$mask;
-        &my_die("no variance image found in file list", $component, $PS_EXIT_CONFIG_ERROR) if !$variance;
+        if (($stage ne "chip_bg") and ($stage ne "warp_bg")) {
+            &my_die("no variance image found in file list", $component, $PS_EXIT_CONFIG_ERROR) if !$variance;
+        }
     }
 
@@ -254,5 +256,15 @@
     }
 
-    my $command = "$streaksrelease -stage $stage -image $image -outroot $tmpdir";
+    my $release_stage;
+    if ($stage eq "chip_bg") {
+        $release_stage = 'chip';
+    } elsif ($stage eq 'warp_bg') {
+        $release_stage = 'warp';
+    } else {
+        $release_stage = $stage;
+    }
+
+
+    my $command = "$streaksrelease -stage $release_stage -image $image -outroot $tmpdir";
     $command .= " -class_id $class_id" if $class_id;
     $command .= " -mask $mask" if $mask;
@@ -266,5 +278,5 @@
     }
     if ($inv_image) {
-        $command = "$streaksrelease -stage $stage -image $inv_image -outroot $tmpdir";
+        $command = "$streaksrelease -stage $release_stage -image $inv_image -outroot $tmpdir";
         $command .= " -mask $inv_mask" if $inv_mask;
         $command .= " -weight $inv_variance" if $inv_variance;
@@ -345,4 +357,6 @@
     } elsif ($stage eq "chip") {
         $type = $chip_cleaned{$rule};
+    } elsif ($stage eq "chip_bg") {
+        $type = $chip_bg_cleaned{$rule};
     } elsif ($stage eq "camera") {
         $type = $camera_cleaned{$rule};
@@ -351,4 +365,6 @@
     } elsif ($stage eq "warp") {
         $type = $warp_cleaned{$rule};
+    } elsif ($stage eq "warp_bg") {
+        $type = $warp_bg_cleaned{$rule};
     } elsif ($stage eq "diff") {
         $type = $diff_cleaned{$rule};
@@ -420,5 +436,5 @@
     if ($stage eq "chip") {
         $config_file_rule = "PPIMAGE.CONFIG";
-    } elsif ($stage eq "chip") {
+    } elsif ($stage eq "chip_bg") {
         $config_file_rule = "PPBACKGROUND.CONFIG";
     } elsif ($stage eq "camera") {
@@ -430,5 +446,5 @@
         $config_file_rule = "PSWARP.CONFIG";
     } elsif ($stage eq "warp_bg") {
-        $config_file_rule = "PSWARP.CONFIG";
+        $config_file_rule = "PPBACKGROUND.CONFIG";
     } elsif ($stage eq "diff") {
         $config_file_rule = "PPSUB.CONFIG";
