diff --git a/pkg/arvo/gen/vats.hoon b/pkg/arvo/gen/vats.hoon index 51db85bca7..5fdfaec745 100644 --- a/pkg/arvo/gen/vats.hoon +++ b/pkg/arvo/gen/vats.hoon @@ -1,21 +1,23 @@ -:: Print diagnostic information about desks. +:: Print diagnostic information about desks. :: -:: Accepts an optional argument of a list of one or more desks, returns info +:: Accepts an optional argument of a list of one or more desks, returns info :: on all desks if no desks are specified. :: -:: Keyword arguments include =filt and =verb. =filt takes one of %running, +:: Keyword arguments include =filt and =verb. =filt takes one of %running, :: %suspended, %exists, %exists-not, or %blocking; =verb takes either & or | -:: +:: :: If both a list of desks and a filter are provided, the output will include -:: the desks from the list that match the filter, with the exception of the +:: the desks from the list that match the filter, with the exception of the :: %blocking filter which always returns all desks that match. :: /- *hood :- %say |= [[now=@da * bec=beak] deks=$@(~ (list desk)) filt=@tas verb=_|] -?: &(=(~ deks) =(%$ filt)) - :- %tang - %+ turn - ~(tap in .^((set desk) %cd /(scot %p p.bec)/base/(scot %da now))) +?: &(=(~ deks) =(%$ filt)) + :- %tang + %+ turn + %+ sort + ~(tap in .^((set desk) %cd /(scot %p p.bec)/base/(scot %da now))) + |=([a=desk b=desk] ?|(=(a %kids) =(b %base))) |=(syd=desk (report-vat (report-prep p.bec now) p.bec now syd verb)) -[%tang (report-vats p.bec now deks filt verb)] +[%tang (report-vats p.bec now deks filt verb)] diff --git a/pkg/base-dev/sur/hood.hoon b/pkg/base-dev/sur/hood.hoon index e103a199cf..2cfd73e64f 100644 --- a/pkg/base-dev/sur/hood.hoon +++ b/pkg/base-dev/sur/hood.hoon @@ -41,53 +41,55 @@ |= [our=@p now=@da desks=(list desk) filt=@tas verb=?] =/ ego (scot %p our) =/ wen (scot %da now) - =/ prep (report-prep our now) + =/ prep (report-prep our now) ?~ filt %+ turn (flop desks) |=(syd=@tas (report-vat prep our now syd verb)) - =/ deks - ?~ desks ~(tap in -.prep) - %+ skip ~(tap in -.prep) + =/ deks + ?~ desks + %+ sort ~(tap in -.prep) + |=([[a=desk *] [b=desk *]] ?|(=(a %kids) =(b %base))) + %+ skip ~(tap in -.prep) |=([syd=@tas *] =(~ (find ~[syd] desks))) - ?: =(filt %blocking) + ?: =(filt %blocking) =/ base-wic %+ sort ~(tap by wic:(~(got by -.prep) %base)) - |=([[* a=@ud] [* b=@ud]] (gth a b)) - ?~ base-wic ~[leaf+"%base already up-to-date"] + |=([[* a=@ud] [* b=@ud]] (gth a b)) + ?~ base-wic ~[leaf+"%base already up-to-date"] =/ blockers=(list desk) %+ turn %+ skip ~(tap in -.prep) - |= [* [zest=@tas wic=(set weft)]] - ?. =(zest %live) & - (~(has in wic) i.base-wic) - |=([syd=desk *] syd) + |= [* [zest=@tas wic=(set weft)]] + ?. =(zest %live) & + (~(has in wic) i.base-wic) + |=([syd=desk *] syd) ?~ blockers ~[leaf+"No desks blocking upgrade, run |bump to apply"] :- [%rose [" %" "To unblock upgrade run |suspend %" ""] blockers] %+ turn (flop blockers) - |=(syd=desk (report-vat prep our now syd verb)) + |=(syd=desk (report-vat prep our now syd verb)) %+ turn - ?+ filt !! - :: - %exists - %+ skip deks - |=([syd=desk *] =(ud:.^(cass %cw /[ego]/[syd]/[wen]) 0)) - :: - %running - %+ skim deks + ?+ filt !! + :: + %exists + %+ skip deks + |=([syd=desk *] =(ud:.^(cass %cw /[ego]/[syd]/[wen]) 0)) + :: + %running + %+ skim deks |=([* [zest=@tas *]] =(zest %live)) - :: - %suspended - %+ skip deks - |= [syd=@tas [zest=@tas *]] - ?| =(syd %kids) + :: + %suspended + %+ skip deks + |= [syd=@tas [zest=@tas *]] + ?| =(syd %kids) =(zest %live) =(ud:.^(cass %cw /[ego]/[syd]/[wen]) 0) - == - :: - %exists-not + == + :: + %exists-not %+ skim deks |=([syd=desk *] =(ud:.^(cass %cw /[ego]/[syd]/[wen]) 0)) - == + == |=([syd=desk *] (report-vat prep our now syd verb)) :: +report-vat: report on a single desk installation :: @@ -155,7 +157,7 @@ leaf/"%cz hash ends in: {(truncate-hash hash)}" leaf/"app status: {sat}" leaf/"pending updates: {<`(list [@tas @ud])`~(tap in wic.dek)>}" - == + == :~ leaf/"/sys/kelvin: {kul}" leaf/"base hash: {?.(=(1 (lent meb)) <(head meb)>)}" leaf/"%cz hash: {}"