From 6e3fec0becb6fb01e0646c408c1a501e520dfdc9 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 27 Jan 2026 17:36:33 +0100 Subject: [PATCH] jw.pkg.cmds.distro.CmdInstall: Add module Add CmdRefresh, the class providing the "jw-pkg.py distro install" subcommand. Signed-off-by: Jan Lindemann --- src/python/jw/pkg/cmds/distro/CmdInstall.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/python/jw/pkg/cmds/distro/CmdInstall.py diff --git a/src/python/jw/pkg/cmds/distro/CmdInstall.py b/src/python/jw/pkg/cmds/distro/CmdInstall.py new file mode 100644 index 00000000..7ec9039c --- /dev/null +++ b/src/python/jw/pkg/cmds/distro/CmdInstall.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +from argparse import Namespace, ArgumentParser + +from .Cmd import Cmd +from ..CmdDistro import CmdDistro + +class CmdInstall(Cmd): # export + + def __init__(self, parent: CmdDistro) -> None: + super().__init__(parent, 'install', help="Install the distribution's notion of available packages") + + def add_arguments(self, parser: ArgumentParser) -> None: + super().add_arguments(parser) + parser.add_argument("packages", nargs="*", help="Packages to be installed") + + async def _run(self, args: Namespace) -> None: + return await self._backend.run(args)