mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
package: Add option to skip recommends
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
3 files changed
+17
-5
No files matched your search
+8
-1
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user