On Tue, Dec 28, 2021 at 8:37 AM Vitaly Zaitsev via devel
<devel(a)lists.fedoraproject.org> wrote:
On 28/12/2021 13:17, Neal Gompa wrote:
> It is. There are plenty of packages that compile for tests. I have
> one, for example (libeconf).
I think all compilation should be done in %build.
It is not always reasonably possible, though that is certainly ideal.
A lot of packages compile their tests just-in-time when requested,
rather than building them up front. The issue is that not every build
mechanism stores the compiler flags in a persistent way for multiple
stages. Autotools, CMake, and Meson do; but a lot of others don't.
> Why? If the package is being maintained as a single spec across
> multiple branches, you'd have to ask them to condition it, which is
> hard to do. Removing it would break it for packagers maintaining a
> single spec across branches, all for avoiding a redundant call. It'd
> be better to advise packagers to only use this for older Fedora and
> EPEL and let them fix it.
I agree. I think %set_build_flags can be removed after Fedora 35 reaches
EOL.
Makes sense to me. It might be nice to somehow get this backported to
EPEL, but I wouldn't impose this on the Change proposers.
Might also be worth checking with the RHEL folks to see if it could be
ported to CentOS Stream 9.
--
真実はいつも一つ!/ Always, there's only one truth!