From 6a5e5aaf0d29d621424bd2cacb421a598a59bb59 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sun, 25 Jan 2026 14:19:35 +0100 Subject: [PATCH] jw.pkg.cmds.distro.CmdRefresh: Add command Add CmdRefresh, the class providing the "jw-pkg.py distro refresh" subcommand. Signed-off-by: Jan Lindemann --- src/python/jw/pkg/cmds/distro/CmdRefresh.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/python/jw/pkg/cmds/distro/CmdRefresh.py diff --git a/src/python/jw/pkg/cmds/distro/CmdRefresh.py b/src/python/jw/pkg/cmds/distro/CmdRefresh.py new file mode 100644 index 00000000..5dc125a6 --- /dev/null +++ b/src/python/jw/pkg/cmds/distro/CmdRefresh.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from argparse import Namespace, ArgumentParser + +from .Cmd import Cmd +from ..CmdDistro import CmdDistro + +class CmdRefresh(Cmd): # export + + def __init__(self, parent: CmdDistro) -> None: + super().__init__(parent, 'refresh', help="Refresh the distribution's notion of available packages") + + def add_arguments(self, parser: ArgumentParser) -> None: + super().add_arguments(parser) + + async def _run(self, args: Namespace) -> None: + return await self._backend.run(args)