etc: ungraft: Use ‘package-mapping’ directly.

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

Change-Id: I6f1badf06dad9116d4242c7d1fff5ca53e6522f8
This commit is contained in:
Ludovic Courtès 2024-12-15 00:33:04 +01:00
parent 0107b771bd
commit 777fde8299
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -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)))))