From 777fde8299d5b0050cae661d403374a7dd87f6ab Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 15 Dec 2024 00:33:04 +0100 Subject: etc: ungraft: Use ‘package-mapping’ directly. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * etc/manifests/ungraft.scm (ungraft): New procedure. : Use it. Remove ‘ungraft-all’. Change-Id: I6f1badf06dad9116d4242c7d1fff5ca53e6522f8 --- etc/manifests/ungraft.scm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'etc/manifests/ungraft.scm') 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))))) -- cgit v1.2.3