summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-05-28 22:44:52 +0200
committerLudovic Courtès <ludo@gnu.org>2023-05-31 23:25:26 +0200
commit57ceb64e3464c347f42bd883e394163904f928ec (patch)
treea6174d355bef31c2cc4441b754d0159ad8f4690e /doc
parent9e237fe0bd813664adf54599586df75b2e5b0998 (diff)
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.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi30
1 files changed, 30 insertions, 0 deletions
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}