From c1a9ad2abca0ce18da7ce9cf816c390b7f9c0e11 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 22 Oct 2026 14:38:02 +0200 Subject: [PATCH] issue 1840/S6: take the SDK's process delete for the not-current mark, now that the process state has one --- modules/pacman/cmd/pacman-tools/keeper.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/modules/pacman/cmd/pacman-tools/keeper.go b/modules/pacman/cmd/pacman-tools/keeper.go index ede386f3..16a8871d 100644 --- a/modules/pacman/cmd/pacman-tools/keeper.go +++ b/modules/pacman/cmd/pacman-tools/keeper.go @@ -448,17 +448,6 @@ func ReadKeeperConfig(path string) (KeeperConfig, error) { return c, nil } -// processStore is a process state on the bus as the keeper's Store. Delete is the SDK's when it has one; until -// then a delete fails, named, and the not-current mark stays (said in the log), never silently. -type processStore struct{ process.State } - -func (s processStore) Delete(key string) error { - if d, ok := any(s.State).(interface{ Delete(string) error }); ok { - return d.Delete(key) - } - return fmt.Errorf("the SDK's process state cannot delete a key yet, so %s stays", key) -} - // keeper is `pacman-tools keeper`: it reads its bus account and its config, watches the machine, connects and // runs until stopped. It refuses to start naming what is missing, and never logs a password. func keeper() int { @@ -519,7 +508,7 @@ func runKeeper(ctx context.Context, account process.Account, k *Keeper) error { if k.Node == "" { k.Node = account.Node } - k.State = func(name string) Store { return processStore{conn.State(name)} } + k.State = func(name string) Store { return conn.State(name) } k.Events = conn return k.Run(ctx) }