package: Add option to skip recommends

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
James Valleroy committed 2018-07-02 19:00:24 -04:00
1 parent 745632d872
commit c511dab7ff
3 files changed
+17 -5

No files matched your search

+8 -1
View File
@@ -38,6 +38,9 @@ def parse_arguments():
subparsers.add_parser('update', help='update the package lists')
subparser = subparsers.add_parser('install', help='install packages')
subparser.add_argument(
'--skip-recommends', action='store_true',
help='whether to skip installing recommended packages')
subparser.add_argument(
'module', help='name of module for which package is being installed')
subparser.add_argument('packages', nargs='+',
@@ -82,7 +85,11 @@ def subcommand_install(arguments):
print('Access check failed:', exception, file=sys.stderr)
sys.exit(99)
_run_apt_command(['install'] + arguments.packages)
if arguments.skip_recommends:
_run_apt_command(
['install', '--no-install-recommends'] + arguments.packages)
else:
_run_apt_command(['install'] + arguments.packages)
def _assert_managed_packages(module, packages):