octave-maintainers
[Top][All Lists]
Advanced

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

Re: gnulib is no longer an hg subrepo


From: John W. Eaton
Subject: Re: gnulib is no longer an hg subrepo
Date: Mon, 27 Jan 2020 01:41:40 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 1/26/20 2:23 PM, "Markus Mützel" wrote:
Am 26. Januar 2020 um 19:52 Uhr schrieb "Markus Mützel":

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

That seems good to me. We could maintain our own patched version of the bootstrap script but it seems to me that it would be better to have something like this added to the version that is provided in gnulib.

jwe





reply via email to

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