Index: trunk/ippScripts/scripts/dist_component.pl
===================================================================
--- trunk/ippScripts/scripts/dist_component.pl	(revision 23707)
+++ trunk/ippScripts/scripts/dist_component.pl	(revision 23728)
@@ -58,5 +58,5 @@
 # Parse the command-line arguments
 my ($dist_id, $camera, $stage, $stage_id, $component, $path_base, $chip_path_base, $clean);
-my ($outroot, $run_state, $data_state, $magicked, $no_magic, $no_images);
+my ($outroot, $run_state, $data_state, $magicked, $no_magic, $poor_quality);
 my ($dbname, $save_temps, $verbose, $no_update, $logfile);
 
@@ -71,5 +71,5 @@
            'state=s'        => \$run_state,  # state of the run
            'data_state=s'   => \$data_state, # data_state for this component
-           'no_images'      => \$no_images,  # the processing for this component did not produced images
+           'poor_quality'      => \$poor_quality,  # the processing for this component did not produced images
            'no_magic'       => \$no_magic,   # magic is not required for this distribution run
            'magicked'       => \$magicked,   # magicked state for this component
@@ -149,9 +149,8 @@
 #   2. magic is not required for this distRun
 #   3. the processing for the component produced no images (warp or diff with bad quality for example)
-my $nan_masked_pixels = ! ($clean || $no_magic || $no_images);
+my $nan_masked_pixels = ! ($clean || $no_magic || $poor_quality);
 
 my ($image, $mask, $variance);
 
-my @base_list;
 foreach my $file_rule (keys %$file_list) {
     # check whether this file rule refers to an image, mask, or variance fits image
@@ -169,5 +168,14 @@
     my $path = $ipprc->file_resolve($file_name);
 
-    &my_die("failed to resolve  $file_name", $dist_id, $component, $PS_EXIT_DATA_ERROR) if !$path;
+    if (!$path) {
+        # skip this file if $poor_quality
+        # this is for compatability with older runs which don't have the files list in the
+        # config dump.
+        # Once we give up on supporting that we can remove the next line. (If the file is in the list
+        # it must exist)
+        next if $poor_quality;
+
+        &my_die("failed to resolve  $file_name", $dist_id, $component, $PS_EXIT_DATA_ERROR);
+    }
 
     # open the file to make sure it exists (and to work around the failed mount phenomena)
@@ -176,4 +184,5 @@
 
     # we need to pre-process the image before adding to the bundle. Save the path names.
+    # the images will be created below
     if ($image_type && $nan_masked_pixels) {
         # save the 
@@ -189,8 +198,8 @@
         }
     } else {
-        # create a symbolic link from the file in the nebulous repositorythe into the temporary directory
+        # create a symbolic link from the file in the nebulous repository
+        # in the temporary directory
         symlink $path, "$tmpdir/$base";
     }
-    push @base_list, $base;
 }
 
@@ -208,5 +217,4 @@
     &my_die("no mask image found in file list", $dist_id, $component, $PS_EXIT_CONFIG_ERROR) if !$mask;
     &my_die("no variance image found in file list", $dist_id, $component, $PS_EXIT_CONFIG_ERROR) if !$variance;
-
 
     my $class_id;
@@ -496,5 +504,5 @@
 sub delete_tmpdir
 {
-    if (!$save_temps) {
+    if (!$save_temps and $tmpdir and -e $tmpdir) {
         system "rm -r $tmpdir";
     }
