all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 74888@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#74888] [PATCH 3/3] etc: ungraft: Use ‘package-mapping’ directly.
Date: Sun, 15 Dec 2024 17:25:42 +0100	[thread overview]
Message-ID: <e0cc38a90253c47254cd3d73ea845ce656b1939d.1734279715.git.ludo@gnu.org> (raw)
In-Reply-To: <cover.1734279715.git.ludo@gnu.org>

* 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





      parent reply	other threads:[~2024-12-15 16:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-15 16:24 [bug#74888] [PATCH 0/3] Fixes to the 'security-updates' and 'ungraft' manifests Ludovic Courtès
2024-12-15 16:25 ` [bug#74888] [PATCH 1/3] packages: Add #:recursive? to ‘package-input-rewriting’ Ludovic Courtès
2024-12-15 16:25 ` [bug#74888] [PATCH 2/3] etc: upgrade: Really compute joint upgrades Ludovic Courtès
2024-12-15 16:25 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e0cc38a90253c47254cd3d73ea845ce656b1939d.1734279715.git.ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=74888@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.