GNU bug report logs - #66958
[PATCH] build: Require scripts/guix in pre-inst-env.

Previous Next

Package: guix-patches;

Reported by: Sergey Trofimov <sarg <at> sarg.org.ru>

Date: Sun, 5 Nov 2023 18:45:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 66958 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#66958; Package guix-patches. (Sun, 05 Nov 2023 18:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sergey Trofimov <sarg <at> sarg.org.ru>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 05 Nov 2023 18:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: guix-patches <at> gnu.org
Cc: Sergey Trofimov <sarg <at> sarg.org.ru>
Subject: [PATCH] build: Require scripts/guix in pre-inst-env.
Date: Sun,  5 Nov 2023 19:43:34 +0100
* Makefile.am: Make scripts/guix depend on local guile.
* build-aux/pre-inst-env.in: Require scripts/guix.
---
 Makefile.am               | 2 +-
 build-aux/pre-inst-env.in | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index c99f2f2911..d7f14b8962 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,7 +46,7 @@ do_subst = $(SED)					\
   -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),g'	\
   -e 's,[@]localedir[@],$(localedir),g'
 
-scripts/guix: scripts/guix.in Makefile
+scripts/guix: scripts/guix.in Makefile guile$(EXEEXT)
 	$(AM_V_at)rm -f $@ $@-t
 	$(AM_V_at)$(MKDIR_P) "$(@D)"
 	$(AM_V_GEN)$(do_subst) < "$(srcdir)/$@.in" > "$@-t"
diff --git a/build-aux/pre-inst-env.in b/build-aux/pre-inst-env.in
index cd90a06cbc..4063b46a4b 100644
--- a/build-aux/pre-inst-env.in
+++ b/build-aux/pre-inst-env.in
@@ -37,11 +37,18 @@ GUILE_LOAD_COMPILED_PATH="$abs_top_builddir${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_
 GUILE_LOAD_PATH="$abs_top_builddir:$abs_top_srcdir${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
 export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH
 
+CURRENT_GUIX=$(which guix)
 # Define $PATH so that `guix' and friends are easily found.
 
 PATH="$abs_top_builddir/scripts:$abs_top_builddir:$PATH"
 export PATH
 
+# sanity check
+if [ "$CURRENT_GUIX" = "`which guix`" ]; then
+    echo "$abs_top_builddir/scripts/guix is not built. Please run make scripts/guix"
+    exit 1
+fi
+
 # The daemon invokes 'guix'; tell it which one to use.
 GUIX="$abs_top_builddir/scripts/guix"
 export GUIX

base-commit: 286639c9af49dc56dce68a5483fd8ca3aeaecdb0
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#66958; Package guix-patches. (Sun, 19 Nov 2023 13:35:01 GMT) Full text and rfc822 format available.

Message #8 received at 66958 <at> debbugs.gnu.org (full text, mbox):

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: 66958 <at> debbugs.gnu.org
Cc: Sergey Trofimov <sarg <at> sarg.org.ru>
Subject: [PATCH v1] build: Require scripts/guix in pre-inst-env.
Date: Sun, 19 Nov 2023 14:34:10 +0100
* Makefile.am: Make scripts/guix depend on local guile.
* build-aux/pre-inst-env.in: Require scripts/guix.
---
 Makefile.am               | 2 +-
 build-aux/pre-inst-env.in | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index cbc3191dfc..34574c3a0e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -47,7 +47,7 @@ do_subst = $(SED)					\
   -e 's,[@]abs_top_builddir[@],$(abs_top_builddir),g'	\
   -e 's,[@]localedir[@],$(localedir),g'
 
-scripts/guix: scripts/guix.in Makefile
+scripts/guix: scripts/guix.in Makefile guile$(EXEEXT)
 	$(AM_V_at)rm -f $@ $@-t
 	$(AM_V_at)$(MKDIR_P) "$(@D)"
 	$(AM_V_GEN)$(do_subst) < "$(srcdir)/$@.in" > "$@-t"
diff --git a/build-aux/pre-inst-env.in b/build-aux/pre-inst-env.in
index cd90a06cbc..7c1d5aa09b 100644
--- a/build-aux/pre-inst-env.in
+++ b/build-aux/pre-inst-env.in
@@ -46,6 +46,12 @@ export PATH
 GUIX="$abs_top_builddir/scripts/guix"
 export GUIX
 
+# sanity check
+if [ ! -f "$GUIX" ]; then
+    echo "$GUIX is not built. Please run make scripts/guix"
+    exit 1
+fi
+
 # Define $GUIX_UNINSTALLED to prevent `guix' from
 # prepending @guilemoduledir@ to the Guile load paths.
 

base-commit: 761810d32a0550912b5bb36a0c9f60141bcb7d20
--
2.41.0





This bug report was last modified 166 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.