Hi Simon, > Bug #2: ./bootstrap writes to the path indicated by --gnulib-srcdir with > the 'git checkout' command, and leaves the --gnulib-srcdir path at that > commit after ./bootstrap is finished. This happens to work in my > example since I pointed it to a writable work tree, but I think altering > that path is unexpected and not documented. Imagine pointing this to a > system-wide gnulib .git store like --gnulib-srcdir=/usr/share/src/gnulib > or similar read-only place. Or imagine multiple ./bootstrap running at > the same time for different projects, both pointing to the same gnulib > .git work tree. I think the path indicated by --gnulib-srcdir should be > read-only. > > Should the 'git checkout' code be replaced with something like > > git clone --reference "$GNULIB_SRCDIR" "$gnulib_path" \ > && git checkout -C "$gnulib_path" $GNULIB_REVISION > GNULIB_SRCDIR="$gnulib_path" > > Discussion before suggesting patches would be useful, to establish some > agreement on how we want this to behave.
You're right, --gnulib-srcdir and the $GNULIB_SRCDIR variable denote "the local directory where gnulib sources reside. Use this if you already have gnulib sources on your machine, and you want to use these sources." (I introduced the distinction between GNULIB_SRCDIR and GNULIB_REFDIR in commit 2122284380cc0d1b3b6f11d92c04652616da79c7.) Thus the behaviour you observed is a bug. Even worse, 'bootstrap' does it even when the option --no-git is given! How to reproduce: $ git clone git://git.savannah.gnu.org/make.git $ cd make $ ./bootstrap --no-git --gnulib-srcdir=$GNULIB_SRCDIR I think the use of --gnulib-srcdir when GNULIB_REVISION is specified in bootstrap.conf is a classical example of conflicting requests. Which one should take precedence? - IMO --gnulib-srcdir is documented in such a way that it takes precedence. - But one may also argue that it should produce an error, to make the user aware of the conflict. Something like "The option --gnulib-srcdir cannot be honored together because the package specifies a GNULIB_REVISION." The user should be able to resolve the conflict either way, by choosing different command-line options. Bruno