summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2021-06-29 12:19:31 -0400
committerAndres Salomon <dilinger@queued.net>2021-06-29 12:23:10 -0400
commit2d4bc72511ba16473a8e45e86fe05fbd7e35f793 (patch)
tree02d848c8a6aa15e324ef01800fa54aada3819fe0
parentb69f2a696c96c3353f12e0e6008bba59e6c24e57 (diff)
downloadvmdb2-2d4bc72511ba16473a8e45e86fe05fbd7e35f793.tar.gz
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.
-rw-r--r--vmdb/plugins/apt_plugin.py2
1 files changed, 1 insertions, 1 deletions
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(