]> xenbits.xensource.com Git - people/royger/osstest.git/commitdiff
cs-adjust-flight: Allow adjusting play flights after start
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 14 May 2018 15:29:28 +0000 (16:29 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 11 Jun 2018 14:38:57 +0000 (15:38 +0100)
Specifically, rather than simply bombing out, if the flight already
has steps, we call dbfl_check again with an empty list of OK
blessings.  dbfl_check will then bomb out, unless the flight's
blessing or intended blessing is `play'.  If it doesn't bomb out, we
print a message.

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

index afb81cbebeacacc1eefd4b3aab10a934f187a4d7..4f036f409030fd4aab475fe2be33ceced1276143 100755 (executable)
@@ -465,7 +465,11 @@ sub changes () {
            $dbh_tests->prepare("SELECT * FROM steps WHERE flight = ?");
        $steps_q->execute($dstflight);
        my $step = $steps_q->fetchrow_hashref();
-       die "$dstflight already has steps\n".Dumper($step) if $step;
+       if ($step) {
+           warn "$dstflight already has steps\n".Dumper($step) if $step;
+           $mjobdb->dbfl_check($dstflight,[]);
+           print STDERR "changing flight $dstflight anyway\n";
+       }
     }
 
     @changes = @org_changes;