guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#74888] [PATCH 3/3] etc: ungraft: Use ‘package-mapping’ directly.


From: Ludovic Courtès
Subject: [bug#74888] [PATCH 3/3] etc: ungraft: Use ‘package-mapping’ directly.
Date: Sun, 15 Dec 2024 17:25:42 +0100

* etc/manifests/ungraft.scm (ungraft): New procedure.
<top-level>: Use it.  Remove ‘ungraft-all’.

Change-Id: I6f1badf06dad9116d4242c7d1fff5ca53e6522f8
---
 etc/manifests/ungraft.scm | 13 +++++++------
 1 file 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 @@ (define (grafted-packages)
           (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)))))
-- 
2.46.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]