chiark / gitweb /
OOT FIXES
[nailing-cargo.git] / nailing-cargo
index 083287ace7af033e7e29657463afaeaef00f95c8..e17a15b7c349abbb557e62c82a3320a47d84acd7 100755 (executable)
@@ -487,6 +487,15 @@ sub invoke () {
   }
 }
 
+sub cargo_lock_update_after () {
+  return unless $cargo_lock_update;
+  # avoids importing File::Copy and the error handling is about as good
+  $!=0; $?=0;
+  my $r= system qw(cp --), "$build_absdir/Cargo.lock", "Cargo.lock";
+  die "$self: run cp: $! $?" if $r<0 || $r & 0xff;
+  die "$self: failed to update local Cargo.lock (wait status $r)\n" if $r;
+}
+
 sub uninstall1 ($$) {
   my ($mf, $enoentok) = @_;
   my $unnailed = "$mf.unnailed";
@@ -537,7 +546,9 @@ readnail();
 consider_oot();
 readorigs();
 calculate();
-calculate_oot();
+addargs();
+oot_massage_cmdline();
+setenvs();
 
 if ($dump) {
   eval '
@@ -568,7 +579,7 @@ my $estatus = invoke();
 uninstall();
 $want_uninstall = 1;
 
-get_cargo_lock() if $oot_cargo_lock_faff;
+cargo_lock_update_after();
 
 print STDERR "$self: unnailed.  status $estatus.\n" if $verbose;