# and, <old-value> is matched against a value
# containing the being-manipulated flight name
# even if the actual runvar value omits it
+# and, if <new-value> ends in ., it is
+# completed with the <old-value>'s job name
#
# <dst-flight>:
# <flight>
return unless $name =~ m/buildjob$/;
my $oldval = $varrow->{val};
- $oldval = flight_otherjob($dstflight,$oldval);
- return unless $oldvalok_fn->($oldval);
+ my ($oldflt,$oldjob) = flight_otherjob($dstflight,$oldval);
+ return unless $oldvalok_fn->("$oldflt.$oldjob");
$matches++;
- $oldval =~ s/^\d+\.//; # strip out previous flight
- my $newval = $specval =~ m/\./ ? $specval : "$specval.$oldval";
+ my $newval = $specval =~ m/\.$/ ? "$specval$oldjob": $specval;
runvar_set($job, $name, $newval, " (modified from \`$oldval')")
if $newval ne $oldval;
}, 'IGNORE');