From d8d4729e5131c4d41464cda5cf563bd14570dfbd Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 10 May 2020 22:52:45 +0100 Subject: [PATCH] OOT FIXES --- nailing-cargo | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/nailing-cargo b/nailing-cargo index 083287a..e17a15b 100755 --- a/nailing-cargo +++ b/nailing-cargo @@ -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; -- 2.30.2