bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bootstrap: clean only gnulib's stray links


From: Akim Demaille
Subject: Re: bootstrap: clean only gnulib's stray links
Date: Fri, 4 Jan 2019 16:42:26 +0100

Hi Jim!

> Le 2 janv. 2019 à 06:27, Jim Meyering <address@hidden> a écrit :
> 
> Hi Akim,
> 
> My only concern is that `pwd` may sometimes fail to match the link
> name when it should. E.g., when mount points or directory symlinks are
> involved.
> 
> Instead, can you simply make the bootstrap script fail when the
> submodules are not initialized?

Simpler, safer, better, en un mot, Meyer :-)


How about this?

commit 0ae8fc82977b95c50317a2f9c6f38fb8bb105c28
Author: Akim Demaille <address@hidden>
Date:   Mon Dec 31 19:20:46 2018 +0100

    bootstrap: die when some submodules are not initialized
    
    * build-aux/bootstrap: Make sure all submodules are initialized.

diff --git a/ChangeLog b/ChangeLog
index f520d5e72..6aa873cf7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-01-04  Akim Demaille  <address@hidden>
+
+       bootstrap: die when some submodules are not initialized
+       * build-aux/bootstrap: Make sure all submodules are initialized.
+
 2019-01-04  Bruno Haible  <address@hidden>
 
        bitsetv: Fix module dependencies.
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index c13b486c5..dbc134752 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2018-10-13.05; # UTC
+scriptversion=2019-01-04.15; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -963,6 +963,16 @@ fi
 bootstrap_post_import_hook \
   || die "bootstrap_post_import_hook failed"
 
+# Don't proceed if there are non-initialized submodules.  In
+# particular, the next step will remove dangling links, which might be
+# links into non-initialized submodules.
+#
+# Non-initialized submodules are listed with an initial dash.
+if $use_git && git submodule | grep '^-' >/dev/null; then
+  die "some git submodules are not initialized. "     \
+      "Run 'git submodule init' and bootstrap again."
+fi
+
 # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
 # gnulib-populated directories.  Such .m4 files would cause aclocal to fail.
 # The following requires GNU find 4.2.3 or newer.  Considering the usual




reply via email to

[Prev in Thread] Current Thread [Next in Thread]