guix-commits
[Top][All Lists]
Advanced

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

02/02: build-system/gnu: Don't try executing directories in bootstrap ph


From: guix-commits
Subject: 02/02: build-system/gnu: Don't try executing directories in bootstrap phase.
Date: Sun, 16 Feb 2020 10:45:58 -0500 (EST)

mbakke pushed a commit to branch core-updates
in repository guix.

commit a21bd6d5c208111fbf96e9b402cc5ca872f95109
Author: Brendan Tildesley <address@hidden>
AuthorDate: Tue Oct 8 02:55:03 2019 +1100

    build-system/gnu: Don't try executing directories in bootstrap phase.
    
    * guix/build/gnu-build-system.scm: (bootstrap): Change the file-exists?
    procedure to one that excludes directories, so that we do not mistake it 
for a
    script. For example if the source includes a bootstrap/ directory.
    
    Signed-off-by: Marius Bakke <address@hidden>
---
 guix/build/gnu-build-system.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 22805c8..96913ef 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès 
<address@hidden>
 ;;; Copyright © 2018 Mark H Weaver <address@hidden>
+;;; Copyright © 2020 Brendan Tildesley <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -173,12 +174,16 @@ working directory."
 \"autoreconf\".  Otherwise do nothing."
   ;; Note: Run that right after 'unpack' so that the generated files are
   ;; visible when the 'patch-source-shebangs' phase runs.
-  (if (not (file-exists? "configure"))
+  (define (script-exists? file)
+    (and (file-exists? file)
+         (not (file-is-directory? file))))
+
+  (if (not (script-exists? "configure"))
 
       ;; First try one of the BOOTSTRAP-SCRIPTS.  If none exists, and it's
       ;; clearly an Autoconf-based project, run 'autoreconf'.  Otherwise, do
       ;; nothing (perhaps the user removed or overrode the 'configure' phase.)
-      (let ((script (find file-exists? bootstrap-scripts)))
+      (let ((script (find script-exists? bootstrap-scripts)))
         ;; GNU packages often invoke the 'git-version-gen' script from
         ;; 'configure.ac' so make sure it has a valid shebang.
         (false-if-file-not-found



reply via email to

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