dnf-json: support excluding packages

In our base distro definitions we exclude packages in addition to
including them. Extend dnf-json to support this, so we can depsolve
the base package set as well as the packages added in blueprints.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2020-02-04 16:41:50 +01:00 committed by msehnout
parent b4bb73a195
commit b6d9268810
5 changed files with 16 additions and 15 deletions

View file

@ -109,7 +109,7 @@ elif command == "depsolve":
errors = []
try:
base.install_specs(arguments["package-specs"])
base.install_specs(arguments["package-specs"], exclude=arguments.get("exclude-specs", []))
except dnf.exceptions.MarkingErrors as e:
exit_with_dnf_error("MarkingErrors", f"Error occurred when marking packages for installation: {e}")