From 9af32f1aaee3057ecddbd9e1c8ac621255bcc538 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sat, 24 Aug 2019 17:27:50 +0200 Subject: [PATCH] stages/dnf: make install_weak_deps optional Default to True, which is what dnf defaults to, but allow it to be overridden in the pipeline. Whether this option should be used should be a distro policy, but for now we just want it to get images compatible with the official fedora ones. Signed-off-by: Tom Gundersen --- stages/org.osbuild.dnf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stages/org.osbuild.dnf b/stages/org.osbuild.dnf index 59b1354a..47c2d81b 100755 --- a/stages/org.osbuild.dnf +++ b/stages/org.osbuild.dnf @@ -10,6 +10,7 @@ def main(tree, options): packages = options["packages"] releasever = options["releasever"] operation = options.get("operation", "install") + weak_deps = options.get("install_weak_deps", True) with open("/tmp/dnf.conf", "w") as conf: for repoid, repo in repos.items(): @@ -45,7 +46,7 @@ def main(tree, options): "dnf", "-yv", "--installroot", tree, "--setopt", "reposdir=", - "--setopt", "install_weak_deps=False", + "--setopt", f"install_weak_deps={weak_deps}", "--releasever", releasever, "--disableplugin=generate_completion_cache", # supress error that completion db can't be opened "--config", "/tmp/dnf.conf",