aboutsummaryrefslogtreecommitdiff
path: root/etc/manifests/ungraft.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2024-12-15 00:33:04 +0100
committerLudovic Courtès <ludo@gnu.org>2024-12-18 18:32:41 +0100
commit777fde8299d5b0050cae661d403374a7dd87f6ab (patch)
tree7745929645b1f5be139556a1a05772f874092415 /etc/manifests/ungraft.scm
parent0107b771bd71514fe4d72f9cde382041a3ed3a17 (diff)
downloadguix-777fde8299d5b0050cae661d403374a7dd87f6ab.tar.gz
guix-777fde8299d5b0050cae661d403374a7dd87f6ab.zip
etc: ungraft: Use ‘package-mapping’ directly.
* etc/manifests/ungraft.scm (ungraft): New procedure. <top-level>: Use it. Remove ‘ungraft-all’. Change-Id: I6f1badf06dad9116d4242c7d1fff5ca53e6522f8
Diffstat (limited to 'etc/manifests/ungraft.scm')
-rw-r--r--etc/manifests/ungraft.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/etc/manifests/ungraft.scm b/etc/manifests/ungraft.scm
index 3e42b98ece..5caef65d4c 100644
--- a/etc/manifests/ungraft.scm
+++ b/etc/manifests/ungraft.scm
@@ -35,15 +35,16 @@
(length result) (map package-full-name result))
result))
+(define ungraft
+ (package-mapping (lambda (p)
+ (or (package-replacement p) p))
+ #:deep? #t))
+
(manifest
(with-store store
- (let* ((grafted (grafted-packages))
- (ungraft-all (package-input-rewriting
- (map (lambda (package)
- `(,package . ,(package-replacement package)))
- grafted))))
+ (let ((grafted (grafted-packages)))
(map (lambda (package)
(manifest-entry
- (inherit (package->manifest-entry (ungraft-all package)))
+ (inherit (package->manifest-entry (ungraft package)))
(name (string-append (package-name package) "-ungrafted"))))
(dependents store grafted)))))