]> xenbits.xensource.com Git - people/royger/osstest.git/commitdiff
cs-adjust-flight: Allow runvar-build-set new value to be just "."
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 6 Jul 2018 13:36:37 +0000 (14:36 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 9 Jul 2018 10:47:07 +0000 (11:47 +0100)
This is useful because if you say new: for the flight to be adjusted,
you don't have the flight number.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
cs-adjust-flight

index 4f036f409030fd4aab475fe2be33ceced1276143..ee1d917c1f82d0f4965e600535c006944abd171d 100755 (executable)
@@ -14,7 +14,7 @@
 #   runvar-del <job-spec> <var-spec>
 #   runvar-change <job-spec> <var-spec> <old-value> <new-value>
 #   runvar-perlop <job-spec> <var-spec> <perl-expr>
-#   runvar-build-set <job-spec> <var-spec> <old-meaning> <new-value>|<flight>.
+#   runvar-build-set <job-spec> <var-spec> <old-meaning> <new-value>|<flight>.|.
 #   recipe-set <job-spec> <new-value>
 #   intended-blessing <intended-blessing>
 #   branch-set <new-branch>
@@ -35,6 +35,7 @@
 #                    omits it
 #                   and, if <new-value> ends in ., it is
 #                    completed with the <old-value>'s job name
+#                    (and if it is just `.' it means just that job name)
 #
 # <dst-flight>:
 #   <flight>
@@ -369,7 +370,8 @@ sub change__runvar_build_set {
        return unless $oldvalok_fn->("$oldflt.$oldjob");
 
        $matches++;
-       my $newval = $specval =~ m/\.$/ ? "$specval$oldjob": $specval;
+       my $newval = $specval eq '.' ? $oldjob :
+           $specval =~ m/\.$/ ? "$specval$oldjob": $specval;
         runvar_set($job, $name, $newval, " (modified from \`$oldval')")
            if $newval ne $oldval;
     }, 'IGNORE');