]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
host props: support "no-reinstall" flag, which means we don't necessarily get Ether...
authorIan Jackson <iwj@woking.cam.xci-test.com>
Mon, 28 Jan 2013 18:04:05 +0000 (18:04 +0000)
committerIan Jackson <iwj@woking.cam.xci-test.com>
Tue, 29 Jan 2013 11:20:35 +0000 (11:20 +0000)
Osstest.pm
ts-host-install
ts-xen-build-prep

index 71b4bba1b981391ea7d701e6ac0bb8c77402b83a..1a8d189247dd9783693d3e0bd18e9f45d5e1a845 100644 (file)
@@ -1724,7 +1724,8 @@ END
     }
     $flagsq->finish();
 
-    if (!$ho->{Ether} || !$ho->{Power}) {
+    if (!$ho->{Flags}{'no-reinstall'} &&
+       (!$ho->{Ether} || !$ho->{Power})) {
         my $dbh_config= opendb('configdb');
         my $selname= $ho->{Fqdn};
         my $sth= $dbh_config->prepare(<<END);
@@ -1762,7 +1763,9 @@ END
     $ho->{SharedOthers}=
         $ho->{Shared} ? $ho->{Shared}{Others} : 0;
 
-    logm("host: selected $ho->{Name} $ho->{Ether} $ho->{Ip}".
+    my $show_ether = $ho->{Ether};
+    $show_ether ||= '<no_ether>';
+    logm("host: selected $ho->{Name} $show_ether $ho->{Ip}".
          (!$ho->{Shared} ? '' :
           sprintf(" - shared %s %s %d", $ho->{Shared}{Type},
                   $ho->{Shared}{State}, $ho->{Shared}{Others}+1)));
index d5948ed8adb203f00a39351659b85dc4b5f3b633..7931d8f6b3b38c4f873a20d5711bd697928140f3 100755 (executable)
@@ -22,6 +22,7 @@ if (@ARGV && $ARGV[0] =~ m/^--priority(?:=(.*))?$/) {
 our ($whhost) = @ARGV;
 $whhost ||= 'host';
 our $ho= selecthost($whhost);
+exit 0 if $ho->{Flags}{'no-reinstall'};
 exit 0 if $ho->{SharedReady};
 die if $ho->{SharedOthers};
 
index 5248ecd0fcb89c5edaae81003f56052737a550c3..61823516ec37da5d5bae36aef2747be7f3e3b7e5 100755 (executable)
@@ -218,11 +218,13 @@ sub ccache_setup () {
     }
 }
 
-lvextend_stage1();
-prep();
-cacheing_git_mount();
-cacheing_git_install();
-ccache_setup();
-lvextend_stage2();
+if (!$ho->{Flags}{'no-reinstall'}) {
+    lvextend_stage1();
+    prep();
+    cacheing_git_mount();
+    cacheing_git_install();
+    ccache_setup();
+    lvextend_stage2();
+}
 resource_shared_mark_ready($ho->{Ident}, $ho->{Name},
                            "build-".$ho->{Suite}."-".$r{arch});