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 <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-02-17 10:33:52 +01:00
commit 2cc3b59e75
5 changed files with 9 additions and 9 deletions

View file

@ -3,7 +3,7 @@
from ....lib.util import run_cmd, run_sudo from ....lib.util import run_cmd, run_sudo
from ..Cmd import Cmd from ..Cmd import Cmd
class BackendCmd: class Backend:
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
self.__parent = parent self.__parent = parent

View file

@ -1,9 +1,9 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from ...Cmd import Cmd from ...Cmd import Cmd
from ..BackendCmd import BackendCmd from ..Backend import Backend
class Base(BackendCmd): class Base(Backend):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)

View file

@ -1,9 +1,9 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from ...Cmd import Cmd from ...Cmd import Cmd
from ..BackendCmd import BackendCmd from ..Backend import Backend
class Base(BackendCmd): class Base(Backend):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)

View file

@ -1,9 +1,9 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from ...Cmd import Cmd from ...Cmd import Cmd
from ..BackendCmd import BackendCmd from ..Backend import Backend
class Base(BackendCmd): class Base(Backend):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)

View file

@ -1,9 +1,9 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from ...Cmd import Cmd from ...Cmd import Cmd
from ..BackendCmd import BackendCmd from ..Backend import Backend
class Base(BackendCmd): class Base(Backend):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)