Created attachment 1452991 [details] f28 config fix Description of problem: Running mock in RHEL7 for an f28 or rawhide root fails with Error: Invalid version flag: if after "Running transaction check" Version-Release number of selected component (if applicable): 1.4.10-1 Additional info: orion gave me the magic items that need adding to/changing in /etc/mock/fedora-rawhide-x86_64.cfg etc. I'll attach a diff which fixes f28-x86_64 for me and would need to be carried over to other relevant configs.
In https://github.com/rpm-software-management/mock/issues/191 it was stated that there are too many bugs to enable 'use_bootstrap_container' by default. You should not need to set dnf as the package manager, as it's the default for fedora configs already. And disabling nspawn shouldn't be needed, particularly if you use mock-1.4.11 which fixes some annoying performance issues when using nspawn. I haven't had time to follow that up and suggest documentation changes. When I filed that ticket, I asked "is it worth changing the default for Fedora >= 28 chroot's to use the bootstrap chroot by default? If not, the warning printed stating that yum "will likely succeed" should probably be adjusted." The default experience is clearly not good, so something should be changed in my opinion. I just lacked the time and desire to suggest a patch.
1) F28 config use dnf as package manager (and always used) https://github.com/rpm-software-management/mock/blob/devel/mock-core-configs/etc/mock/fedora-28-x86_64.cfg#L8 2) The error you gave is AFAIK because of incompatibility of rpm between RHEL7 and F28. So you have to use bootstrap, which is not enabled by default for reasons stated in #1.
If it's supposed not to work (though it successfully built packages for me), could you at least get it to fail with some obvious message, rather than the way it does? However, something that may work (perhaps with a warning it may fail) seems rather better than something that just fails so obscurely.