From 22ad2516c9d36ecd2c67030baa43d1d9c3432041 Mon Sep 17 00:00:00 2001 From: Fang Date: Wed, 15 Sep 2021 23:46:56 +0200 Subject: [PATCH] kiln: install from existing desks during +on-init During kiln's +on-init, we now check for non-base (and non-kids) desks. If any are present, we execute the install flow for them, and set them to sync from our sponsor afterwards. This depends on work done in d7afe3229, in that without those changes the successive +find requests from kiln to clay would clobber each other, leaving only the "install from sponsor" one active, thus never actually installing the desk for which we already have the files. --- pkg/arvo/lib/hood/kiln.hoon | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/pkg/arvo/lib/hood/kiln.hoon b/pkg/arvo/lib/hood/kiln.hoon index a0cc3ca78..487692280 100644 --- a/pkg/arvo/lib/hood/kiln.hoon +++ b/pkg/arvo/lib/hood/kiln.hoon @@ -212,11 +212,30 @@ ++ on-init =< abet ~> %slog.0^leaf/"kiln: boot" - =/ =rein [liv=& add=(sy %hood %dojo ~) sub=~] :: TODO questionable - =/ daz (get-apps-want base-bill rein) - %- emil - %- zing ^- (list (list card:agent:gall)) - (turn daz start-dude:~(pass vats [%base *arak])) + =/ desks=(set desk) + .^((set desk) %cd /(scot %p our)//(scot %da now)) + =. desks (~(del in desks) %base) + =. desks (~(del in desks) %kids) + :: set up base desk + :: + =. ..on-init + =/ =rein [liv=& add=(sy %hood %dojo ~) sub=~] :: TODO questionable + =/ daz (get-apps-want base-bill rein) + %- emil + %- zing ^- (list (list card:agent:gall)) + (turn daz start-dude:~(pass vats [%base *arak])) + :: install other desks + :: + =/ dez=(list desk) ~(tap in desks) + =/ sop=ship + (sein:title our now our) + |- + ?~ dez ..on-init + =. ..on-init + abet:(install:vats i.dez our i.dez) + =? ..on-init !=(sop our) + abet:(install:vats i.dez sop i.dez) + $(dez t.dez) :: ++ on-load => |%