Hi Paul, Paul Eggert wrote: > + * top/bootstrap-funclib.sh (prepare_GNULIB_SRCDIR): > + Use GNULIB_REFDIR also when a submodule 'gnulib' is not configured. > + This greatly speeds up bootstrapping Octave when using > + ‘./bootstrap --gnulib-refdir=...’.
I see two problems with this patch: 1) In the case that a submodule 'gnulib' is configured, the effect of --gnulib-refdir is only a speedup, i.e. there is no functional difference later between the cases with and without --gnulib-refdir. However, with your patch that does git clone "$GNULIB_REFDIR" "$gnulib_path" in the case that a submodule 'gnulib' is not configured, there is a functional difference: a "git pull" from the subdirectory gnulib/ will *not* pull from savannah directly. It will pull from the specified refdir. So that, in order to get the latest 'master', the user would have to first do a 'git pull' in the refdir, and then do a 'git pull' in the subdirectory gnulib/. This is problematic because - This is almost certainly not the intended behaviour. - This gives two different meanings to the same command-line option --gnulib-refdir and to the environment variable GNULIB_REFDIR. (Recall the major hassles that we had when we had two different meanings for GNULIB_SRCDIR? It was a PITA for years.) I would therefore suggest a different implementation: one for which --gnulib-refdir is *only* a speedup, like in the other case. I tried the --dissociate option, but it has no effect here. Maybe what we need instead of git clone "$GNULIB_REFDIR" "$gnulib_path" is just a plain copy, roughly like this: mkdir "$gnulib_path" cp -a "$GNULIB_REFDIR"/.git "$gnulib_path"/.git (cd "$gnulib_path" && git checkout ...) 2) It needs to be documented in the --help option. So far, GNULIB_REFDIR is only mentioned for the case that a 'gnulib' submodule is configured (first paragraph that starts with "Otherwise, if"). It needs to be mentioned also in the second paragraph that starts with "Otherwise, if". Bruno