From 597e36b8f948d8ba318bbfea3febd677d91b6700 Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Tue, 28 Sep 2021 22:27:42 -0400 Subject: [PATCH] kiln: fix local reinstall --- pkg/arvo/lib/hood/kiln.hoon | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/pkg/arvo/lib/hood/kiln.hoon b/pkg/arvo/lib/hood/kiln.hoon index 27201a4a32..808b8205ed 100644 --- a/pkg/arvo/lib/hood/kiln.hoon +++ b/pkg/arvo/lib/hood/kiln.hoon @@ -498,23 +498,27 @@ (emil find:pass listen:pass ~) :: +install-local: install from a local desk, with no remote :: + :: Also notify clients that the desk was installed. + :: ++ install-local |= lac=desk ^+ vats - =. loc lac - ?: (~(has by ark) lac) - =. rak (~(got by ark) lac) - ~> %slog.(fmt "already tracking {here:(abed lac)}, ignoring") - vats - =. rak [~ *rein] - ~> %slog.(fmt "local install {here}") - =. vats update-running-dudes - =. vats (emit listen:pass) - ::NOTE for foreign desks, the download triggers a "real" commit, because - :: we actually download the data. for local desks we do not download - :: any data, it's already there, so we emit a commit "manually". - =. vats (emit (diff:give %commit lac rak)) + |^ ^+ vats + ?. (~(has by ark) lac) + go + =. vats (abed lac) + ?^ rail.rak + go + ~> %slog.(fmt "{} already installed locally, ignoring") vats + :: + ++ go + =. loc lac + =. rak *arak + ~> %slog.(fmt "installing {} locally") + =. vats update-running-dudes + (emil listen:pass (diff:give %commit lac rak) ~) + -- :: +reset: resync after failure :: :: TODO: instead of jumping all the way back to find:pass,