osbuild / bootc-image-builder

A container for deploying bootable container images.
https://osbuild.org
Apache License 2.0
133 stars 57 forks source link

InitDNF() can fail with dnf variants/aliases #499

Open achilleas-k opened 4 months ago

achilleas-k commented 4 months ago

Some variants or wrappers for dnf that are likely to be used in base images return with an exit code when run without arguments (for example, the dnf rpm-ostree wrapper).

To generate manifests for ISOs, we do a quick call to dnf to trigger the subscription manager to write out repository configs: https://github.com/osbuild/bootc-image-builder/blob/61863ff3c39da79716b0a94945b153e58a138ca6/bib/internal/container/container.go#L126-L137

If a dnf variant/wrapper exits with a non-zero status here, the build will fail.

cgwalters commented 2 months ago

We're planning to deprecate and hopefully eventually remove the rpm-ostree cliwrap for dnf (and hopefully all the cliwrap over time).