Would this change help?
# HG changeset patch
# User Markus Mützel <address@hidden>
# Date 1580064128 -3600
# Sun Jan 26 19:42:08 2020 +0100
# Node ID b08a376fb1c4cd1af470dcce467a7276813da234
# Parent e6482c932d4bc097050f5fb2e4e5ffd98a5581df
bootstrap: Pull from remote git if $GNULIB_REVISION doesn't exist in local git.
diff -r e6482c932d4b -r b08a376fb1c4 bootstrap
--- a/bootstrap Sun Jan 26 17:00:05 2020 +0100
+++ b/bootstrap Sun Jan 26 19:42:08 2020 +0100
@@ -670,6 +670,9 @@
|| cleanup_gnulib
trap - 1 2 13 15
+
+ elif ! git --git-dir="$gnulib_path"/.git cat-file commit
"$GNULIB_REVISION"; then
+ git --git-dir="$gnulib_path"/.git pull
fi
GNULIB_SRCDIR=$gnulib_path
;;
This only executes if the package is not in a GIT repository (which is the case for
Octave) and the "gnulib" sub-directory already exists.
It assumes that $gnulib_path (i.e. the "gnulib" sub-directory) is a GIT
repository and pulls from remote if the specific commit cannot be found in the local
repository.
This only happens if GNULIB_SRCDIR is not previously set.
A slight modification to skip the test if GNULIB_REVISION is set empty:
diff -r e6482c932d4b bootstrap
--- a/bootstrap Sun Jan 26 17:00:05 2020 +0100
+++ b/bootstrap Sun Jan 26 20:18:45 2020 +0100
@@ -670,6 +670,11 @@
|| cleanup_gnulib
trap - 1 2 13 15
+
+ elif test -n "$GNULIB_REVISION" \
+ && ! git --git-dir="$gnulib_path"/.git cat-file \
+ commit "$GNULIB_REVISION"; then
+ git --git-dir="$gnulib_path"/.git pull
fi
GNULIB_SRCDIR=$gnulib_path
;;
That would allow to skip the update by calling:
GNULIB_REVISION= ./bootstrap