jw.pkg.App.distro_id: Don't return opensuse

get-os.sh returned "suse" for SuSE-like distros, and that seems more
appropriate since SLES is not OpenSUSE but should share and ID with
other SuSE variants.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-03-03 05:02:44 +01:00
commit 03fca61248
2 changed files with 3 additions and 3 deletions

View file

@ -285,7 +285,7 @@ class App(Base):
val = self.os_release_field('ID', throw=True) val = self.os_release_field('ID', throw=True)
match val: match val:
case 'opensuse-tumbleweed': case 'opensuse-tumbleweed':
self.__distro_id = 'opensuse' self.__distro_id = 'suse'
case 'kali': case 'kali':
self.__distro_id = 'kali' self.__distro_id = 'kali'
case _: case _:
@ -295,7 +295,7 @@ class App(Base):
@property @property
def distro_codename(self) -> str: def distro_codename(self) -> str:
match self.distro_id: match self.distro_id:
case 'opensuse': case 'suse':
self.__distro_codename = \ self.__distro_codename = \
self.os_release_field('ID', throw=True).split('-')[1] self.os_release_field('ID', throw=True).split('-')[1]
case 'kali': case 'kali':

View file

@ -33,7 +33,7 @@ class Cmd(Base): # export
backend_id = 'debian' backend_id = 'debian'
case 'centos': case 'centos':
backend_id = 'redhat' backend_id = 'redhat'
case 'opensuse': case 'opensuse' | 'suse':
backend_id = 'suse' backend_id = 'suse'
self.__backend_path = ( self.__backend_path = (
os.path.splitext(__name__)[0] os.path.splitext(__name__)[0]