[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
10/30: bootstrap: Use invoke instead of system*.
From: |
Mark H. Weaver |
Subject: |
10/30: bootstrap: Use invoke instead of system*. |
Date: |
Fri, 16 Mar 2018 05:03:36 -0400 (EDT) |
mhw pushed a commit to branch core-updates
in repository guix.
commit ad1656dc917cd7f9702cf0d7623f642a7f4bb522
Author: Mark H Weaver <address@hidden>
Date: Fri Mar 16 03:48:24 2018 -0400
bootstrap: Use invoke instead of system*.
* gnu/packages/bootstrap.scm (package-from-tarball): Ignore the result of
the snippet procedure. Use invoke and remove vestigial plumbing.
(%bootstrap-coreutils&co): Remove the vestigial #t from the snippet.
(%bootstrap-glibc, %bootstrap-gcc)[arguments]: Use invoke. Return #t from
the
builder.
---
gnu/packages/bootstrap.scm | 46 ++++++++++++++++++++++++----------------------
1 file changed, 24 insertions(+), 22 deletions(-)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 27f2053..f332018 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès
<address@hidden>
-;;; Copyright © 2014, 2015 Mark H Weaver <address@hidden>
+;;; Copyright © 2014, 2015, 2018 Mark H Weaver <address@hidden>
;;; Copyright © 2017 Efraim Flashner <address@hidden>
;;;
;;; This file is part of GNU Guix.
@@ -98,10 +98,10 @@
(define* (package-from-tarball name source program-to-test description
#:key snippet)
"Return a package that correspond to the extraction of SOURCE.
-PROGRAM-TO-TEST is a program to run after extraction of SOURCE, to
-check whether everything is alright. If SNIPPET is provided, it is
-evaluated after extracting SOURCE. SNIPPET should return true if
-successful, or false to signal an error."
+PROGRAM-TO-TEST is a program to run after extraction of SOURCE, to check
+whether everything is alright. If SNIPPET is provided, it is evaluated after
+extracting SOURCE. SNIPPET should raise an exception to signal an error; its
+return value is ignored."
(package
(name name)
(version "0")
@@ -118,14 +118,14 @@ successful, or false to signal an error."
(mkdir out)
(copy-file tarball "binaries.tar.xz")
- (system* xz "-d" "binaries.tar.xz")
+ (invoke xz "-d" "binaries.tar.xz")
(let ((builddir (getcwd)))
(with-directory-excursion out
- (and (zero? (system* tar "xvf"
- (string-append builddir "/binaries.tar")))
- ,@(if snippet (list snippet) '())
- (zero? (system* (string-append "bin/" ,program-to-test)
- "--version"))))))))
+ (invoke tar "xvf"
+ (string-append builddir "/binaries.tar"))
+ ,@(if snippet (list snippet) '())
+ (invoke (string-append "bin/" ,program-to-test)
+ "--version"))))))
(inputs
`(("tar" ,(search-bootstrap-binary "tar" (%current-system)))
("xz" ,(search-bootstrap-binary "xz" (%current-system)))
@@ -390,8 +390,7 @@ $out/bin/guile --version~%"
(if (not (elf-file? "bin/egrep"))
(substitute* '("bin/egrep" "bin/fgrep")
(("^exec grep") (string-append (getcwd)
"/bin/grep"))))
- (chmod "bin" #o555)
- #t)))
+ (chmod "bin" #o555))))
(define %bootstrap-binutils
(package-from-tarball "binutils-bootstrap"
@@ -446,18 +445,20 @@ $out/bin/guile --version~%"
(mkdir out)
(copy-file tarball "binaries.tar.xz")
- (system* xz "-d" "binaries.tar.xz")
+ (invoke xz "-d" "binaries.tar.xz")
(let ((builddir (getcwd)))
(with-directory-excursion out
- (system* tar "xvf"
- (string-append builddir
- "/binaries.tar"))
+ (invoke tar "xvf"
+ (string-append builddir
+ "/binaries.tar"))
(chmod "lib" #o755)
;; Patch libc.so so it refers to the right path.
(substitute* "lib/libc.so"
(("/[^ ]+/lib/(libc|ld)" _ prefix)
- (string-append out "/lib/" prefix))))))))
+ (string-append out "/lib/" prefix)))
+
+ #t)))))
(inputs
`(("tar" ,(search-bootstrap-binary "tar" (%current-system)))
("xz" ,(search-bootstrap-binary "xz" (%current-system)))
@@ -518,12 +519,12 @@ $out/bin/guile --version~%"
(mkdir out)
(copy-file tarball "binaries.tar.xz")
- (system* xz "-d" "binaries.tar.xz")
+ (invoke xz "-d" "binaries.tar.xz")
(let ((builddir (getcwd))
(bindir (string-append out "/bin")))
(with-directory-excursion out
- (system* tar "xvf"
- (string-append builddir "/binaries.tar")))
+ (invoke tar "xvf"
+ (string-append builddir "/binaries.tar")))
(with-directory-excursion bindir
(chmod "." #o755)
@@ -538,7 +539,8 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
out libc libc libc
,(glibc-dynamic-linker))))
- (chmod "gcc" #o555))))))
+ (chmod "gcc" #o555)
+ #t)))))
(inputs
`(("tar" ,(search-bootstrap-binary "tar" (%current-system)))
("xz" ,(search-bootstrap-binary "xz" (%current-system)))
- branch core-updates updated (80420f1 -> 812cee6), Mark H. Weaver, 2018/03/16
- 05/30: build-system/cmake: Use invoke instead of system*., Mark H. Weaver, 2018/03/16
- 07/30: build-system/python: Use invoke instead of system*., Mark H. Weaver, 2018/03/16
- 08/30: build-system/texlive: Use invoke instead of system*., Mark H. Weaver, 2018/03/16
- 04/30: build-system/glib-or-gtk: Use invoke instead of system*., Mark H. Weaver, 2018/03/16
- 12/30: gnu: linux-libre-headers: Use invoke instead of system*., Mark H. Weaver, 2018/03/16
- 10/30: bootstrap: Use invoke instead of system*.,
Mark H. Weaver <=
- 19/30: gnu: unzip: Use invoke instead of system*., Mark H. Weaver, 2018/03/16
- 18/30: gnu: zlib: Use invoke instead of system*., Mark H. Weaver, 2018/03/16
- 21/30: gnu: bzip2: Use invoke instead of system*., Mark H. Weaver, 2018/03/16
- 06/30: build-system/perl: Use invoke instead of system*., Mark H. Weaver, 2018/03/16
- 14/30: gnu: glibc-locales: Use invoke instead of system*., Mark H. Weaver, 2018/03/16
- 03/30: build-system/gnu: Use invoke instead of system*., Mark H. Weaver, 2018/03/16
- 17/30: gnu: tcsh: Use invoke instead of system*., Mark H. Weaver, 2018/03/16
- 23/30: gnu: eudev: Use invoke instead of system*., Mark H. Weaver, 2018/03/16
- 09/30: build-system/scons: Use invoke instead of system*., Mark H. Weaver, 2018/03/16
- 30/30: gnu: attr: Use invoke instead of system*., Mark H. Weaver, 2018/03/16