GNU bug report logs - #32115
[PATCH 0/2] Add (guix inferior) and improve 'guix pull -l'

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Tue, 10 Jul 2018 16:47:01 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: 32115 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [bug#32115] [PATCH 1/3] profiles: Factorize 'manifest-search-paths'.
Date: Tue, 10 Jul 2018 18:48:06 +0200
* guix/profiles.scm (manifest-search-paths): New procedure.
(profile-derivation)[builder]: Use it.
* guix/build/profiles.scm (build-etc/profile): Remove $PATH.
---
 guix/build/profiles.scm |  2 +-
 guix/profiles.scm       | 12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm
index 819688a91..df785c85a 100644
--- a/guix/build/profiles.scm
+++ b/guix/build/profiles.scm
@@ -89,7 +89,7 @@ definitions for all the SEARCH-PATHS."
 # When GUIX_PROFILE is undefined, the various environment variables refer
 # to this specific profile generation.
 \n" port)
-      (let ((variables (evaluate-search-paths (cons $PATH search-paths)
+      (let ((variables (evaluate-search-paths search-paths
                                               (list output))))
         (for-each (write-environment-variable-definition port)
                   (map (abstract-profile output) variables))))))
diff --git a/guix/profiles.scm b/guix/profiles.scm
index e6b77e8d3..88228f155 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -91,6 +91,7 @@
             manifest-lookup
             manifest-installed?
             manifest-matching-entries
+            manifest-search-paths
 
             manifest-transaction
             manifest-transaction?
@@ -545,6 +546,14 @@ no match.."
 
   (filter matches? (manifest-entries manifest)))
 
+(define (manifest-search-paths manifest)
+  "Return the list of search path specifications that apply to MANIFEST,
+including the search path specification for $PATH."
+  (delete-duplicates
+   (cons $PATH
+         (append-map manifest-entry-search-paths
+                     (manifest-entries manifest)))))
+
 
 ;;;
 ;;; Manifest transactions.
@@ -1367,8 +1376,7 @@ are cross-built for TARGET."
               (map sexp->search-path-specification
                    (delete-duplicates
                     '#$(map search-path-specification->sexp
-                            (append-map manifest-entry-search-paths
-                                        (manifest-entries manifest))))))
+                            (manifest-search-paths manifest)))))
 
             (build-profile #$output '#$inputs
                            #:symlink #$(if relative-symlinks?
-- 
2.18.0





This bug report was last modified 7 years ago.

Previous Next


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