summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rwxr-xr-xbuild-aux/bootstrap37
-rwxr-xr-xtop/bootstrap15
-rw-r--r--top/gen-bootstrap.sed10
4 files changed, 47 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index b3853aae9a..0489cc05b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2022-07-25 Bruno Haible <bruno@clisp.org>
+
+ bootstrap: Make the automatic sync more resilient.
+ Reported by Paul Eggert in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00060.html>.
+ * top/bootstrap (bootstrap_sync): Set to true when bootstrap-funclib.sh
+ is not present.
+ * top/gen-bootstrap.sed: Insert a couple of comment lines.
+ * build-aux/bootstrap: Regenerated using "make build-aux/bootstrap".
+
2022-07-24 Bruno Haible <bruno@clisp.org>
Fix comment.
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index b51be4bc00..a54c995798 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -1,4 +1,8 @@
#! /bin/sh
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
+# This script is only a trampoline that fetches the companion scripts
+# (bootstrap-funclib.sh, autopull.sh, autogen.sh).
+
# Bootstrap this package from checked-out sources.
# Copyright (C) 2003-2022 Free Software Foundation, Inc.
@@ -17,12 +21,12 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Originally written by Paul Eggert. The canonical version of this
-# script is maintained as build-aux/bootstrap in gnulib. However,
-# to be useful to your package, you should place a copy of it under
-# version control in the top-level directory of your package. The
-# intent is that all customization can be done with a bootstrap.conf
-# file also maintained in your version control; gnulib comes with a
-# template build-aux/bootstrap.conf to get you started.
+# script is maintained as top/bootstrap in gnulib. However, to be
+# useful to your package, you should place a copy of it under version
+# control in the top-level directory of your package. The intent is
+# that all customization can be done with a bootstrap.conf file also
+# maintained in your version control; gnulib comes with a template
+# build-aux/bootstrap.conf to get you started.
# Please report bugs or propose patches to bug-gnulib@gnu.org.
@@ -51,9 +55,9 @@ medir=`dirname "$me"`
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Originally written by Paul Eggert. The canonical version of this
-# script is maintained as build-aux/bootstrap-funclib.sh in gnulib.
-# However, to be useful to your package, you should place a copy of it
-# under version control in the top-level directory of your package. The
+# script is maintained as top/bootstrap-funclib.sh in gnulib. However,
+# to be useful to your package, you should place a copy of it under
+# version control in the top-level directory of your package. The
# intent is that all customization can be done with a bootstrap.conf
# file also maintained in your version control; gnulib comes with a
# template build-aux/bootstrap.conf to get you started.
@@ -747,14 +751,7 @@ do
--bootstrap-sync)
bootstrap_sync=true;;
--no-bootstrap-sync)
- if test -f "$medir"/bootstrap-funclib.sh; then
- bootstrap_sync=false
- else
- # We have only completed the first phase of an upgrade from a bootstrap
- # version < 2022-07-24. Need to do the second phase now.
- bootstrap_sync=true
- fi
- ;;
+ bootstrap_sync=false;;
--no-git)
use_git=false;;
*)
@@ -773,6 +770,12 @@ fi
check_build_prerequisites $use_git
+if ! test -f "$medir"/bootstrap-funclib.sh; then
+ # We have only completed the first phase of an upgrade from a bootstrap
+ # version < 2022-07-24. Need to do the second phase now.
+ bootstrap_sync=true
+fi
+
if $bootstrap_sync; then
prepare_GNULIB_SRCDIR
upgrade_bootstrap
diff --git a/top/bootstrap b/top/bootstrap
index b7216d20fe..e9d8ad82aa 100755
--- a/top/bootstrap
+++ b/top/bootstrap
@@ -153,14 +153,7 @@ do
--bootstrap-sync)
bootstrap_sync=true;;
--no-bootstrap-sync)
- if test -f "$medir"/bootstrap-funclib.sh; then
- bootstrap_sync=false
- else
- # We have only completed the first phase of an upgrade from a bootstrap
- # version < 2022-07-24. Need to do the second phase now.
- bootstrap_sync=true
- fi
- ;;
+ bootstrap_sync=false;;
--no-git)
use_git=false;;
*)
@@ -179,6 +172,12 @@ fi
check_build_prerequisites $use_git
+if ! test -f "$medir"/bootstrap-funclib.sh; then
+ # We have only completed the first phase of an upgrade from a bootstrap
+ # version < 2022-07-24. Need to do the second phase now.
+ bootstrap_sync=true
+fi
+
if $bootstrap_sync; then
prepare_GNULIB_SRCDIR
upgrade_bootstrap
diff --git a/top/gen-bootstrap.sed b/top/gen-bootstrap.sed
index 2851db5eaf..c182abfa50 100644
--- a/top/gen-bootstrap.sed
+++ b/top/gen-bootstrap.sed
@@ -1,3 +1,13 @@
+1{
+a\
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
+a\
+# This script is only a trampoline that fetches the companion scripts
+a\
+# (bootstrap-funclib.sh, autopull.sh, autogen.sh).
+a\
+
+}
/^[.] "[$]medir"[/]bootstrap-funclib.sh/{
s/^.*$//
r top/bootstrap-funclib.sh