Skip to content

image info --resolve-package-list does not handle DNF variables #2908

@AdamWill

Description

@AdamWill

If you try to use kiwi --resolve-package-list with default Fedora profiles, it fails, because this codepath doesn't seem to resolve dnf repo config variables:

[adamw@toolbx fedora-toolbox-43 fedora-kiwi-descriptions (main)]$ kiwi --profile=KDE-Desktop-Live --kiwi-file Fedora.kiwi image info --description=./ --resolve-package-list > /tmp/kde.txt
[ ERROR   ]: 16:09:30 | KiwiUriOpenError: Failed to resolve metalink URI https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=$basearch: HTTP Error 404: Not Found

that is, it's literally using the repo URI https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=$basearch, when it should resolve $basearch to the host system's arch, or the value of --target-arch if specified (specifying --target-arch doesn't help, I checked).

You can hack around this by doing a string substitution on the config file, of course, but it's a bit of a mess. This works during actual image builds, so it seems like it should be possible for it to work for --resolve-package-list too. Though I think during image builds, it's ultimately passed through to dnf somehow - I can't find any code in kiwi for doing it.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions