mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
refresh: Allow specifying a partial version via the version specification.
* guix/scripts/refresh.scm (update-specification->update-spec): Flag the update-spec as partial when it is prefixed with '~'. * tests/guix-refresh.sh: Test it. Remove extraneous 'guix refresh' invocation. * doc/guix.texi (Invoking guix refresh): Document it. Change-Id: Iab4482d9367105f6ffcd2d6a49148736c93d53e4 Reviewed-by: Florian Pelz <pelzflorian@pelzflorian.de> Reviewed-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
ba540ca7dd
commit
271a8fc249
3 changed files with 34 additions and 3 deletions
|
@ -231,8 +231,11 @@ SPEC lacks a version, use FALLBACK-VERSION."
|
|||
(match (string-rindex spec #\=)
|
||||
(#f (update-spec (specification->package spec) fallback-version
|
||||
(not (not fallback-version))))
|
||||
(idx (update-spec (specification->package (substring spec 0 idx))
|
||||
(substring spec (1+ idx))))))
|
||||
(idx (let ((version (substring spec (1+ idx)))
|
||||
(package (specification->package (substring spec 0 idx))))
|
||||
(if (string-prefix? "~" version)
|
||||
(update-spec package (string-drop version 1) #t) ;partial
|
||||
(update-spec package version))))))
|
||||
|
||||
(define (options->update-specs opts)
|
||||
"Return the list of <update-spec> records requested by OPTS, honoring
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue