[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: git-version-gen not working with Savannah/cgit snapshots
From: |
Bruno Haible |
Subject: |
Re: git-version-gen not working with Savannah/cgit snapshots |
Date: |
Sat, 04 Jun 2022 00:38:23 +0200 |
Hi Branden,
> -elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
> +elif test "x$fallback" = x && ! git --version >/dev/null 2>&1; then
> v=UNKNOWN
> else
> v=$fallback
I don't think that's a bug. The --fallback option is documented like this:
--fallback VERSION
fallback version to use if \"git --version\" fails
And that's what the code does: If the --fallback option was given AND
'git --version' fails, then the line
v=$fallback
is executed. Otherwise the line
v=UNKNOWN
is executed. Your proposed patch would have the effect that v gets set to
empty in some case.
> Here is the output of "git submodule" for this groff release.
>
> c8b8f3bbcde37a53cd226f4c9cebd0dde6aca37f gnulib (v0.1-5208-gc8b8f3bbcd)
>
> We therefore do the following.
>
> $ hash=c8b8f3bbcde37a53cd226f4c9cebd0dde6aca37f
> $ wget -O gnulib.tar.gz https://git.savannah.gnu.org/cgit/gnulib.git/\
> snapshot/gnulib-$hash.tar.gz
> $ tar xf gnulib.tar.gz
>
> ...
>
> $ ./bootstrap --gnulib-srcdir=gnulib-$hash
What you are doing, seems contorted to me:
- You have submodule information in the parent git repository (groff).
- Then you download gnulib, explicitly throwing away its git versioning.
- Then you run bootstrap without '--no-git' option, thereby telling it
to use to the indicated git commits.
IMO you should either
- let 'bootstrap' use the indicated git commits; then of course it needs
the .git directory of the gnulib checkout (and that implies 'git clone'
or 'git submodule' instead of 'wget'), or
- let 'bootstrap' abstain from any git operation; that implies passing
not only --gnulib-srcdir but also --no-git.
By the way, if submodules are not what you want, i.e. if you always want
to use the newest gnulib, I suggest to use the gnulib/top/gitsub.sh script.
Bruno
- git-version-gen not working with Savannah/cgit snapshots, G. Branden Robinson, 2022/06/03
- Re: git-version-gen not working with Savannah/cgit snapshots,
Bruno Haible <=
- Re: git-version-gen not working with Savannah/cgit snapshots, G. Branden Robinson, 2022/06/03
- Re: git-version-gen not working with Savannah/cgit snapshots, Bruno Haible, 2022/06/05
- Re: git-version-gen not working with Savannah/cgit snapshots, Bruno Haible, 2022/06/19
- Re: git-version-gen not working with Savannah/cgit snapshots, G. Branden Robinson, 2022/06/19
- Re: git-version-gen not working with Savannah/cgit snapshots, Bruno Haible, 2022/06/19
- Re: git-version-gen not working with Savannah/cgit snapshots, Dave Kemper, 2022/06/25