From 2d4bc72511ba16473a8e45e86fe05fbd7e35f793 Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Tue, 29 Jun 2021 12:19:31 -0400 Subject: Fix logic of the apt plugin's 'recommends' option The documentation says to set 'recommends' to true or false, with false telling apt not to install recommends. However, the logic in the code does the opposite of that. This also means that by default, all apt-get install calls from vmdb2 run with --no-install-recommends. As a user, it doesn't make much sense to set 'recommends' to true to tell apt not to install recommends. So I think fixing the logic in the code makes more sense than updating the documentation. --- vmdb/plugins/apt_plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmdb/plugins/apt_plugin.py b/vmdb/plugins/apt_plugin.py index 5f11855..2241cfe 100644 --- a/vmdb/plugins/apt_plugin.py +++ b/vmdb/plugins/apt_plugin.py @@ -60,7 +60,7 @@ class AptStepRunner(vmdb.StepRunnerInterface): vmdb.runcmd_chroot(mount_point, argv_prefix + ["apt-get", "update"], env=env) rec = '' - if recommends: + if not recommends: rec = '--no-install-recommends' vmdb.runcmd_chroot( -- cgit v1.2.1