[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: |
Sat, 24 Sep 2022 11:45:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:
> * guix/scripts/refresh.scm(options->packages)[args-packages]: Handle version
> specification in package name arguments.
> (update-package): Add keyword-argument 'version' 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.
[...]
> (('argument . spec)
> ;; Take either the specified version or the
> ;; latest one.
> - (specification->package spec))
> + (let* ((name version (package-name->name+version
> spec)))
> + (list (specification->package name) version)))
That changes the semantics of ‘guix refresh’. Until now, “guix refresh
guile@2.0” or “guix refresh -l guile@2.0” would look specifically at
Guile 2.0. Now, “guix refresh -l guile@2.0” would report dependents of
Guile 3.0.
So instead of reusing the version string that shows up here, I’d suggest
adding a new command-line option, say -T/--target-version. The downside
is that it wouldn’t work when multiple packages are specified on the
command line.
Another option would be to introduce special syntax, like an equal sign:
guix refresh guile=3.0.4
guix refresh guile@2.0=2.0.8
For that we’d introduce a new ‘specification->package-update’ that would
return a <package-update> record with two fields: the package to
upgrade, and the target version.
WDYT?
> + (define (package-list-without-versions packages)
> + (map (match-lambda
> + ((package version) package)
> + (package package))
> + packages))
> +
> + (define (package-list-with-versions packages)
> + (map (match-lambda
> + ((package version) (list package version))
> + (package (list package #f)))
> + packages))
I always find it a bad sign when one has to write specific list-fiddling
procedures; usually it indicates we’re missing a record type or
something.
Ludo’.
- [bug#57460] [PATCH 00/19] Refresh to specific version, Ludovic Courtès, 2022/09/24
- [bug#57460] [PATCH 00/19] Refresh to specific version, Ludovic Courtès, 2022/09/24
- [bug#57460] [PATCH 00/19] Refresh to specific version, Ludovic Courtès, 2022/09/24
- [bug#57460] [PATCH 00/19] Refresh to specific version, Ludovic Courtès, 2022/09/24
- [bug#57460] [PATCH 00/19] Refresh to specific version, Ludovic Courtès, 2022/09/24
- [bug#57460] [PATCH 00/19] Refresh to specific version, Ludovic Courtès, 2022/09/24
- [bug#57460] [PATCH 00/19] Refresh to specific version,
Ludovic Courtès <=
- [bug#57460] [PATCH 00/19] Refresh to specific version, Ludovic Courtès, 2022/09/24