Closed lhh closed 6 days ago
Adding the variable substitution makes sense and is not difficult, so I'll submit a PR once #61 is merged or dropped (to avoid merge conflict).
Using arch
or basearch
should be safe, but any variable is going to be problematic, as those come from the host system where the tool is running, and not whatever build environment you are using.
Fix is proposed in #64. Please check and comment there.
DNF supports using $basearch to represent (effectively)
uname -m
/ architecture in these places:That is, the following repository is valid for use by dnf from the command line and should work for multi-architecture builds by the rpm-lockfile-prototype generator utility:
The DNF command-line utility apparently handles this resolution prior to passing the values to libdnf, so using dnf to install a package with a repo as above works.
As it stands, using a repo like the above causes the rpm-lockfile-protype utility to crash in the following manner:
libdnf._error.Error: Invalid repository id "advanced-virt-$basearch-eus-rpms": invalid character '$' at position 15.