stages/dnf: allow both operation and verbosity to be configurable

This is for the sake of debuggability, but I figure dnf is the most
complex of our tools, so instrumenting that a bit makes sense.

The defaults are "install" and "info", as before.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2019-06-19 16:07:34 +02:00
parent 28fd21ba40
commit a2441bf112

View file

@ -11,7 +11,8 @@ def main(tree, options):
repos = options["repos"]
packages = options["packages"]
releasever = options["releasever"]
operation = options["operation"]
operation = options.get("operation", "install")
verbosity = options.get("verbosity", "info")
with open("/tmp/dnf.conf", "w") as conf:
p = configparser.ConfigParser()
@ -37,6 +38,7 @@ def main(tree, options):
"--setopt", "reposdir=",
"--setopt", "install_weak_deps=False",
"--releasever", releasever,
"--rpmverbosity", verbosity,
"--config", "/tmp/dnf.conf",
operation
] + packages