Index: trunk/pstamp/scripts/pstamp_check_dependents.pl
===================================================================
--- trunk/pstamp/scripts/pstamp_check_dependents.pl	(revision 25957)
+++ trunk/pstamp/scripts/pstamp_check_dependents.pl	(revision 26289)
@@ -25,5 +25,5 @@
 use PS::IPP::PStamp::Job qw( :standard );
 
-my ( $dep_id, $dep_state, $stage, $stage_id, $imagedb, $rlabel, $no_magic, $dbname, $dbserver);
+my ( $dep_id, $dep_state, $stage, $stage_id, $imagedb, $no_magic, $dbname, $dbserver);
 my ( $no_update, $verbose, $save_temps, $logfile);
 
@@ -34,5 +34,4 @@
            'stage_id=s'     => \$stage_id,
 	   'imagedb=s'      => \$imagedb,
-	   'rlabel=s'       => \$rlabel,
 	   'no-magic=s'     => \$no_magic,
 	   'dbname=s'       => \$dbname,
@@ -46,6 +45,6 @@
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
 
-die "--dep_id --state --stage --stage_id --imagedb and --rlabel are requried \n"
-    if !$dep_id or !$dep_state or !$stage or !$stage_id or !$imagedb or !$rlabel;
+die "--dep_id --state --stage --stage_id and --imagedb are requried \n"
+    if !$dep_id or !$dep_state or !$stage or !$stage_id or !$imagedb;
 
 my $ipprc = PS::IPP::Config->new(); # IPP Configuration
@@ -103,13 +102,11 @@
     } else {
 
-        # XXX: TODO set label to the "standard" update value
-
         # don't update if in runs are in state goto_cleaned, wait for clean to finish
         if ($state eq "cleaned") {
-            runcommand("$chiptool -dbname $imagedb -chip_id $stage_id -updaterun -set_state update");
-        }
-
-        # don't update yet if magicDSRuns are in state goto_purged, wait for purge to finish
-        if ($magic_ds_state eq "purged") {
+            runcommand("$chiptool -dbname $imagedb -chip_id $stage_id -updaterun -set_state update -set_label update");
+        }
+
+        # don't update yet if magicDSRuns are in state goto_cleaned, wait for purge to finish
+        if ($magic_ds_state eq "cleaned") {
             my $magic_ds_id = $run_state->{magic_ds_id};
             runcommand("$magicdstool -dbname $imagedb -magic_ds_id $magic_ds_id -updaterun -set_state new");
@@ -145,18 +142,16 @@
     } else {
 
-        # XXX: TODO set label to the "standard" update value
-
         # don't update if in runs are in state goto_cleaned, wait for clean to finish
         if ($state eq 'cleaned') {
-            runcommand("$warptool -dbname $imagedb -warp_id $stage_id -updaterun -set_state update");
+            runcommand("$warptool -dbname $imagedb -warp_id $stage_id -updaterun -set_state update -set_label update");
         }
 
         if ($chip_state eq 'cleaned') {
             my $chip_id = $run_state->{chip_id};
-            runcommand("$chiptool -dbname $imagedb -chip_id $chip_id -updaterun -set_state update");
-        }
-
-        # don't update yet if magicDSRuns are in state goto_purged, wait for purge to finish
-        if ($magic_ds_state eq 'purged') {
+            runcommand("$chiptool -dbname $imagedb -chip_id $chip_id -updaterun -set_state update -set_label update");
+        }
+
+        # don't update yet if magicDSRuns are in state goto_cleaned, wait for purge to finish
+        if ($magic_ds_state eq 'cleaned') {
             my $magic_ds_id = $run_state->{magic_ds_id};
             runcommand("$magicdstool -dbname $imagedb -magic_ds_id $magic_ds_id -updaterun -set_state new");
@@ -190,7 +185,9 @@
         }
         return join "", @$stdout_buf if defined wantarray();
+        return $success;
     } else {
         print STDERR "skipping $command\n";
     }
+    return 1;
 }
 
