From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aAhKGIfRwWHZJgAAgWs5BA (envelope-from ) for ; Tue, 21 Dec 2021 14:07:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id oHvzE4fRwWE9TAAAB5/wlQ (envelope-from ) for ; Tue, 21 Dec 2021 13:07:19 +0000 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 17D191A56D for ; Tue, 21 Dec 2021 14:07:19 +0100 (CET) Received: from localhost ([::1]:45446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzerN-00013T-HT for larch@yhetil.org; Tue, 21 Dec 2021 08:07:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzeqB-00011M-3O for guix-patches@gnu.org; Tue, 21 Dec 2021 08:06:14 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41150) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzeqA-0005Mc-RO for guix-patches@gnu.org; Tue, 21 Dec 2021 08:06:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mzeqA-0003L9-O0 for guix-patches@gnu.org; Tue, 21 Dec 2021 08:06:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52701] [PATCH 1/5] packages: Display superseded package version. References: <878rwejeti.fsf@waegenei.re> In-Reply-To: <878rwejeti.fsf@waegenei.re> Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Dec 2021 13:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52701 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52701@debbugs.gnu.org Received: via spool by 52701-submit@debbugs.gnu.org id=B52701.164009196112824 (code B ref 52701); Tue, 21 Dec 2021 13:06:02 +0000 Received: (at 52701) by debbugs.gnu.org; 21 Dec 2021 13:06:01 +0000 Received: from localhost ([127.0.0.1]:52694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzeq8-0003KZ-Rd for submit@debbugs.gnu.org; Tue, 21 Dec 2021 08:06:01 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:56689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzeq6-0003Jv-5T for 52701@debbugs.gnu.org; Tue, 21 Dec 2021 08:05:59 -0500 Received: (Authenticated sender: brice@waegenei.re) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id ACF81E0005 for <52701@debbugs.gnu.org>; Tue, 21 Dec 2021 13:05:51 +0000 (UTC) From: Brice Waegeneire Date: Tue, 21 Dec 2021 14:05:39 +0100 Message-Id: <20211221130543.6891-1-brice@waegenei.re> X-Mailer: git-send-email 2.34.0 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640092039; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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; bh=zJ9nSl1EVZAgJZAMqZVB7d2GkZ4V6XEZU+UjaKYxpS0=; b=JR92kW6lO6CGtNvzjYcL6mybMmgsqQ1e3IQpC+oG9Jbvhsjhl0WP/NpKCuQ0Gwie2ujwXc 17Ferecm+Xwms53/67Zr05Nk6+ClEKSoIA8Hpq8ikyfHSQ7Y/uFs6n90HQWMr5IIbax7Gs 4MqEMVA566/nSZc6pXb/mB7+fA5eUQqCmCLZ0wJbVmf2HSGESpNn7EopnS5HJLOVPiCqmn 2ibdRcGGHuMKz9Joza/A7dW4S0Nyg8gOHJAFwQM8xrSnWboiof94yQsNzFbEy/c2wNNyGL hOpygngNQmU5cbgwChPTWCNwnRMvI5HA5LmdS7KVmfwQxghk6HCn7Edlb6gQ/Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640092039; a=rsa-sha256; cv=none; b=n5w/wnPJj5E4Q41/Ygib10vGwCoEJEo1LmY7Y4/+cpVYn5kJWsVSxeL1+LiOiSfhQV3IJk t5icaozbGY2fuFXAHaTxQEmgzoWVmJeCusZN6xk3FITDUrqsBx+jOTQKpNBv6nIYn7PmT2 cgW3IEE1jmOulbkmr37c8X396Vbt+4HohjQJ8kFoTI4z0PqdgzN+gHFWus8J3sq096xRk9 Dk+J07VRBmfx4pDQ6ie7oHPouG5Ypi5UtCLhUIZitClF1UZRaGU5QC2M34PwXhV3M+wCq8 bvyfiaqU7ndNOICpaAs3B/oJUQispOGkFQmEgJPQ7JohKczcTklQdlDEKUIDrg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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" X-Migadu-Spam-Score: -3.03 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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" X-Migadu-Queue-Id: 17D191A56D X-Spam-Score: -3.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: yMZx19XyoVdx * gnu/packages.scm (%find-package): Display package versions in warning message. * guix/scripts/package.scm (transaction-upgrade-entry): Display package versions in warning message. --- gnu/packages.scm | 6 ++++-- guix/scripts/package.scm | 24 ++++++++++++++---------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/gnu/packages.scm b/gnu/packages.scm index ccfc83dd11..ad0d75db94 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016, 2017 Alex Kost ;;; Copyright © 2016 Mathieu Lirzin +;;; Copyright © 2021 Brice Waegeneire ;;; ;;; This file is part of GNU Guix. ;;; @@ -483,8 +484,9 @@ (define* (%find-package spec name version) (location->string (package-location pkg)))) (match (package-superseded pkg) ((? package? new) - (info (G_ "package '~a' has been superseded by '~a'~%") - (package-name pkg) (package-name new)) + (info (G_ "package '~a@~a' has been superseded by '~a@~a'~%") + (package-name pkg) (package-version pkg) + (package-name new) (package-version new)) new) (#f pkg))) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 4b9c5f210d..d6a8333ac6 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2020 Ricardo Wurmus ;;; Copyright © 2020 Simon Tournier ;;; Copyright © 2018 Steve Sprang +;;; Copyright © 2021 Brice Waegeneire ;;; ;;; This file is part of GNU Guix. ;;; @@ -213,16 +214,19 @@ (define (lower-manifest-entry* entry) (lower-manifest-entry entry (%current-system)))) (define (supersede old new) - (info (G_ "package '~a' has been superseded by '~a'~%") - (manifest-entry-name old) (package-name new)) - (manifest-transaction-install-entry - (package->manifest-entry* new (manifest-entry-output old)) - (manifest-transaction-remove-pattern - (manifest-pattern - (name (manifest-entry-name old)) - (version (manifest-entry-version old)) - (output (manifest-entry-output old))) - transaction))) + (let ((old-name (manifest-entry-name old)) + (old-version (manifest-entry-version old))) + (info (G_ "package '~a@~a' has been superseded by '~a@~a'~%") + old-name old-version + (package-name new) (package-version new)) + (manifest-transaction-install-entry + (package->manifest-entry* new (manifest-entry-output old)) + (manifest-transaction-remove-pattern + (manifest-pattern + (name old-name) + (version old-version) + (output (manifest-entry-output old))) + transaction)))) (define (upgrade entry transform) (match entry -- 2.34.0