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.
If --gnulib-srcdir is given and GNULIB_REVISION is set in bootstrap.conf: * The current behaviour (now independent of submodule or not) is that - Without --no-git, the GNULIB_REVISION is checked out in $GNULIB_SRCDIR. If this directory has local modifications, git reports an error, and 'bootstrap' fails. If it does not have local modifications, the $GNULIB_SRCDIR is left in that modified state. - With --no-git, the contents of $GNULIB_SRCDIR is left unmodified. So, the user has the possibility to force the behaviour they desire. * But I agree that it would be useful to change "If the environment variable GNULIB_SRCDIR is set, then sources are fetched from that local directory. If it is a git repository and the configuration variable GNULIB_REVISION is set in bootstrap.conf, then that revision is checked out." to "If the environment variable GNULIB_SRCDIR is set, then sources are fetched from that local directory. If the configuration variable GNULIB_REVISION is set in bootstrap.conf, it is ignored." for 3 reasons: - As a simple-to-remember rule, $GNULIB_SRCDIR would always be left unmodified. - The purpose of GNULIB_REVISION is to simulate a submodule without actually having a git submodule. Only very few packages use this: GNU make, man-db, libpipeline, binfmt-support. Probably they wanted to avoid submodules because of the extra learning curve associated with git submodules. The submodule is only considered in the case that GNULIB_SRCDIR is not set. Therefore, it would be consistent to consider GNULIB_REVISION also only when GNULIB_SRCDIR is not set. - The recipe for using a modified gnulib ./bootstrap --no-git --gnulib-srcdir=... would be simplified to ./bootstrap --gnulib-srcdir=... And what would a user do who was using GNULIB_SRCDIR and _wants_ the GNULIB_REVISION to be respected? They would set GNULIB_REFDIR instead of GNULIB_SRCDIR. (This is precisely the point of GNULIB_REFDIR!) Bruno