refresh: Switch to SRFI-71.

* guix/scripts/refresh.scm (update-package): Use SRFI-71 'let' instead
of SRFI-11 'let-values'.
This commit is contained in:
Ludovic Courtès 2022-06-15 22:50:08 +02:00
parent 5d4b189120
commit 5c06eedf08
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013-2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Alex Kost <alezost@gmail.com> ;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
@ -46,9 +46,9 @@ (define-module (guix scripts refresh)
#:use-module (ice-9 vlist) #:use-module (ice-9 vlist)
#:use-module (ice-9 format) #:use-module (ice-9 format)
#:use-module (srfi srfi-1) #:use-module (srfi srfi-1)
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-26) #:use-module (srfi srfi-26)
#:use-module (srfi srfi-37) #:use-module (srfi srfi-37)
#:use-module (srfi srfi-71)
#:use-module (ice-9 binary-ports) #:use-module (ice-9 binary-ports)
#:export (guix-refresh)) #:export (guix-refresh))
@ -315,12 +315,11 @@ (define* (update-package store package updaters
values: 'interactive' (default), 'always', and 'never'. When WARN? is true, values: 'interactive' (default), 'always', and 'never'. When WARN? is true,
warn about packages that have no matching updater." warn about packages that have no matching updater."
(if (lookup-updater package updaters) (if (lookup-updater package updaters)
(let-values (((version output source) (let ((version output source
(package-update store package updaters (package-update store package updaters
#:key-download key-download)) #:key-download key-download))
((loc) (loc (or (package-field-location package 'version)
(or (package-field-location package 'version) (package-location package))))
(package-location package))))
(when version (when version
(if (and=> output file-exists?) (if (and=> output file-exists?)
(begin (begin