From 57ceb64e3464c347f42bd883e394163904f928ec Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 28 May 2023 22:44:52 +0200 Subject: upstream: Honor package properties for ignored and extra inputs. * guix/upstream.scm (update-package-inputs)[filtered-inputs] [regular-inputs, native-inputs, propagated-inputs]: New procedures. Use them in 'update-field' calls. * tests/guix-refresh.sh (GUIX_TEST_UPDATER_TARGETS): Add "libreoffice" to the dependencies of "the-test-package". Add 'updater-ignored-inputs' property to "the-test-package". * doc/guix.texi (Invoking guix refresh): Document it. --- doc/guix.texi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index b83767aaf4..7f8d8d66e9 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -14359,6 +14359,36 @@ guix refresh -L /path/to/channel -u @var{package} @xref{Creating a Channel}, on how to create a channel. +This command updates the version and source code hash of the package. +Depending on the updater being used, it can also update the various +@samp{inputs} fields of the package. In some cases, the updater might +get inputs wrong---it might not know about an extra input that's +necessary, or it might add an input that should be avoided. + +@cindex @code{updater-extra-inputs}, package property +@cindex @code{updater-ignored-inputs}, package property +To address that, packagers can add properties stating inputs that should +be added to those found by the updater or inputs that should be ignored: +the @code{updater-extra-inputs} and @code{updater-ignored-inputs} +properties pertain to ``regular'' inputs, and there are equivalent +properties for @samp{native} and @samp{propagated} inputs. In the +example below, we tell the updater that we need @samp{openmpi} as an +additional input: + +@lisp +(define-public python-mpi4py + (package + (name "python-mpi4py") + ;; @dots{} + (inputs (list openmpi)) + (properties + '((updater-extra-inputs . ("openmpi")))))) +@end lisp + +That way, @command{guix refresh -u python-mpi4py} will leave the +@samp{openmpi} input, even if it is not among the inputs it would +normally add. + @item --select=[@var{subset}] @itemx -s @var{subset} Select all the packages in @var{subset}, one of @code{core}, @code{non-core} -- cgit 1.4.1