system/dbus: remove builder state leak
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (race detector) (push) Successful in 3m56s
Test / Hpkg (push) Successful in 4m2s
Test / Hakurei (race detector) (push) Successful in 4m44s
Test / Sandbox (push) Successful in 1m23s
Test / Hakurei (push) Successful in 2m14s
Test / Flake checks (push) Successful in 1m26s
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (race detector) (push) Successful in 3m56s
Test / Hpkg (push) Successful in 4m2s
Test / Hakurei (race detector) (push) Successful in 4m44s
Test / Sandbox (push) Successful in 1m23s
Test / Hakurei (push) Successful in 2m14s
Test / Flake checks (push) Successful in 1m26s
This enables external testing of system.I state. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -13,8 +13,7 @@ func init() { gob.Register(new(spDBusOp)) }
|
||||
|
||||
// spDBusOp maintains an xdg-dbus-proxy instance for the container.
|
||||
type spDBusOp struct {
|
||||
// Whether to bind the system bus socket.
|
||||
// Populated during toSystem.
|
||||
// Whether to bind the system bus socket. Populated during toSystem.
|
||||
ProxySystem bool
|
||||
}
|
||||
|
||||
@@ -30,10 +29,10 @@ func (s *spDBusOp) toSystem(state *outcomeStateSys) error {
|
||||
// downstream socket paths
|
||||
sessionPath, systemPath := state.instance().Append("bus"), state.instance().Append("system_bus_socket")
|
||||
|
||||
if err := state.sys.ProxyDBus(
|
||||
state.sessionBus, state.systemBus,
|
||||
sessionPath, systemPath,
|
||||
); err != nil {
|
||||
var sessionBus, systemBus dbus.ProxyPair
|
||||
sessionBus[0], systemBus[0] = state.k.dbusAddress()
|
||||
sessionBus[1], systemBus[1] = sessionPath.String(), systemPath.String()
|
||||
if err := state.sys.ProxyDBus(state.sessionBus, state.systemBus, sessionBus, systemBus); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user