[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#57460] [PATCH 00/19] Refresh to specific version
From: |
Ludovic Courtès |
Subject: |
[bug#57460] [PATCH 00/19] Refresh to specific version |
Date: |
Tue, 22 Nov 2022 08:33:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi Hartmut
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:
> From c748a25193d8f9ee29b9d281f542fb1d0d3f4ec1 Mon Sep 17 00:00:00 2001
> Message-Id:
> <c748a25193d8f9ee29b9d281f542fb1d0d3f4ec1.1667318125.git.h.goebel@crazy-compilers.com>
> From: Hartmut Goebel <h.goebel@crazy-compilers.com>
> Date: Fri, 24 Jun 2022 20:40:57 +0200
> Subject: [PATCH v2] refresh: Allow updating to a specific version.
>
> * guix/scripts/refresh.scm (options->packages)[args-packages]: Handle version
> specification in package name arguments.
> (update-package): Add #:version argument and pass it on to called functions.
> (guix-refresh): When updating, pass the specified version (if any) to
> update-package.
> [package-list-without-versions, package-list-with-versions]: New functions.
Thanks for this updated patch!
[...]
> -(define (options->packages opts)
> +(define (options->package-specs opts)
> "Return the list of packages requested by OPTS, honoring options like
> '--recursive'."
In Guix, “package spec” refers to the syntax that
‘specification->package’ accepts, like “guile” or “guile@2.2”. So we’ll
have to use another name throughout. How about “update spec” or
“refresh spec” for the string, and just “update” for the record?
> +(define-record-type* <package-spec> package-spec make-package-spec
> + package-spec?
> + (package package-spec-package) ; package
> + (target package-spec-target)) ; target version
Since there are just two fields, it may be simpler to use SRFI-9:
(define-record-type <update>
(update package version)
update?
(package update-package)
(version update-version))
Thanks,
Ludo’.