]> Savannah Git Hosting - gnulib.git/commitdiff
bootstrap: Make the automatic sync more resilient.
authorBruno Haible <bruno@clisp.org>
Mon, 25 Jul 2022 08:21:42 +0000 (10:21 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 25 Jul 2022 08:21:42 +0000 (10:21 +0200)
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".

ChangeLog
build-aux/bootstrap
top/bootstrap
top/gen-bootstrap.sed

index b3853aae9a615e58e033f672d63c5d499bea1743..0489cc05b3fb2e3cf68b69ccf8d97faf57167a22 100644 (file)
--- 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.
index b51be4bc00bc8d3bf5fa827b2200c5593de74f0f..a54c9957984e5cf3e1e47d5304bcacbfd9ed0c18 100755 (executable)
@@ -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.
 # 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
index b7216d20fe1a74b603601e354b3ea327c98dc91b..e9d8ad82aa465250bd7206795a9de2939028f3c1 100755 (executable)
@@ -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
index 2851db5eaf04292354b8fa3fe5af5eb213eb34e5..c182abfa50959d71ab6c3d44c1541dc9ef5eb9c5 100644 (file)
@@ -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