From bfad94c1963297f07398cc9514f265fbf6fae54d Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Mon, 15 Jun 2026 07:30:51 +0200 Subject: [PATCH] lib.distros.suse.Distro._install_local_files(): Use rpm OpenSUSE leaves installing local packages to the default implementation in lib.Distro._install_local_files(), which passes the package path to the package manager, i.e. zypper in OpenSUSE's case. That has advantages, namely automatic installation of dependencies, but also disadvantages, namely the attempt to install dependencies even if the package manager is disfunctional, possibly because an installed package containing installation sources is broken. That could lead to a deadlock when trying to install a fixed package. I see two ways out: Support an additional flag to jw-pkg's install command which selects whether or not dependencies shall be resolved along, or just use rpm directly for all local install attempts. The latter is the less fancy way to handle this, so as a first step make it the default by overriding suse.Distro._install_local_files(). Signed-off-by: Jan Lindemann --- src/python/jw/pkg/lib/distros/suse/Distro.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/python/jw/pkg/lib/distros/suse/Distro.py b/src/python/jw/pkg/lib/distros/suse/Distro.py index b213cad0..6c9d1f1a 100644 --- a/src/python/jw/pkg/lib/distros/suse/Distro.py +++ b/src/python/jw/pkg/lib/distros/suse/Distro.py @@ -73,6 +73,11 @@ class Distro(Base): cmd += names await self.zypper(cmd) + async def _install_local_files( + self, paths: Iterable[str], only_update: bool + ) -> None: + await self.rpm(['-U', '--reinstall', *paths]) + async def _delete(self, names: Iterable[str]) -> None: await self.rpm(['-e', *names], sudo = True) -- 2.54.0