Index: trunk/ippScripts/scripts/dist_component.pl
===================================================================
--- trunk/ippScripts/scripts/dist_component.pl	(revision 23438)
+++ trunk/ippScripts/scripts/dist_component.pl	(revision 23440)
@@ -54,5 +54,5 @@
            'magicked=s'     => \$magicked,   # data_state for this component
            'outroot=s'      => \$outroot,    # "directory" for outputs
-           'clean=s'        => \$clean,      # create clean distribution
+           'clean'          => \$clean,      # create clean distribution
            'save-temps'     => \$save_temps, # Save temporary files?
            'dbname=s'       => \$dbname,     # Database name
@@ -84,12 +84,4 @@
 
 my $basename = basename($path_base);
-
-#
-# are we creating a clean distribution?
-if (defined($clean) and ($clean eq "T")) {
-    $clean = 1;
-} else {
-    $clean = 0;
-}
 
 # making a clean bundle of raw images doesn't make sense
@@ -258,10 +250,5 @@
         # TODO: these data will eventually come from the CONFIG dump
 
-        my $fh;
-        open $fh, "/data/ipp004.0/home/bills/ipp/ippScripts/scripts/clean.mdc" or
-            &my_die("cannot find clean.mdc", $dist_id, $component, $PS_EXIT_UNKNOWN_ERROR);
-
-        my @data = <$fh>;
-        my $clean_mdc = join "", @data;
+        my $clean_mdc = get_legacy_file_mdc();
 
         my $mdlist = $mdcParser->parse($clean_mdc) or
@@ -341,5 +328,6 @@
 }
 
-sub delete_tmpdir {
+sub delete_tmpdir
+{
     if (!$save_temps) {
         system "rm -r $tmpdir";
@@ -347,3 +335,113 @@
 }
 
+# list of output data products for runs that were made before the configuration re-work 
+sub get_legacy_file_mdc
+{
+    my $list =
+"
+#
+# interesting things we might want to save in this file
+#   1. whether file is to be distributed in 'clean' mode
+#   2. whether file is to be cleaned (this should be the same thing)
+#   3. type of file 'no, not our business, precious'
+
+# this data should probably be computed by the relevant program and saved as part
+# of the configuration dump that is output.
+
+
+PROD_LIST MULTI
+
+PROD_LIST   METADATA
+        STAGE                    STR     RAW
+    # there is isn't really a file rule for raw images
+	DUMMY           	BOOL	F
+END
+
+# list of data products for a gpc1 chipProcessedImfile  (made by ppImage)
+PROD_LIST   METADATA
+        STAGE                    STR     CHIP
+	PPIMAGE.CONFIG  	BOOL	T
+#	PPIMAGE.CHIP    	BOOL	F
+#	PPIMAGE.CHIP.MASK	BOOL	F
+#	PPIMAGE.CHIP.VARIANCE	BOOL	F
+	PPIMAGE.BIN1    	BOOL	T
+	PPIMAGE.BIN2    	BOOL	T
+	PSPHOT.OUT.CMF.SPL	BOOL	T
+	PSPHOT.BACKMDL  	BOOL	T
+	PPIMAGE.STATS   	BOOL	T
+	LOG.IMFILE      	BOOL	T
+	TRACE.IMFILE    	BOOL	T
+    # where do we put exposure level data such as LOG.EXP ?
+END
+# exposure level output products from camera processing made by psastro and ppImage (jpegs)
+PROD_LIST   METADATA
+        STAGE                    STR     CAM
+	PSASTRO.CONFIG  	BOOL	T
+	PSASTRO.OUTPUT  	BOOL	T
+	PSASTRO.STATS   	BOOL	T
+	PPIMAGE.JPEG1   	BOOL	T
+	PPIMAGE.JPEG2   	BOOL	T
+	LOG.EXP         	BOOL	T
+	TRACE.EXP       	BOOL	T
+END
+# chip lelel output products from camera processing made by psastro
+PROD_LIST   METADATA
+        STAGE                    STR CAM_CHIP
+#	PSASTRO.OUTPUT.MASK	BOOL	F
+END
+PROD_LIST   METADATA
+        STAGE                    STR     FAKE
+#	PPSIM.OUTPUT    	BOOL	F
+END
+# list of data products for a gpc1 warpSkyfile (pswarp)
+PROD_LIST   METADATA
+        STAGE                    STR     WARP
+	PSWARP.CONFIG   	BOOL	T
+#	PSWARP.OUTPUT   	BOOL	F
+#	PSWARP.OUTPUT.MASK	BOOL	F
+#	PSWARP.OUTPUT.VARIANCE	BOOL	F
+	PSWARP.OUTPUT.SOURCES	BOOL	T
+	PSPHOT.BACKMDL.MEF  	BOOL	T
+	PSPHOT.PSF.SKY.SAVE	BOOL	T
+	SKYCELL.STATS   	BOOL	T
+	SKYCELL.TEMPLATE	BOOL	T
+	LOG.EXP         	BOOL	T
+	TRACE.EXP       	BOOL	T
+END
+# outputs from diffRun (ppSub)
+PROD_LIST   METADATA
+        STAGE                    STR     DIFF
+	PPSUB.CONFIG    	BOOL	T
+#	PPSUB.OUTPUT    	BOOL	F
+#	PPSUB.OUTPUT.MASK	BOOL	F
+#	PPSUB.OUTPUT.VARIANCE	BOOL	F
+	PPSUB.OUTPUT.KERNELS	BOOL	T
+	PPSUB.OUTPUT.JPEG1	BOOL	T
+	PPSUB.OUTPUT.JPEG2	BOOL	T
+	PSPHOT.OUT.CMF.MEF	BOOL	T
+	PSPHOT.BACKMDL.MEF	BOOL	T
+	SKYCELL.STATS   	BOOL	T
+	LOG.EXP         	BOOL	T
+	TRACE.EXP       	BOOL	T
+END
+PROD_LIST   METADATA
+        STAGE                    STR     STACK
+	PPSTACK.CONFIG  	BOOL	T
+#	PPSTACK.OUTPUT  	BOOL	F
+#	PPSTACK.OUTPUT.MASK	BOOL	F
+#	PPSTACK.OUTPUT.VARIANCE	BOOL	F
+	PPSTACK.TARGET.PSF	BOOL	T
+	PSPHOT.OUT.CMF.MEF	BOOL	T
+	PSPHOT.BACKMDL.MEF	BOOL	T
+	SKYCELL.STATS   	BOOL	T
+	PPSTACK.OUTPUT.JPEG1	BOOL	T
+	PPSTACK.OUTPUT.JPEG2	BOOL	T
+	LOG.EXP         	BOOL	T
+	TRACE.EXP       	BOOL	T
+END
+";
+    return $list;
+}
+
+
 __END__
