From cdd7f33f06e5864fdf0d13731398f5021e285647 Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Thu, 25 Oct 2012 14:00:09 +0000 Subject: [PATCH] bootstrap: be sure to register gnulib submodule. * gl/build-aux/bootstrap.in (require_gnulib_submodule): Register the gnulib submodule before updating it, even with a shallow clone of gnulib. * bootstrap: Regenerate. Reported by Robert Boehne. Signed-off-by: Gary V. Vaughan --- bootstrap | 13 ++++++------- gl/build-aux/bootstrap.in | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/bootstrap b/bootstrap index 656f15224..d9fc979bd 100755 --- a/bootstrap +++ b/bootstrap @@ -3621,16 +3621,13 @@ func_require_gnulib_submodule () $require_gnulib_url if test -f .gitmodules && test -f "$gnulib_path/gnulib-tool"; then - func_show_eval "$GIT submodule update" \ - 'func_fatal_error "Unable to update gnulib submodule."' + : All present and correct. elif test -n "$opt_gnulib_srcdir"; then # Older git can't clone into an empty directory. rmdir "$gnulib_path" 2>/dev/null func_show_eval "$GIT clone --reference '$opt_gnulib_srcdir' \ '$gnulib_url' '$gnulib_path'" \ - && func_show_eval "$GIT submodule init" \ - && func_show_eval "$GIT submodule update" \ || func_fatal_error "Unable to fetch gnulib submodule." # Without --gnulib-srcdir, and no existing checked out submodule, we @@ -3645,13 +3642,15 @@ func_require_gnulib_submodule () func_show_eval "$GIT clone $shallow '$gnulib_url' '$gnulib_path'" \ func_cleanup_gnulib - func_show_eval "$GIT submodule update" \ - 'func_fatal_error "Unable to update gnulib submodule."' - # FIXME: Solaris /bin/sh will try to execute '-' if any of # these signals are caught after this. trap - 1 2 13 15 fi + + # Make sure we've checked out the correct revision of gnulib. + func_show_eval "$GIT submodule init" \ + && func_show_eval "$GIT submodule update" \ + || func_fatal_error "Unable to update gnulib submodule." fi require_gnulib_submodule=: diff --git a/gl/build-aux/bootstrap.in b/gl/build-aux/bootstrap.in index 130c5f7c1..7df66b107 100755 --- a/gl/build-aux/bootstrap.in +++ b/gl/build-aux/bootstrap.in @@ -1431,16 +1431,13 @@ func_require_gnulib_submodule () $require_gnulib_url if test -f .gitmodules && test -f "$gnulib_path/gnulib-tool"; then - func_show_eval "$GIT submodule update" \ - 'func_fatal_error "Unable to update gnulib submodule."' + : All present and correct. elif test -n "$opt_gnulib_srcdir"; then # Older git can't clone into an empty directory. rmdir "$gnulib_path" 2>/dev/null func_show_eval "$GIT clone --reference '$opt_gnulib_srcdir' \ '$gnulib_url' '$gnulib_path'" \ - && func_show_eval "$GIT submodule init" \ - && func_show_eval "$GIT submodule update" \ || func_fatal_error "Unable to fetch gnulib submodule." # Without --gnulib-srcdir, and no existing checked out submodule, we @@ -1455,13 +1452,15 @@ func_require_gnulib_submodule () func_show_eval "$GIT clone $shallow '$gnulib_url' '$gnulib_path'" \ func_cleanup_gnulib - func_show_eval "$GIT submodule update" \ - 'func_fatal_error "Unable to update gnulib submodule."' - # FIXME: Solaris /bin/sh will try to execute '-' if any of # these signals are caught after this. trap - 1 2 13 15 fi + + # Make sure we've checked out the correct revision of gnulib. + func_show_eval "$GIT submodule init" \ + && func_show_eval "$GIT submodule update" \ + || func_fatal_error "Unable to update gnulib submodule." fi require_gnulib_submodule=: -- 2.47.3