aboutsummaryrefslogtreecommitdiff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorNikita Karetnikov <nikita@karetnikov.org>2013-09-19 11:07:39 +0000
committerNikita Karetnikov <nikita@karetnikov.org>2013-09-19 11:22:31 +0000
commit2cd09108c9b316c9c8aa1c1b87b85a1c32cef089 (patch)
tree9cce8929f1da78d7b7a9324129829cf3d9ab5238 /doc/guix.texi
parent72d9148fbf6e097cd8838b51c49f107c5176287a (diff)
downloadpatches-2cd09108c9b316c9c8aa1c1b87b85a1c32cef089.tar
patches-2cd09108c9b316c9c8aa1c1b87b85a1c32cef089.tar.gz
guix package: Add '--list-generations'.
* guix/scripts/package.scm: Import (srfi srfi-19). (generation-time, matching-generations): New functions. (show-help): Add '--list-generations'. (%options): Likewise. (guix-package)[process-query]: Add support for '--list-generations'. * guix/ui.scm: Import (srfi srfi-19) and (ice-9 regex). (string->generations, string->duration): New functions. * tests/guix-package.sh: Test '--list-generations'. * tests/ui.scm: Import (srfi srfi-19). Test 'string->generations' and 'string->duration'. * doc/guix.texi (Invoking guix-package): Document '--list-generations'.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi33
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 92c163c608..fdddcc52c3 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -606,6 +606,39 @@ library are installed in the profile, then @code{--search-paths} will
suggest setting these variables to @code{@var{profile}/include} and
@code{@var{profile}/lib}, respectively.
+@item --list-generations[=@var{pattern}]
+@itemx -l [@var{pattern}]
+Return a list of generations along with their creation dates.
+
+For each installed package, print the following items, separated by
+tabs: the name of a package, its version string, the part of the package
+that is installed (@pxref{Packages with Multiple Outputs}), and the
+location of this package in the store.
+
+When @var{pattern} is used, the command returns only matching
+generations. Valid patterns include:
+
+@itemize
+@item @emph{Integers and comma-separated integers}. Both patterns denote
+generation numbers. For instance, @code{--list-generations=1} returns
+the first one.
+
+And @code{--list-generations=1,8,2} outputs three generations in the
+specified order. Neither spaces nor trailing commas are allowed.
+
+@item @emph{Ranges}. @code{--list-generations=2..9} prints the
+specified generations and everything in between. Note that the start of
+a range must be lesser than its end.
+
+It is also possible to omit the endpoint. For example,
+@code{--list-generations=2..}, returns all generations starting from the
+second one.
+
+@item @emph{Durations}. You can also get the last @emph{N}@tie{}days, weeks,
+or months by passing an integer along with the first letter of the
+duration, e.g., @code{--list-generations=20d}.
+@end itemize
+
@item --profile=@var{profile}
@itemx -p @var{profile}
Use @var{profile} instead of the user's default profile.