[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bootstrap: improve gnulib git update logic
From: |
Kai Torben Ohlhus |
Subject: |
Re: bootstrap: improve gnulib git update logic |
Date: |
Tue, 18 Aug 2020 11:09:26 +0900 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
Hi Bruno,
I share our conversation [1] with the Octave mailing list.
When GNULIB_SRCDIR is set, this addition should probably work as well.
Looking at it, maybe it can be fixed by extending your code section [2]
by "git fetch":
if test -d "$GNULIB_SRCDIR"/.git && test -n "$GNULIB_REVISION" \
&& ! git_modules_config submodule.gnulib.url >/dev/null; then
(cd "$GNULIB_SRCDIR" && git fetch && git checkout
"$GNULIB_REVISION") || cleanup_gnulib
fi
Maybe Markus has another opinion on this.
Kai
[1] https://lists.gnu.org/archive/html/bug-gnulib/2020-08/msg00150.html
[2]
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=build-aux/bootstrap;h=8f76d696213ae5b1827b44c351e7c667f498cbd7;hb=HEAD#l707
On 8/18/20 3:40 AM, Bruno Haible wrote:
> Hi Kai,
>
>> - If we run in the "old" gnulib clone
>>
>> GNULIB_REVISION=2020-08-15 ./bootstrap
>>
>> we get the message
>>
>> fatal: reference is not a tree: 2020-08-15
>>
>> even though revision 2020-08-15 exists. It is just not available
>> in the "old" local clone.
>
> The patch seems to handle only the case that the user has not set
> GNULIB_SRCDIR.
>
> Shouldn't it apply also to the case with GNULIB_SRCDIR? I.e. add the new
> code near this one:
>
> if test -d "$GNULIB_SRCDIR"/.git && test -n "$GNULIB_REVISION" \
> && ! git_modules_config submodule.gnulib.url >/dev/null; then
> (cd "$GNULIB_SRCDIR" && git checkout "$GNULIB_REVISION") || cleanup_gnulib
> fi
>
> Bruno
>