jw-pkg/src/python/jw/pkg/lib/distros/debian/Install.py

19 lines
523 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
from argparse import Namespace
from ...Cmd import Cmd
from ..BeInstall import BeInstall as Base
class Install(Base):
def __init__(self, parent: Cmd):
super().__init__(parent)
async def run(self, args: Namespace):
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)
return await self.util.apt_get(apt_get_args)