Index: /tags/ipp-20130712/ippTasks/pstamp.pro
===================================================================
--- /tags/ipp-20130712/ippTasks/pstamp.pro	(revision 36474)
+++ /tags/ipp-20130712/ippTasks/pstamp.pro	(revision 36475)
@@ -825,4 +825,5 @@
         book getword pstampDependent $pageName imagedb    -var IMAGEDB
         book getword pstampDependent $pageName rlabel     -var RLABEL
+        book getword pstampDependent $pageName label      -var LABEL
         book getword pstampDependent $pageName outdir     -var OUTDIR
         book getword pstampDependent $pageName need_magic -var NEED_MAGIC
@@ -846,5 +847,5 @@
         stderr $MYLOGFILE
 
-        $run = pstamp_checkdependent.pl --dep_id $DEP_ID --stage_id $STAGE_ID --stage $STAGE --component $COMPONENT --imagedb $IMAGEDB --rlabel $RLABEL $NEED_MAGIC --fault_count $FAULT_COUNT --max_fault_count $PSTAMP_MAX_FAULT_COUNT --logfile $MYLOGFILE
+        $run = pstamp_checkdependent.pl --dep_id $DEP_ID --stage_id $STAGE_ID --stage $STAGE --component $COMPONENT --imagedb $IMAGEDB --rlabel $RLABEL --label $LABEL $NEED_MAGIC --fault_count $FAULT_COUNT --max_fault_count $PSTAMP_MAX_FAULT_COUNT --logfile $MYLOGFILE
 
         add_standard_args run
Index: /tags/ipp-20130712/ippTools/share/pstamptool_pendingdependent.sql
===================================================================
--- /tags/ipp-20130712/ippTools/share/pstamptool_pendingdependent.sql	(revision 36474)
+++ /tags/ipp-20130712/ippTools/share/pstamptool_pendingdependent.sql	(revision 36475)
@@ -1,4 +1,5 @@
 SELECT DISTINCT
     pstampDependent.*,
+    pstampRequest.label,
     concat( pstampDependent.outdir, '/checkdep.', dep_id, '.log') as logfile,
     IFNULL(Label.priority, 10000) AS priority
Index: /tags/ipp-20130712/pstamp/scripts/pstamp_checkdependent.pl
===================================================================
--- /tags/ipp-20130712/pstamp/scripts/pstamp_checkdependent.pl	(revision 36474)
+++ /tags/ipp-20130712/pstamp/scripts/pstamp_checkdependent.pl	(revision 36475)
@@ -27,5 +27,5 @@
 my $IPP_DIFF_MODE_STACK_STACK = 4;
 
-my ($dep_id, $stage, $stage_id, $component, $imagedb, $rlabel, $need_magic, $fault_count, $max_fault_count, $logfile);
+my ($dep_id, $stage, $stage_id, $component, $imagedb, $label, $rlabel, $need_magic, $fault_count, $max_fault_count, $logfile);
 my ($dbname, $ps_dbserver, $verbose, $save_temps, $no_update);
 
@@ -36,5 +36,6 @@
     'component=s'   =>  \$component,
     'imagedb=s'     =>  \$imagedb,      # dbname for images lookups.
-    'rlabel=s'      =>  \$rlabel,
+    'label=s'       =>  \$label,        # request's label
+    'rlabel=s'      =>  \$rlabel,       # pstampDependent.rlabel (deprecated)
     'need_magic'    =>  \$need_magic,
     'fault_count=i' =>  \$fault_count,
@@ -72,4 +73,17 @@
    $ipprc->redirect_output($logfile);
 }
+
+if ($label) {
+    # rlabel is deprecated. Use one based on the supplied label parameter which is the current label 
+    # for the request, which may be different than the one given to the dependent when the job was parsed.
+    # XXX: having the convention that update label is 'ps_ud_' . $label of request embedded here 
+    # (and formerly in pstampparse.pl) is not particularly clean but it's simple.
+    my $new_rlabel = 'ps_ud_' . $label;
+    if ($new_rlabel ne $rlabel) {
+        print "Notice: using $new_rlabel instead of $rlabel for update label.\n";
+        $rlabel = $new_rlabel;
+    }
+}
+
 
 if (!$ps_dbserver) {
