2026-01-27 17:36:33 +01:00
|
|
|
# -*- 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")
|
2026-03-03 10:52:36 +01:00
|
|
|
parser.add_argument('--only-update', default=False, action='store_true', help='Only update the listed packages, don\'t install them')
|
2026-01-27 17:36:33 +01:00
|
|
|
|
|
|
|
|
async def _run(self, args: Namespace) -> None:
|
|
|
|
|
return await self._backend.run(args)
|