From: Ian Jackson Date: Sun, 10 May 2020 21:52:45 +0000 (+0100) Subject: OOT FIXES X-Git-Tag: nailing-cargo/1.0.0~211 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=d8d4729e5131c4d41464cda5cf563bd14570dfbd;p=nailing-cargo.git OOT FIXES --- 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;