From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id UMRzE3rmTWeCFwAAe85BDQ:P1 (envelope-from ) for ; Mon, 02 Dec 2024 16:55:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id UMRzE3rmTWeCFwAAe85BDQ (envelope-from ) for ; Mon, 02 Dec 2024 17:55:22 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="o7rGUVh/"; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=KvAyHWvt; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1733158522; a=rsa-sha256; cv=none; b=t39T6Mcdo3P+msI7d2dND+C35Ic+z2aDmJzA5dnCPu61vN4iRNPl06YFl+VQRux79/r+8Z MiVvnZ1UnMTi+1jv6YYY4NwA6rp4cc4ZnZj+4zK6XFJSQbcYLsRR4dIPwiP0VF3J1+eHNS QtQHynvcYZgf8DkpBg17XOxz/N1cAmCKJV35RrWoROk51dxtOxVfyGw1QHHxXV7OFT6a0s Lrs29AVXokv7HY3GbR++fLpSYLV8knM+HBgYFER5vpSc80qQflBQrb7MEwMyqlzk4ZQ9bi 8g6edQG0rcsPhYonBY6O3NTe+KnLMhwCMUPdFSv4IroFmcZA0k3K5//gsPOELw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="o7rGUVh/"; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=KvAyHWvt; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1733158522; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=lpCa3tcqAJtntBzbdeO9B+/kfT7V3XFKEmyygId6RXA=; b=kT/hMg8mEI14wXEgAkQ7ldKCYjXAGbPr3JcERQnJg3j+TralsWFCZulft9vEYfXoBH9M0x hLOTbo+V1zGl8gIFSjlHoH/3ShZ+8pVXw3XRj8YzvrFX2y6K8hRu35JxaaYBmBxMWCG6MA kaFi4LW5mnD8ljRyhlRnO2ct4TukvKXiWw91thcHCMclefijs3Db7tSJ6iCGe5t54JLM3T RsPzV+EMQvVC1HgNJxuU4fAT7+QzwR2/NkLUtqc7OctE7TnZ5nzSC8gZtgNOXvL6FX+dGa Vq1Nn3cltx5eeob4VJ9HoScUvLzpEtfuB/2l8wvadjiF1iO3ZHcOGB2OJFnFkg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 19C9B7B384 for ; Mon, 02 Dec 2024 17:55:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tI9hc-000452-T3; Mon, 02 Dec 2024 11:55:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tI9hR-0003mL-Ep for guix-patches@gnu.org; Mon, 02 Dec 2024 11:55:05 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tI9hR-0007sa-4u for guix-patches@gnu.org; Mon, 02 Dec 2024 11:55:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=lpCa3tcqAJtntBzbdeO9B+/kfT7V3XFKEmyygId6RXA=; b=o7rGUVh/KBAyKJbmxEC3Y1DFe8X8X1MrRNrADNAWok++MBVGs/QJze5iqWN3sxY9VS5p8s+qaZ/UUghzBGXrW0sApftdPsmZsvjfXyU4jzCskAYAEzvsMIzoy53N5WAIu79AY/fAYMLV5NK3y9Rn9/zvlZM8pF+jLoIUXTOl0nxtpn3OD67gybsucWiyj3xrDDdKdXpBFy0DHwL+pTJkj5QPrbO5u16woss/V1ujIIMkhyhF4NWqeSr9Ib6iJmo93q/EmYN82aveod3/EVTeqzkyOZjJrvBscMpzr0QaBOwpPYoJt2qrVYSgCRzFhO8A15FLe1BpO1VowsU0id00Qg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tI9hQ-00036P-UJ for guix-patches@gnu.org; Mon, 02 Dec 2024 11:55:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74654] [PATCH 5/5] maint: Add ungrafting manifest. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Dec 2024 16:55:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74654 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74654@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 74654-submit@debbugs.gnu.org id=B74654.173315846011805 (code B ref 74654); Mon, 02 Dec 2024 16:55:04 +0000 Received: (at 74654) by debbugs.gnu.org; 2 Dec 2024 16:54:20 +0000 Received: from localhost ([127.0.0.1]:56366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tI9gh-00034K-GA for submit@debbugs.gnu.org; Mon, 02 Dec 2024 11:54:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tI9ga-000339-9G for 74654@debbugs.gnu.org; Mon, 02 Dec 2024 11:54:16 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tI9gU-0007Nb-U7; Mon, 02 Dec 2024 11:54:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=lpCa3tcqAJtntBzbdeO9B+/kfT7V3XFKEmyygId6RXA=; b=KvAyHWvtAHxLrKWf+Qzz hXH7L9L1N+VnDqLLKJl4vZnxL+6JjsZuOS0ysuVc6jh+Sb6nDYmAQnIzU4amJNTeSfOCijXS9R5fd dC1ZAFfieubmBQt8SScQG/NzsE14wosoG4Y0/ivvJJe2O7vxHHW+ZQ750r/7dBxLsCG1qAmb6dnH9 tPlsiqwqp/JI9ucS+X3WBioF8e1xempOzmwWRPKPPduoIfF3yRzAs0aaCE9mQ9gAhGH4tdZiVdT55 EpyE9s2aUJHPt3RuSAgwmvlkY+G7KvkHVyybBdyFJo92OGtp4hdsnrml4yFZQp5v8QmzeMMTqaPW/ SfZXMQoqQRsapw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Mon, 2 Dec 2024 17:53:30 +0100 Message-ID: <72da72b50dbd8e0afd848c80582925f31dfe5cec.1733158049.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 19C9B7B384 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -2.22 X-Spam-Score: -2.22 X-TUID: aIEBmBIzcC/W * etc/manifests/ungraft.scm: New file. * Makefile.am (EXTRA_DIST): Add it. Change-Id: If4aa7649721b93d3297ecd967d5db4a6b71ec6eb --- Makefile.am | 1 + etc/manifests/ungraft.scm | 49 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 etc/manifests/ungraft.scm diff --git a/Makefile.am b/Makefile.am index 8c763c68aa..d0d195636b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -743,6 +743,7 @@ EXTRA_DIST += \ etc/manifests/source.scm \ etc/manifests/system-tests.scm \ etc/manifests/time-travel.scm \ + etc/manifests/ungraft.scm \ etc/manifests/upgrade.scm \ scripts/guix.in \ tests/cve-sample.json \ diff --git a/etc/manifests/ungraft.scm b/etc/manifests/ungraft.scm new file mode 100644 index 0000000000..3e42b98ece --- /dev/null +++ b/etc/manifests/ungraft.scm @@ -0,0 +1,49 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2024 Ludovic Courtès +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +;; This manifest "ungrafts" all the currently grafted packages and returns +;; said packages and all their dependents. + +(use-modules (guix diagnostics) + (guix i18n) + (guix packages) + (guix profiles) + (guix store) + ((guix scripts build) #:select (dependents)) + ((gnu packages) #:select (all-packages)) + (srfi srfi-1)) + +(define (grafted-packages) + (info (G_ "enumerating grafted packages...~%")) + (let ((result (filter package-replacement (all-packages)))) + (info (G_ "found ~d grafted packages:~{ ~a~}~%") + (length result) (map package-full-name result)) + result)) + +(manifest + (with-store store + (let* ((grafted (grafted-packages)) + (ungraft-all (package-input-rewriting + (map (lambda (package) + `(,package . ,(package-replacement package))) + grafted)))) + (map (lambda (package) + (manifest-entry + (inherit (package->manifest-entry (ungraft-all package))) + (name (string-append (package-name package) "-ungrafted")))) + (dependents store grafted))))) -- 2.46.0