[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
10/10: build-system/copy: Avoid use of 'set!'.
From: |
guix-commits |
Subject: |
10/10: build-system/copy: Avoid use of 'set!'. |
Date: |
Mon, 26 Apr 2021 05:28:46 -0400 (EDT) |
efraim pushed a commit to branch wip-ppc
in repository guix.
commit c3b3bd5071f1af9bd61ea89de47ab4b3bcaf8dbc
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Mon Apr 26 11:56:24 2021 +0300
build-system/copy: Avoid use of 'set!'.
* guix/build/copy-build-system.scm (install)[install]: Don't clobber
'target' variable and move variable assignation into the let statement.
---
guix/build/copy-build-system.scm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/guix/build/copy-build-system.scm b/guix/build/copy-build-system.scm
index ac4a62a..fb2d1db 100644
--- a/guix/build/copy-build-system.scm
+++ b/guix/build/copy-build-system.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -133,8 +134,8 @@ given, then the predicate always returns DEFAULT-VALUE."
file-list))))
(define* (install source target #:key include exclude include-regexp
exclude-regexp)
- (set! target (string-append (assoc-ref outputs "out") "/" target))
- (let ((filters? (or include exclude include-regexp exclude-regexp)))
+ (let ((final-target (string-append (assoc-ref outputs "out") "/" target))
+ (filters? (or include exclude include-regexp exclude-regexp)))
(when (and (not (file-is-directory? source))
filters?)
(error "Cannot use filters when SOURCE is a file."))
@@ -143,12 +144,12 @@ given, then the predicate always returns DEFAULT-VALUE."
(and (file-is-directory? source)
filters?))))
(if multi-files-in-source?
- (install-file-list source target
+ (install-file-list source final-target
#:include include
#:exclude exclude
#:include-regexp include-regexp
#:exclude-regexp exclude-regexp)
- (install-simple source target)))))
+ (install-simple source final-target)))))
(for-each (lambda (plan) (apply install plan)) install-plan)
#t)
- branch wip-ppc created (now c3b3bd5), guix-commits, 2021/04/26
- 01/10: gnu: bootstrap: Add support for powerpc-linux., guix-commits, 2021/04/26
- 02/10: gnu: guile-3.0: Fix building on powerpc-linux., guix-commits, 2021/04/26
- 04/10: gnu: binutils: Fix bug in test suite in libiberty., guix-commits, 2021/04/26
- 06/10: gnu: Add mac-fdisk., guix-commits, 2021/04/26
- 03/10: gnu: gcc-boot0: Use 128-bit long-double on powerpc-linux., guix-commits, 2021/04/26
- 05/10: gnu: mesa: Add support for powerpc-linux., guix-commits, 2021/04/26
- 07/10: build: qemu-command: Add support for powerpc., guix-commits, 2021/04/26
- 08/10: gnu: mercurial: Skip tests on powerpc-linux., guix-commits, 2021/04/26
- 09/10: gnu: nss: Skip tests on powerpc-linux., guix-commits, 2021/04/26
- 10/10: build-system/copy: Avoid use of 'set!'.,
guix-commits <=