xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [OSSTEST PATCH] cs-adjust-flight: Allow runvar-build-set new value to be just "."
@ 2018-07-06 13:49 Ian Jackson
  0 siblings, 0 replies; only message in thread
From: Ian Jackson @ 2018-07-06 13:49 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

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 | 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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-06 13:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-06 13:49 [OSSTEST PATCH] cs-adjust-flight: Allow runvar-build-set new value to be just "." Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).