[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/06: refresh: Report suggested input changes with 'info'.
From: |
guix-commits |
Subject: |
06/06: refresh: Report suggested input changes with 'info'. |
Date: |
Fri, 15 Oct 2021 17:20:14 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 058ea2672b8e2e3bb3097651727bf7e7e1aee1f5
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Oct 15 23:14:47 2021 +0200
refresh: Report suggested input changes with 'info'.
* guix/scripts/refresh.scm (update-package): Define 'field', 'name',
'loc', and 'change-name'. Use 'info' rather than 'format' to report
suggested input changes.
---
guix/scripts/refresh.scm | 52 +++++++++++++++++++++++++++++++-----------------
1 file changed, 34 insertions(+), 18 deletions(-)
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
index fb6c52a..8806f0f 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès
<ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2021
Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
@@ -329,23 +329,39 @@ warn about packages that have no matching updater."
(package-version package) version)
(for-each
(lambda (change)
- (format (current-error-port)
- (match (list (upstream-input-change-action change)
- (upstream-input-change-type change))
- (('add 'regular)
- (G_ "~a: consider adding this input: ~a~%"))
- (('add 'native)
- (G_ "~a: consider adding this native input:
~a~%"))
- (('add 'propagated)
- (G_ "~a: consider adding this propagated input:
~a~%"))
- (('remove 'regular)
- (G_ "~a: consider removing this input: ~a~%"))
- (('remove 'native)
- (G_ "~a: consider removing this native input:
~a~%"))
- (('remove 'propagated)
- (G_ "~a: consider removing this propagated
input: ~a~%")))
- (package-name package)
- (upstream-input-change-name change)))
+ (define field
+ (match (upstream-input-change-type change)
+ ('native 'native-inputs)
+ ('propagated 'propagated-inputs)
+ (_ 'inputs)))
+
+ (define name
+ (package-name package))
+ (define loc
+ (package-field-location package field))
+ (define change-name
+ (upstream-input-change-name change))
+
+ (match (list (upstream-input-change-action change)
+ (upstream-input-change-type change))
+ (('add 'regular)
+ (info loc (G_ "~a: consider adding this input: ~a~%")
+ name change-name))
+ (('add 'native)
+ (info loc (G_ "~a: consider adding this native input:
~a~%")
+ name change-name))
+ (('add 'propagated)
+ (info loc (G_ "~a: consider adding this propagated
input: ~a~%")
+ name change-name))
+ (('remove 'regular)
+ (info loc (G_ "~a: consider removing this input: ~a~%")
+ name change-name))
+ (('remove 'native)
+ (info loc (G_ "~a: consider removing this native input:
~a~%")
+ name change-name))
+ (('remove 'propagated)
+ (info loc (G_ "~a: consider removing this propagated
input: ~a~%")
+ name change-name))))
(upstream-source-input-changes source))
(let ((hash (call-with-input-file tarball
port-sha256)))
- branch master updated (b87dbf2 -> 058ea26), guix-commits, 2021/10/15
- 01/06: lint: archival: Remove extra newline in warning., guix-commits, 2021/10/15
- 02/06: download: "GUIX_DOWNLOAD_FALLBACK_TEST=none" disables fallback mechanisms., guix-commits, 2021/10/15
- 04/06: import: pypi: Support 'input-changes'., guix-commits, 2021/10/15
- 06/06: refresh: Report suggested input changes with 'info'.,
guix-commits <=
- 03/06: swh: Allows token from Software Heritage authentication service., guix-commits, 2021/10/15
- 05/06: import: pypi: Remove leftover 'pk' call., guix-commits, 2021/10/15