From 2cc3b59e756299fb31ff9fc6c68331ce11abed09 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 17 Feb 2026 10:33:52 +0100 Subject: [PATCH] jw.pkg.cmds.distro.backend.BackendCmd -> Backend Rename jw.pkg.cmds.distro.backend.BackendCmd to Backend, because it's not necessarily a command, i.e. doesn't necessarily have a run() method. It's more of a distribution abstraction of the steps needed for for a specific command, the run() method itself is implemented in jw.pkg.cmds.distro.CmdXxx. This commit is the beginning of a bigger move to change the distribution backend class hierarchy. At the end of this change set, the backend command should not derive the backend classes from a base specific to the respective distribution, but from an abstract base class specific to the command run. The distribution specifics are then going to be encapsulated in another class called "Util", an instance of which is going to be provided to the backend as .util member. Signed-off-by: Jan Lindemann --- .../jw/pkg/cmds/distro/backend/{BackendCmd.py => Backend.py} | 2 +- src/python/jw/pkg/cmds/distro/backend/arch/Base.py | 4 ++-- src/python/jw/pkg/cmds/distro/backend/debian/Base.py | 4 ++-- src/python/jw/pkg/cmds/distro/backend/redhat/Base.py | 4 ++-- src/python/jw/pkg/cmds/distro/backend/suse/Base.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) rename src/python/jw/pkg/cmds/distro/backend/{BackendCmd.py => Backend.py} (96%) diff --git a/src/python/jw/pkg/cmds/distro/backend/BackendCmd.py b/src/python/jw/pkg/cmds/distro/backend/Backend.py similarity index 96% rename from src/python/jw/pkg/cmds/distro/backend/BackendCmd.py rename to src/python/jw/pkg/cmds/distro/backend/Backend.py index 1be58030..2f2ae568 100644 --- a/src/python/jw/pkg/cmds/distro/backend/BackendCmd.py +++ b/src/python/jw/pkg/cmds/distro/backend/Backend.py @@ -3,7 +3,7 @@ from ....lib.util import run_cmd, run_sudo from ..Cmd import Cmd -class BackendCmd: +class Backend: def __init__(self, parent: Cmd): self.__parent = parent diff --git a/src/python/jw/pkg/cmds/distro/backend/arch/Base.py b/src/python/jw/pkg/cmds/distro/backend/arch/Base.py index 5b88c243..723099c8 100644 --- a/src/python/jw/pkg/cmds/distro/backend/arch/Base.py +++ b/src/python/jw/pkg/cmds/distro/backend/arch/Base.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- from ...Cmd import Cmd -from ..BackendCmd import BackendCmd +from ..Backend import Backend -class Base(BackendCmd): +class Base(Backend): def __init__(self, parent: Cmd): super().__init__(parent) diff --git a/src/python/jw/pkg/cmds/distro/backend/debian/Base.py b/src/python/jw/pkg/cmds/distro/backend/debian/Base.py index 5edb92f5..475237d6 100644 --- a/src/python/jw/pkg/cmds/distro/backend/debian/Base.py +++ b/src/python/jw/pkg/cmds/distro/backend/debian/Base.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- from ...Cmd import Cmd -from ..BackendCmd import BackendCmd +from ..Backend import Backend -class Base(BackendCmd): +class Base(Backend): def __init__(self, parent: Cmd): super().__init__(parent) diff --git a/src/python/jw/pkg/cmds/distro/backend/redhat/Base.py b/src/python/jw/pkg/cmds/distro/backend/redhat/Base.py index ce17d04b..c7f77e73 100644 --- a/src/python/jw/pkg/cmds/distro/backend/redhat/Base.py +++ b/src/python/jw/pkg/cmds/distro/backend/redhat/Base.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- from ...Cmd import Cmd -from ..BackendCmd import BackendCmd +from ..Backend import Backend -class Base(BackendCmd): +class Base(Backend): def __init__(self, parent: Cmd): super().__init__(parent) diff --git a/src/python/jw/pkg/cmds/distro/backend/suse/Base.py b/src/python/jw/pkg/cmds/distro/backend/suse/Base.py index 0de655a6..4c1c8a7a 100644 --- a/src/python/jw/pkg/cmds/distro/backend/suse/Base.py +++ b/src/python/jw/pkg/cmds/distro/backend/suse/Base.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- from ...Cmd import Cmd -from ..BackendCmd import BackendCmd +from ..Backend import Backend -class Base(BackendCmd): +class Base(Backend): def __init__(self, parent: Cmd): super().__init__(parent)