Open leoluk opened 1 year ago
Our current workaround is to simply do it manually:
# Manually resolve alternatives (https://github.com/rmohr/bazeldnf/issues/28)
ln -r -s -f "${SANDBOX}/root/usr/bin/ld.bfd" "${SANDBOX}/root/usr/bin/ld"
symlinks can be directly set on the rpmtree
target like here: https://github.com/kubevirt/kubevirt/blob/a06915c634a6bc430dac02a8bc8bee048644bdcb/rpm/BUILD.bazel#L1377.
How to handle alternatives?
In a minimal example that just depends on f37 binutils:
...
/usr/bin/ld
ends up being the GOLD linker:In the binutils spec, BFD is the default through the alternatives mechanism: https://src.fedoraproject.org/rpms/binutils/blob/f36/f/binutils.spec#_455
A clean Fedora 37 container uses GNU ld by default even though binutils-gold is installed:
How can I replicate this using bazeldnf?