unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Brice Waegeneire <brice@waegenei.re>
To: 52701@debbugs.gnu.org
Subject: [bug#52701] [PATCH 1/5] packages: Display superseded package version.
Date: Tue, 21 Dec 2021 14:05:39 +0100	[thread overview]
Message-ID: <20211221130543.6891-1-brice@waegenei.re> (raw)
In-Reply-To: <878rwejeti.fsf@waegenei.re>

* 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 <bavier@member.fsf.org>
 ;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
+;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
 ;;;
 ;;; 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 <rekado@elephly.net>
 ;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
 ;;; Copyright © 2018 Steve Sprang <scs@stevesprang.com>
+;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
 ;;;
 ;;; 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





  reply	other threads:[~2021-12-21 13:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21 12:57 [bug#52701] [PATCH 0/5] gnu: postgresql-*: Update all versions Brice Waegeneire
2021-12-21 13:05 ` Brice Waegeneire [this message]
2022-03-18  4:48   ` Maxim Cournoyer
2021-12-21 13:05 ` [bug#52701] [PATCH 2/5] gnu: postgresql-9.6: Update to 9.6.24 Brice Waegeneire
2021-12-21 13:05 ` [bug#52701] [PATCH 3/5] gnu: postgresql-10: Update to 10.19 Brice Waegeneire
2021-12-21 13:05 ` [bug#52701] [PATCH 4/6] " Brice Waegeneire
2021-12-21 13:05 ` [bug#52701] [PATCH 5/5] gnu: Add postgresql-14 Brice Waegeneire
2021-12-21 19:38 ` [bug#52701] [PATCH 4/5] gnu: postgresql-11: Update to 11.14 Brice Waegeneire
2022-03-18  4:53   ` bug#52701: [PATCH 0/5] gnu: postgresql-*: Update all versions Maxim Cournoyer

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20211221130543.6891-1-brice@waegenei.re \
    --to=brice@waegenei.re \
    --cc=52701@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).