diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-01-10 22:13:04 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-02-01 17:32:35 +0100 |
commit | aedbc5ff32a62f45aeed74c6833399a6cf2c22dc (patch) | |
tree | 2fde6bc10da72d4aa16902f5b70c175a50eccda6 /doc/guix.texi | |
parent | 60d72f536437bcef2a4e02faa1fe0c8076049fcc (diff) |
guix package: Add '--export-channels'.
* guix/channels.scm (sexp->channel): Export.
* guix/describe.scm: Use (guix channels).
(manifest-entry-provenance): New procedure.
* guix/scripts/package.scm (channel=?, export-channels): New
procedures.
(show-help, %options): Add '--export-channels'.
(process-query): Honor it.
* build-aux/build-self.scm (build-program)[select?]: Exclude (guix
channels) to account for the (guix describe) change above.
* doc/guix.texi (Invoking guix package): Document it.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r-- | doc/guix.texi | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index e5872b5f24..9e62da438e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3616,7 +3616,31 @@ exactly what you specified. Keep in mind that a manifest is purely symbolic: it only contains package names and possibly versions, and their meaning varies over time. - +If you wish to ``pin'' channels to the revisions that were used to build +the profile(s), see @option{--export-channels} below. + +@cindex pinning, channel revisions of a profile +@item --export-channels +Write to standard output the list of channels used by the chosen +profile(s), in a format suitable for @command{guix pull --channels} or +@command{guix time-machine --channels} (@pxref{Channels}). + +Together with @option{--export-manifest}, this option provides +information allowing you to replicate the current profile +(@pxref{Replicating Guix}). + +However, note that the output of this command @emph{approximates} what +was actually used to build this profile. In particular, a single +profile might have been built from several different revisions of the +same channel. In that case, @option{--export-manifest} chooses the last +one and writes the list of other revisions in a comment. If you really +need to pick packages from different channel revisions, you can use +inferiors in your manifest to do so (@pxref{Inferiors}). + +Together with @option{--export-manifest}, this is a good starting point +if you are willing to migrate from the ``imperative'' model to the fully +declarative model consisting of a manifest file along with a channels +file pinning the exact channel revision(s) you want. @end table Finally, since @command{guix package} may actually start build |