diff --git a/rust/agama-software/src/zypp_server.rs b/rust/agama-software/src/zypp_server.rs index 10c590350b..7b7b6f5e7b 100644 --- a/rust/agama-software/src/zypp_server.rs +++ b/rust/agama-software/src/zypp_server.rs @@ -200,11 +200,19 @@ impl ZyppServer { break; }; - if let Err(error) = self.dispatch(action, &zypp) { - tracing::error!("Software dispatch error: {:?}", error); - } + match self.dispatch(action, &zypp) { + Ok(false) => { + break; + } + Err(error) => { + tracing::error!("Software dispatch error: {:?}", error); + } + _ => {} + }; } + // drop explicitly zypp to release lock ASAP + drop(zypp); Ok(()) } @@ -213,7 +221,7 @@ impl ZyppServer { &mut self, action: SoftwareAction, zypp: &zypp_agama::Zypp, - ) -> Result<(), ZyppDispatchError> { + ) -> Result { match action { SoftwareAction::Write { state, @@ -242,12 +250,14 @@ impl ZyppServer { } SoftwareAction::Finish(tx) => { self.finish(zypp, tx)?; + // stop server after finish action to release zypp lock ASAP. + return Ok(false); } SoftwareAction::GetProposal(product_spec, sender) => { self.proposal(product_spec, sender, zypp)? } } - Ok(()) + Ok(true) } // Install rpms diff --git a/rust/package/agama.changes b/rust/package/agama.changes index 1518a1c774..e23e5ad50e 100644 --- a/rust/package/agama.changes +++ b/rust/package/agama.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 13 10:54:49 UTC 2026 - Josef Reidinger + +- Release zypp lock after software finish to allow run zypper + in post install scripts (bsc#1258188) + ------------------------------------------------------------------- Thu Mar 12 13:20:48 UTC 2026 - Imobach Gonzalez Sosa