diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-12-29 16:19:56 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-12-29 18:24:54 +0100 |
commit | 8a705ae4c6107f43c7fbcfad913dd2675f94086a (patch) | |
tree | fde7775864a4c4ac8aee5e8830d127793320568f | |
parent | 1e30d4e0df75567b869c0c69e8c0a93f712a56a0 (diff) | |
download | guix-8a705ae4c6107f43c7fbcfad913dd2675f94086a.tar.gz |
profiles: Add 'map-manifest-entries'.
* guix/scripts/pack.scm (map-manifest-entries): Move to... * guix/profiles.scm (map-manifest-entries): ... here.
-rw-r--r-- | guix/profiles.scm | 6 | ||||
-rw-r--r-- | guix/scripts/pack.scm | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm index 616605151e..5b3b5bd5fe 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -93,6 +93,7 @@ manifest-pattern-output concatenate-manifests + map-manifest-entries manifest-remove manifest-add manifest-lookup @@ -520,6 +521,11 @@ procedure is here for backward-compatibility and will eventually vanish." "Concatenate the manifests listed in LST and return the resulting manifest." (manifest (append-map manifest-entries lst))) +(define (map-manifest-entries proc manifest) + "Apply PROC to all the entries of MANIFEST and return a new manifest." + (make-manifest + (map proc (manifest-entries manifest)))) + (define (entry-predicate pattern) "Return a procedure that returns #t when passed a manifest entry that matches NAME/OUTPUT/VERSION. OUTPUT and VERSION may be #f, in which case they diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 9676d28565..536cc1726c 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -753,11 +753,6 @@ last resort for relocation." (manifest-entry-output entry) args)))) -(define (map-manifest-entries proc manifest) - "Apply PROC to all the entries of MANIFEST and return a new manifest." - (make-manifest - (map proc (manifest-entries manifest)))) - ;;; ;;; Command-line options. |