Index: trunk/pstamp/scripts/pstampparse.pl
===================================================================
--- trunk/pstamp/scripts/pstampparse.pl	(revision 24831)
+++ trunk/pstamp/scripts/pstampparse.pl	(revision 24855)
@@ -240,4 +240,8 @@
         foreach my $image (@$images) {
             my $uri = $image->{image};
+            if (($img_type ne "stack") and ($need_magic and !$image->{magicked})) {
+                print STDERR "skippping non-magicked image $uri\n" if $verbose;
+                next;
+            }
             my $exp_id = $image->{exp_id};
             
@@ -261,19 +265,13 @@
             }
 
-            # XXX sounds like magic will be handled outside of the postage stamp server
-            #if ($need_magic) {
-            #    die "no magic mask available" if ! $image->{magic_mask};
-            #    $args .= " -magic_mask $image->{magic_mask}" 
-            #}
-
             # XXX: TODO: here is where we need to check whether or not the source inputs still exist
-            # and if not, queue a regeneration job and set the job state appropriately.
-
-            my $state = "run";
+            # and if not, queue an update job and set the job state appropriately.
+
+            my $newState = "run";
 
             $num_jobs++;
             my $command = "$pstamptool -addjob -req_id $req_id -job_type $job_type"
                 . " -uri $uri -outputBase $output_base -args '$args' -rownum $rownum"
-                . " -state $state";
+                . " -state $newState";
             $command .= " -exp_id $exp_id" if $exp_id;
             $command .= " -dbname $dbname" if $dbname;
