On 3/10/20 11:28 AM, Zack Weinberg wrote:
>
> Thanks for the suggestion! I have no experience with Gentoo myself
> but I've made a note to look at doing this at some point. You say you
> automatically regenerate the configure script for any package that
> needs to patch the build system, but do you have a way to direct a
> bootstrap cycle to *unconditionally* regenerate the configure scripts
> for each package?
Not out-of-the-box, but our packages are essentially bash scripts, so it
should be pretty easy to hack the package manager to insert a line or
two that rebuilds everything whenever e.g. configure.{in,ac} is present.
As a proof-of-concept, adding
pre_src_prepare() {
[[ -f configure.ac || -f configure.in ]] && autoreconf -fi
}
to /etc/portage/bashrc [0] seems to work in the few simple cases I tried.
[0] https://wiki.gentoo.org/wiki//etc/portage/bashrc