scripts: Honor --target-version in every situation.

* guix/scripts/refresh.scm (options->update-specs): Always honor
--target-version.
* doc/guix.texi (Invoking guix refresh): Add an example showing how this can
be useful.

Change-Id: I55f98c88f4b583f65dd85a6d3573f9bc87a1dead
This commit is contained in:
Maxim Cournoyer 2025-09-15 16:33:07 +09:00
parent 3f1c29faee
commit e92be23837
No known key found for this signature in database
GPG key ID: 1260E46482E63562
2 changed files with 12 additions and 1 deletions

View file

@ -306,7 +306,10 @@ update would trigger a complete rebuild."
(list (resolve-interface mod)))
(_ (all-modules (%package-module-path)
#:warn
warn-about-load-error)))))
warn-about-load-error))))
(update-spec (if target-version
(cut update-spec <> target-version #t)
update-spec)))
(map update-spec
(fold-packages (lambda (package result)
(if (select? package)