[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH] cs-adjust-flight: Allow runvar-build-set new value to be just "."



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@xxxxxxxxxxxxx>
---
 cs-adjust-flight | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cs-adjust-flight b/cs-adjust-flight
index 4f036f4..ee1d917 100755
--- a/cs-adjust-flight
+++ b/cs-adjust-flight
@@ -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');
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.