2026-01-28 07:18:21 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
|
from argparse import Namespace
|
|
|
|
|
|
|
|
|
|
from ...Cmd import Cmd
|
2026-02-17 12:24:12 +01:00
|
|
|
from ..BeInstall import BeInstall as Base
|
2026-01-28 07:18:21 +01:00
|
|
|
|
2026-02-17 12:24:12 +01:00
|
|
|
class Install(Base):
|
2026-01-28 07:18:21 +01:00
|
|
|
|
|
|
|
|
def __init__(self, parent: Cmd):
|
|
|
|
|
super().__init__(parent)
|
|
|
|
|
|
|
|
|
|
async def run(self, args: Namespace):
|
2026-03-03 10:52:36 +01:00
|
|
|
apt_get_args = ['install']
|
|
|
|
|
if args.only_update:
|
|
|
|
|
apt_get_args.append('--only-upgrade')
|
|
|
|
|
apt_get_args.append('--no-install-recommends')
|
|
|
|
|
apt_get_args.extend(args.packages)
|
2026-03-04 16:00:20 +00:00
|
|
|
return await self.util.apt_get(apt_get_args)
|