lib.distros.*.Distro: Align PM prototypes

Make all backend package manager prototypes have the same arguments:

	yum(self, args: list[str], verbose: bool=True, sudo: bool=True)

This also implies having them behave equally verbose, unless
otherwise specified by the caller. This changes the default for
Debian.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-03-16 11:07:41 +01:00
commit 824de4eca4
3 changed files with 9 additions and 6 deletions

View file

@ -19,8 +19,7 @@ class Distro(Base):
cmd.extend(['--non-interactive', '--gpg-auto-import-keys', '--no-gpg-checks'])
cmd.extend(args)
if sudo:
# Run sudo --login in case /etc/profile modifies ZYPP_CONF
return await self.sudo(cmd, opts=['--login'], verbose=verbose)
return await self.sudo(cmd, verbose=verbose)
return await self.run(cmd, verbose=verbose)
async def rpm(self, *args, **kwargs) -> Result: