Re: [PATCH] contrib: Add autoregen.py

Simon Marchi via Gdb
2024-04-30T18:00:37Z

On 2024-04-30 08:50, Christophe Lyon via Gdb wrote:
>> It may be nice (not sure) to include `git log` or `git shortlog`
>> in the commit message to preserve some history too.
>>
>>>
>>> It is intended as a helper to regenerate files managed by autotools
>>> (autoconf, automake, aclocal, ....), as well as the toplevel
>>> Makefile.in which is created by autogen.
>>>
>>> Other files can be updated when using maintainer-mode, but this is not
>>> covered by this script.
>>
>> Who will own contrib/autoregen.py? Do we need to get all changes
>> reviewed across gdb, binutils, and gcc? The shared files tend to be a
>> huge pain for this.
> Yes, that's a concern I have.
> My motivation for adding it to contrib/ is to make it more visible (I
> don't think
> many contributors know where to find the sources of the autoregen
> buildbot, maybe most don't know it exists)
> It would also mean that the buildbot could do the equivalent of
> cd $project #project is one of gcc, binutils-gdb
> if [ -f .contrib/autoregen.py ]; then
> ./contrib/autoregen.py
> fi
>
> but that doesn't solve the maintenance pain indeed.
>
> Or maybe just drop this idea, and somehow make the existence
> of the buildbot more widely known? (how?)

Having this file in the repo is much better. This way, we know that a
particular version of the script at a given commit works well for the
code in the repo at that commit. This way you can go back in time at an
old commit and re-generate things using the autoregen.py at that commit,
and it should just work.

I would suggest that maintainers on either side (gcc and binutils-gdb)
can approve modifications to the script, we just need to make sure to
sync the changes to the other repo now and then, just like we do for
other shared files.

Simon