From ea8be005d409658dea4f4356e9279784ce0a5a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 20 Dec 2018 19:57:28 +0100 Subject: gnu: Use i686-linux bootstrap binaries on x86_64-linux. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This saves 4.4 MB on the installed Guix. * gnu/packages/bootstrap/x86_64-linux: Remove directory. * gnu/local.mk (bootstrap_x86_64_linuxdir) (dist_bootstrap_x86_64_linux_DATA): Remove. * gnu/packages.scm (search-bootstrap-binary): When SYSTEM is "x86_64-linux", use "i686-linux" instead. --- gnu/packages.scm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'gnu/packages.scm') diff --git a/gnu/packages.scm b/gnu/packages.scm index 532297239d..333b18f9f0 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -102,14 +102,18 @@ FILE-NAME found in %PATCH-PATH." (define (search-bootstrap-binary file-name system) "Search the bootstrap binary FILE-NAME for SYSTEM. Raise an error if not found." - (or (search-path (%bootstrap-binaries-path) - (string-append system "/" file-name)) - (raise (condition - (&message - (message - (format #f (G_ "could not find bootstrap binary '~a' \ + ;; On x86_64 always use the i686 binaries. + (let ((system (match system + ("x86_64-linux" "i686-linux") + (_ system)))) + (or (search-path (%bootstrap-binaries-path) + (string-append system "/" file-name)) + (raise (condition + (&message + (message + (format #f (G_ "could not find bootstrap binary '~a' \ for system '~a'") - file-name system))))))) + file-name system)))))))) (define %distro-root-directory ;; Absolute file name of the module hierarchy. Since (gnu packages …) might -- cgit v1.2.3 From 1ba0b1e6ec41afd94a3c5f907b1122204dcb5d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 14 Jun 2019 21:35:08 +0200 Subject: packages: Remove 'search-bootstrap-binary'. * gnu/packages.scm (%bootstrap-binaries-path, search-bootstrap-binary): Remove. * gnu/packages/bootstrap.scm (bootstrap-executable): Export. * guix/tests.scm (bootstrap-binary-file, search-bootstrap-binary): Export. * tests/derivations.scm: Remove (gnu packages) import. * tests/grafts.scm: Likewise. * tests/guix-daemon.sh: Likewise. --- gnu/packages.scm | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'gnu/packages.scm') diff --git a/gnu/packages.scm b/gnu/packages.scm index 4742f49405..2d7622d397 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -46,10 +46,8 @@ #:export (search-patch search-patches search-auxiliary-file - search-bootstrap-binary %patch-path %auxiliary-files-path - %bootstrap-binaries-path %package-module-path %default-package-module-path @@ -75,18 +73,13 @@ ;;; ;;; Code: -;; By default, we store patches, auxiliary files and bootstrap binaries +;; By default, we store patches and auxiliary files ;; alongside Guile modules. This is so that these extra files can be ;; found without requiring a special setup, such as a specific ;; installation directory and an extra environment variable. One ;; advantage of this setup is that everything just works in an ;; auto-compilation setting. -(define %bootstrap-binaries-path - (make-parameter - (map (cut string-append <> "/gnu/packages/bootstrap") - %load-path))) - (define %auxiliary-files-path (make-parameter (map (cut string-append <> "/gnu/packages/aux-files") @@ -108,22 +101,6 @@ FILE-NAME found in %PATCH-PATH." (list (search-patch file-name) ...)) -(define (search-bootstrap-binary file-name system) - "Search the bootstrap binary FILE-NAME for SYSTEM. Raise an error if not -found." - ;; On x86_64 always use the i686 binaries. - (let ((system (match system - ("x86_64-linux" "i686-linux") - (_ system)))) - (or (search-path (%bootstrap-binaries-path) - (string-append system "/" file-name)) - (raise (condition - (&message - (message - (format #f (G_ "could not find bootstrap binary '~a' \ -for system '~a'") - file-name system)))))))) - (define %distro-root-directory ;; Absolute file name of the module hierarchy. Since (gnu packages …) might ;; live in a directory different from (guix), try to get the best match. -- cgit v1.2.3 From d2d63e20d5b981009b61bf416b4d7b516e8f1f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 6 Sep 2019 14:39:54 +0200 Subject: packages: 'generate-package-cache' uses 'supported-package?'. * gnu/packages.scm (generate-package-cache): Use 'supported-package?' instead of 'package-supported-systems'. --- gnu/packages.scm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gnu/packages.scm') diff --git a/gnu/packages.scm b/gnu/packages.scm index 47e4f473b5..6633631c1f 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -393,9 +393,7 @@ reducing the memory footprint." ,(module-name module) ,symbol ,(package-outputs package) - ,(->bool - (member (%current-system) - (package-supported-systems package))) + ,(->bool (supported-package? package)) ,(->bool (package-superseded package)) ,@(let ((loc (package-location package))) (if loc -- cgit v1.2.3