2013-01-05 18:47:50 -05:00
|
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2021-01-10 09:50:30 -05:00
|
|
|
|
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
2013-01-17 16:20:42 -05:00
|
|
|
|
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
|
2015-03-26 17:25:09 -04:00
|
|
|
|
;;; Copyright © 2013, 2015 Mark H Weaver <mhw@netris.org>
|
2016-02-23 03:38:00 -05:00
|
|
|
|
;;; Copyright © 2014, 2016 Alex Kost <alezost@gmail.com>
|
2016-10-26 08:53:29 -04:00
|
|
|
|
;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
|
|
|
|
|
;;; Copyright © 2016 Benz Schenk <benz.schenk@uzh.ch>
|
2016-11-02 01:48:11 -04:00
|
|
|
|
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
|
2019-03-16 02:01:26 -04:00
|
|
|
|
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
2020-04-14 12:02:26 -04:00
|
|
|
|
;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
|
2020-05-10 19:40:44 -04:00
|
|
|
|
;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
|
2018-01-09 17:10:04 -05:00
|
|
|
|
;;; Copyright © 2018 Steve Sprang <scs@stevesprang.com>
|
2012-10-31 20:46:15 -04:00
|
|
|
|
;;;
|
2013-01-05 18:47:50 -05:00
|
|
|
|
;;; This file is part of GNU Guix.
|
2012-10-31 20:46:15 -04:00
|
|
|
|
;;;
|
2013-01-05 18:47:50 -05:00
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
2012-10-31 20:46:15 -04:00
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
|
;;; your option) any later version.
|
|
|
|
|
;;;
|
2013-01-05 18:47:50 -05:00
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
2012-10-31 20:46:15 -04:00
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
|
;;;
|
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
2013-01-05 18:47:50 -05:00
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
2012-10-31 20:46:15 -04:00
|
|
|
|
|
Replace individual scripts with master 'guix' script.
* scripts/guix.in: New script.
* Makefile.am (bin_SCRIPTS): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
(MODULES): Add 'guix/scripts/build.scm', 'guix/scripts/download.scm',
'guix/scripts/import.scm', 'guix/scripts/package.scm', and
'guix/scripts/gc.scm'.
* configure.ac (AC_CONFIG_FILES): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
* guix-build.in, guix-download.in, guix-gc.in, guix-import.in,
guix-package.in: Remove shell script boilerplate. Move to guix-COMMAND.in
to guix/scripts/COMMAND.scm. Rename module from (guix-COMMAND) to
(guix scripts COMMAND). Change "guix-COMMAND" to "guix COMMAND" in
usage help string.
* pre-inst-env.in: Add "@abs_top_builddir@/scripts" to the front of $PATH.
Export $GUIX_UNINSTALLED.
* tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh,
tests/guix-gc.sh, tests/guix-package.sh: Use "guix COMMAND" instead of
"guix-COMMAND".
* doc/guix.texi: Replace all occurrences of "guix-COMMAND" with
"guix COMMAND".
* po/POTFILES.in: Update.
2013-02-14 04:15:25 -05:00
|
|
|
|
(define-module (guix scripts package)
|
2012-11-03 16:19:43 -04:00
|
|
|
|
#:use-module (guix ui)
|
2019-02-11 17:05:36 -05:00
|
|
|
|
#:use-module ((guix status) #:select (with-status-verbosity))
|
2019-06-25 17:37:32 -04:00
|
|
|
|
#:use-module ((guix build syscalls) #:select (terminal-rows))
|
2012-10-31 20:46:15 -04:00
|
|
|
|
#:use-module (guix store)
|
2016-03-02 07:43:13 -05:00
|
|
|
|
#:use-module (guix grafts)
|
2012-10-31 20:46:15 -04:00
|
|
|
|
#:use-module (guix derivations)
|
|
|
|
|
#:use-module (guix packages)
|
Add (guix profiles).
* guix/scripts/package.scm (show-what-to-remove/install): New procedure,
moved from...
(guix-package): ... here.
(<manifest>, make-manifest, <manifest-entry>,
profile-manifest, manifest->sexp, sexp->manifest, read-manifest,
write-manifest, remove-manifest-entry, manifest-remove,
manifest-installed?, manifest=?, profile-regexp, generation-numbers,
previous-generation-number, profile-derivation, generation-number,
generation-file-name, generation-time, lower-input): Move to...
* guix/profiles.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2013-11-01 11:31:45 -04:00
|
|
|
|
#:use-module (guix profiles)
|
Move search path specifications to (guix search-paths).
* guix/packages.scm (<search-path-specification>,
search-path-specification->sexp, sexp->search-path-specification):
Move to...
* guix/search-paths.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* guix/build-system/cmake.scm, guix/build-system/glib-or-gtk.scm,
guix/build-system/gnu.scm, guix/build-system/haskell.scm,
guix/build-system/perl.scm, guix/build-system/python.scm,
guix/build-system/ruby.scm, guix/build-system/waf.scm,
guix/profiles.scm, guix/scripts/package.scm: Use it.
2015-05-04 16:11:37 -04:00
|
|
|
|
#:use-module (guix search-paths)
|
2021-03-19 06:45:12 -04:00
|
|
|
|
#:autoload (guix import json) (json->scheme-file)
|
2014-07-26 16:08:10 -04:00
|
|
|
|
#:use-module (guix monads)
|
2012-10-31 20:46:15 -04:00
|
|
|
|
#:use-module (guix utils)
|
2012-12-13 16:53:05 -05:00
|
|
|
|
#:use-module (guix config)
|
2015-09-10 05:37:36 -04:00
|
|
|
|
#:use-module (guix scripts)
|
2014-03-01 12:29:29 -05:00
|
|
|
|
#:use-module (guix scripts build)
|
guix build: Move transformation options to (guix transformations).
* guix/transformations.scm: New file.
* tests/scripts-build.scm: Rename to...
* tests/transformations.scm: ... this.
* Makefile.am (MODULES): Add 'guix/transformations.scm'.
(SCM_TESTS): Adjust to rename.
* guix/scripts/build.scm (numeric-extension?)
(tarball-base-name, <downloaded-file>, download-to-store*)
(compile-downloaded-file, package-with-source)
(transform-package-source, evaluate-replacement-specs)
(transform-package-inputs, transform-package-inputs/graft)
(%not-equal, package-git-url, evaluate-git-replacement-specs)
(transform-package-source-branch, transform-package-source-commit)
(transform-package-source-git-url, package-dependents/spec)
(package-toolchain-rewriting, transform-package-toolchain)
(transform-package-with-debug-info, transform-package-tests)
(%transformations, transformation-procedure, %transformation-options)
(show-transformation-options-help, options->transformation)
(package-transformations): Move to (guix transformations).
* guix/scripts/environment.scm: Adjust accordingly.
* guix/scripts/graph.scm: Likewise.
* guix/scripts/install.scm: Likewise.
* guix/scripts/pack.scm: Likewise.
* guix/scripts/package.scm: Likewise.
* guix/scripts/upgrade.scm: Likewise.
* po/guix/POTFILES.in: Add 'guix/transformations.scm'.
2020-10-29 13:30:07 -04:00
|
|
|
|
#:use-module (guix transformations)
|
2021-03-19 06:45:12 -04:00
|
|
|
|
#:autoload (guix describe) (manifest-entry-provenance
|
|
|
|
|
manifest-entry-with-provenance)
|
2021-01-10 16:13:04 -05:00
|
|
|
|
#:autoload (guix channels) (channel-name channel-commit channel->code)
|
2020-01-15 09:04:40 -05:00
|
|
|
|
#:autoload (guix store roots) (gc-roots user-owned?)
|
2014-12-27 17:46:10 -05:00
|
|
|
|
#:use-module ((guix build utils)
|
2015-11-24 12:12:03 -05:00
|
|
|
|
#:select (directory-exists? mkdir-p))
|
2012-10-31 20:46:15 -04:00
|
|
|
|
#:use-module (ice-9 format)
|
|
|
|
|
#:use-module (ice-9 match)
|
2021-01-10 09:50:30 -05:00
|
|
|
|
#:autoload (ice-9 pretty-print) (pretty-print)
|
2017-06-13 17:04:05 -04:00
|
|
|
|
#:use-module (ice-9 regex)
|
Build newest versions unless specified, and implement upgrades.
* gnu/packages.scm (find-newest-available-packages):
New exported procedure.
* guix-build.in (newest-available-packages, find-best-packages-by-name):
New procedures.
(find-package): Use find-best-packages-by-name, to guarantee that
if a version number is not specified, only the newest versions will
be considered.
* guix-package.in (%options): Add --upgrade/-u option.
(newest-available-packages, find-best-packages-by-name, upgradeable?):
New procedures.
(find-package): Use find-best-packages-by-name, to guarantee that
if a version number is not specified, only the newest versions will
be considered.
(process-actions): Implement upgrade option.
* doc/guix.texi (Invoking guix-package): In the description of --install,
mention that if no version number is specified, the newest available
version will be selected.
2013-02-12 01:24:21 -05:00
|
|
|
|
#:use-module (ice-9 vlist)
|
2012-10-31 20:46:15 -04:00
|
|
|
|
#:use-module (srfi srfi-1)
|
|
|
|
|
#:use-module (srfi srfi-11)
|
|
|
|
|
#:use-module (srfi srfi-26)
|
2014-10-08 09:29:01 -04:00
|
|
|
|
#:use-module (srfi srfi-34)
|
|
|
|
|
#:use-module (srfi srfi-35)
|
2012-10-31 20:46:15 -04:00
|
|
|
|
#:use-module (srfi srfi-37)
|
2013-01-17 19:06:47 -05:00
|
|
|
|
#:use-module (gnu packages)
|
2015-11-24 12:12:03 -05:00
|
|
|
|
#:autoload (gnu packages bootstrap) (%bootstrap-guile)
|
2016-03-25 04:27:18 -04:00
|
|
|
|
#:export (build-and-use-profile
|
|
|
|
|
delete-generations
|
2019-02-13 09:27:36 -05:00
|
|
|
|
delete-matching-generations
|
guix package: Add 'install', 'remove', and 'upgrade' aliases.
* guix/scripts/install.scm, guix/scripts/remove.scm,
guix/scripts/upgrade.scm, tests/guix-package-aliases.sh: New files.
* Makefile.am (MODULES, SH_TESTS): Add them.
* po/guix/POTFILES.in: Add them.
* guix/scripts/package.scm (guix-package): Split with...
(guix-package*): ... this. New procedure.
* doc/guix.texi (Invoking guix package): Document them.
(Binary Installation, Application Setup, Package Management)
(Packages with Multiple Outputs, Package Modules)
(X.509 Certificates, Installing Debugging Files): Use 'guix install' in
simple examples.
* etc/completion/bash/guix (_guix_complete): Handle "install", "remove",
and "upgrade".
2019-04-27 12:04:00 -04:00
|
|
|
|
guix-package
|
|
|
|
|
|
2020-04-24 09:15:50 -04:00
|
|
|
|
search-path-environment-variables
|
|
|
|
|
|
2020-01-16 04:57:19 -05:00
|
|
|
|
transaction-upgrade-entry ;mostly for testing
|
|
|
|
|
|
guix package: Add 'install', 'remove', and 'upgrade' aliases.
* guix/scripts/install.scm, guix/scripts/remove.scm,
guix/scripts/upgrade.scm, tests/guix-package-aliases.sh: New files.
* Makefile.am (MODULES, SH_TESTS): Add them.
* po/guix/POTFILES.in: Add them.
* guix/scripts/package.scm (guix-package): Split with...
(guix-package*): ... this. New procedure.
* doc/guix.texi (Invoking guix package): Document them.
(Binary Installation, Application Setup, Package Management)
(Packages with Multiple Outputs, Package Modules)
(X.509 Certificates, Installing Debugging Files): Use 'guix install' in
simple examples.
* etc/completion/bash/guix (_guix_complete): Handle "install", "remove",
and "upgrade".
2019-04-27 12:04:00 -04:00
|
|
|
|
(%options . %package-options)
|
|
|
|
|
(%default-options . %package-default-options)
|
|
|
|
|
guix-package*))
|
2012-10-31 20:46:15 -04:00
|
|
|
|
|
|
|
|
|
(define %store
|
2013-01-15 16:39:03 -05:00
|
|
|
|
(make-parameter #f))
|
2012-10-31 20:46:15 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;
|
Add (guix profiles).
* guix/scripts/package.scm (show-what-to-remove/install): New procedure,
moved from...
(guix-package): ... here.
(<manifest>, make-manifest, <manifest-entry>,
profile-manifest, manifest->sexp, sexp->manifest, read-manifest,
write-manifest, remove-manifest-entry, manifest-remove,
manifest-installed?, manifest=?, profile-regexp, generation-numbers,
previous-generation-number, profile-derivation, generation-number,
generation-file-name, generation-time, lower-input): Move to...
* guix/profiles.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2013-11-01 11:31:45 -04:00
|
|
|
|
;;; Profiles.
|
2012-10-31 20:46:15 -04:00
|
|
|
|
;;;
|
|
|
|
|
|
2015-11-30 03:56:28 -05:00
|
|
|
|
(define (ensure-default-profile)
|
|
|
|
|
"Ensure the default profile symlink and directory exist and are writable."
|
2018-10-11 12:04:51 -04:00
|
|
|
|
(ensure-profile-directory)
|
2015-11-30 03:56:28 -05:00
|
|
|
|
|
2020-02-27 17:24:56 -05:00
|
|
|
|
;; Try to create ~/.guix-profile if it doesn't exist yet.
|
2015-11-30 03:56:28 -05:00
|
|
|
|
(when (and %user-profile-directory
|
|
|
|
|
%current-profile
|
|
|
|
|
(not (false-if-exception
|
|
|
|
|
(lstat %user-profile-directory))))
|
2020-02-27 17:24:56 -05:00
|
|
|
|
(catch 'system-error
|
|
|
|
|
(lambda ()
|
|
|
|
|
(symlink %current-profile %user-profile-directory))
|
|
|
|
|
(const #t))))
|
2015-11-30 03:56:28 -05:00
|
|
|
|
|
2014-10-04 12:45:35 -04:00
|
|
|
|
(define (delete-generations store profile generations)
|
|
|
|
|
"Delete GENERATIONS from PROFILE.
|
|
|
|
|
GENERATIONS is a list of generation numbers."
|
2015-10-26 18:01:06 -04:00
|
|
|
|
(for-each (cut delete-generation* store profile <>)
|
2014-10-04 12:45:35 -04:00
|
|
|
|
generations))
|
|
|
|
|
|
2015-04-06 14:02:22 -04:00
|
|
|
|
(define (delete-matching-generations store profile pattern)
|
|
|
|
|
"Delete from PROFILE all the generations matching PATTERN. PATTERN must be
|
|
|
|
|
a string denoting a set of generations: the empty list means \"all generations
|
|
|
|
|
but the current one\", a number designates a generation, and other patterns
|
2015-12-23 23:37:05 -05:00
|
|
|
|
denote ranges as interpreted by 'matching-generations'."
|
2015-04-06 14:02:22 -04:00
|
|
|
|
(let ((current (generation-number profile)))
|
|
|
|
|
(cond ((not (file-exists? profile)) ; XXX: race condition
|
|
|
|
|
(raise (condition (&profile-not-found-error
|
|
|
|
|
(profile profile)))))
|
2019-07-10 13:58:30 -04:00
|
|
|
|
((not pattern)
|
2015-11-30 03:54:07 -05:00
|
|
|
|
(delete-generations store profile
|
2015-04-06 14:02:22 -04:00
|
|
|
|
(delv current (profile-generations profile))))
|
|
|
|
|
;; Do not delete the zeroth generation.
|
|
|
|
|
((equal? 0 (string->number pattern))
|
2015-04-06 15:27:03 -04:00
|
|
|
|
#t)
|
2015-04-06 14:02:22 -04:00
|
|
|
|
|
|
|
|
|
;; If PATTERN is a duration, match generations that are
|
|
|
|
|
;; older than the specified duration.
|
|
|
|
|
((matching-generations pattern profile
|
|
|
|
|
#:duration-relation >)
|
|
|
|
|
=>
|
|
|
|
|
(lambda (numbers)
|
2015-04-06 15:26:12 -04:00
|
|
|
|
(when (memv current numbers)
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(warning (G_ "not removing generation ~a, which is current~%")
|
2015-04-06 15:26:12 -04:00
|
|
|
|
current))
|
|
|
|
|
|
|
|
|
|
;; Make sure we don't inadvertently remove the current
|
|
|
|
|
;; generation.
|
|
|
|
|
(let ((numbers (delv current numbers)))
|
2015-04-06 15:27:03 -04:00
|
|
|
|
(when (null-list? numbers)
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(leave (G_ "no matching generation~%")))
|
2019-07-10 13:58:30 -04:00
|
|
|
|
(delete-generations store profile numbers)))))))
|
2015-04-06 14:02:22 -04:00
|
|
|
|
|
2015-11-30 04:09:33 -05:00
|
|
|
|
(define* (build-and-use-profile store profile manifest
|
|
|
|
|
#:key
|
2019-01-11 11:23:39 -05:00
|
|
|
|
(hooks %default-profile-hooks)
|
2018-03-31 17:14:56 -04:00
|
|
|
|
allow-collisions?
|
2020-03-19 05:42:28 -04:00
|
|
|
|
bootstrap?)
|
2015-11-30 04:09:33 -05:00
|
|
|
|
"Build a new generation of PROFILE, a file name, using the packages
|
2018-03-31 17:14:56 -04:00
|
|
|
|
specified in MANIFEST, a manifest object. When ALLOW-COLLISIONS? is true,
|
2019-01-11 11:23:39 -05:00
|
|
|
|
do not treat collisions in MANIFEST as an error. HOOKS is a list of \"profile
|
|
|
|
|
hooks\" run when building the profile."
|
2015-11-30 04:09:33 -05:00
|
|
|
|
(let* ((prof-drv (run-with-store store
|
|
|
|
|
(profile-derivation manifest
|
2018-03-31 17:14:56 -04:00
|
|
|
|
#:allow-collisions? allow-collisions?
|
2019-01-11 11:23:39 -05:00
|
|
|
|
#:hooks (if bootstrap? '() hooks)
|
2016-12-17 06:43:10 -05:00
|
|
|
|
#:locales? (not bootstrap?))))
|
2015-11-30 04:09:33 -05:00
|
|
|
|
(prof (derivation->output-path prof-drv)))
|
|
|
|
|
|
|
|
|
|
(cond
|
|
|
|
|
((and (file-exists? profile)
|
|
|
|
|
(and=> (readlink* profile) (cut string=? prof <>)))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(format (current-error-port) (G_ "nothing to be done~%")))
|
2015-11-30 04:09:33 -05:00
|
|
|
|
(else
|
|
|
|
|
(let* ((number (generation-number profile))
|
|
|
|
|
|
|
|
|
|
;; Always use NUMBER + 1 for the new profile, possibly
|
|
|
|
|
;; overwriting a "previous future generation".
|
|
|
|
|
(name (generation-file-name profile (+ 1 number))))
|
|
|
|
|
(and (build-derivations store (list prof-drv))
|
|
|
|
|
(let* ((entries (manifest-entries manifest))
|
|
|
|
|
(count (length entries)))
|
|
|
|
|
(switch-symlinks name prof)
|
2018-07-13 08:33:11 -04:00
|
|
|
|
(switch-symlinks profile (basename name))
|
2015-11-30 04:09:33 -05:00
|
|
|
|
(unless (string=? profile %current-profile)
|
|
|
|
|
(register-gc-root store name))
|
2019-06-05 11:33:37 -04:00
|
|
|
|
(display-search-path-hint entries profile)))
|
2018-10-22 18:56:25 -04:00
|
|
|
|
|
|
|
|
|
(warn-about-disk-space profile))))))
|
2015-11-30 04:09:33 -05:00
|
|
|
|
|
Add (guix profiles).
* guix/scripts/package.scm (show-what-to-remove/install): New procedure,
moved from...
(guix-package): ... here.
(<manifest>, make-manifest, <manifest-entry>,
profile-manifest, manifest->sexp, sexp->manifest, read-manifest,
write-manifest, remove-manifest-entry, manifest-remove,
manifest-installed?, manifest=?, profile-regexp, generation-numbers,
previous-generation-number, profile-derivation, generation-number,
generation-file-name, generation-time, lower-input): Move to...
* guix/profiles.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
2013-11-01 11:31:45 -04:00
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Package specifications.
|
|
|
|
|
;;;
|
|
|
|
|
|
2016-01-04 16:27:38 -05:00
|
|
|
|
(define (find-packages-by-description regexps)
|
2019-06-25 17:37:32 -04:00
|
|
|
|
"Return a list of pairs: packages whose name, synopsis, description,
|
|
|
|
|
or output matches at least one of REGEXPS sorted by relevance, and its
|
|
|
|
|
non-zero relevance score."
|
2017-06-13 17:04:05 -04:00
|
|
|
|
(let ((matches (fold-packages (lambda (package result)
|
2018-02-27 09:46:56 -05:00
|
|
|
|
(if (package-superseded package)
|
|
|
|
|
result
|
|
|
|
|
(match (package-relevance package
|
|
|
|
|
regexps)
|
|
|
|
|
((? zero?)
|
|
|
|
|
result)
|
|
|
|
|
(score
|
2019-06-25 17:37:32 -04:00
|
|
|
|
(cons (cons package score)
|
2018-02-27 09:46:56 -05:00
|
|
|
|
result)))))
|
2017-06-13 17:04:05 -04:00
|
|
|
|
'())))
|
2019-06-25 17:37:32 -04:00
|
|
|
|
(sort matches
|
|
|
|
|
(lambda (m1 m2)
|
|
|
|
|
(match m1
|
|
|
|
|
((package1 . score1)
|
|
|
|
|
(match m2
|
|
|
|
|
((package2 . score2)
|
|
|
|
|
(if (= score1 score2)
|
|
|
|
|
(string>? (package-full-name package1)
|
|
|
|
|
(package-full-name package2))
|
|
|
|
|
(> score1 score2))))))))))
|
2013-01-28 01:29:10 -05:00
|
|
|
|
|
2020-01-16 04:57:19 -05:00
|
|
|
|
(define (transaction-upgrade-entry store entry transaction)
|
2016-09-06 16:28:12 -04:00
|
|
|
|
"Return a variant of TRANSACTION that accounts for the upgrade of ENTRY, a
|
|
|
|
|
<manifest-entry>."
|
2020-03-30 15:48:51 -04:00
|
|
|
|
(define (lower-manifest-entry* entry)
|
|
|
|
|
(run-with-store store
|
|
|
|
|
(lower-manifest-entry entry (%current-system))))
|
|
|
|
|
|
2016-09-06 17:14:07 -04:00
|
|
|
|
(define (supersede old new)
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(info (G_ "package '~a' has been superseded by '~a'~%")
|
2016-09-06 17:14:07 -04:00
|
|
|
|
(manifest-entry-name old) (package-name new))
|
|
|
|
|
(manifest-transaction-install-entry
|
2018-09-04 04:56:14 -04:00
|
|
|
|
(package->manifest-entry* new (manifest-entry-output old))
|
2016-09-06 17:14:07 -04:00
|
|
|
|
(manifest-transaction-remove-pattern
|
|
|
|
|
(manifest-pattern
|
|
|
|
|
(name (manifest-entry-name old))
|
|
|
|
|
(version (manifest-entry-version old))
|
|
|
|
|
(output (manifest-entry-output old)))
|
|
|
|
|
transaction)))
|
|
|
|
|
|
2020-09-25 11:16:34 -04:00
|
|
|
|
(define (upgrade entry transform)
|
2020-03-30 15:48:51 -04:00
|
|
|
|
(match entry
|
|
|
|
|
(($ <manifest-entry> name version output (? string? path))
|
|
|
|
|
(match (find-best-packages-by-name name #f)
|
|
|
|
|
((pkg . rest)
|
guix build: 'options->transformation' no longer takes a 'store' parameter.
* guix/scripts/build.scm (transform-package-source)
(transform-package-inputs, transform-package-inputs/graft)
(transform-package-source-branch, transform-package-source-commit)
(transform-package-source-git-url, transform-package-toolchain)
(transform-package-with-debug-info, transform-package-tests): Remove
'store' parameter.
(options->transformation, options->derivations): Adjust accordingly.
* guix/scripts/environment.scm (options/resolve-packages): Likewise.
* guix/scripts/graph.scm (guix-graph): Likewise.
* guix/scripts/pack.scm (guix-pack): Likewise.
* guix/scripts/package.scm (transaction-upgrade-entry): Likewise.
(process-actions): Likewise.
* tests/scripts-build.scm ("options->transformation, no transformations")
("options->transformation, with-source, replacement"):
Adjust tests.
("options->transformation, with-source")
("options->transformation, with-source, with version")
("options->transformation, with-source, PKG=URI"): Use 'lower-object' to
compute the store file name of the source.
("options->transformation, with-source, no matches"): Remove
'with-store' and adjust accordingly.
("options->transformation, with-input"): Likewise.
("options->transformation, with-graft"): Likewise.
("options->transformation, with-branch"): Likewise.
("options->transformation, with-commit"): Likewise.
("options->transformation, with-git-url"): Likewise.
("options->transformation, with-git-url + with-branch"): Likewise.
("options->transformation, with-c-toolchain"): Likewise.
("options->transformation, with-c-toolchain twice"): Likewise.
("options->transformation, with-c-toolchain, no effect"): Likewise.
("options->transformation, with-debug-info"): Likewise.
("options->transformation, without-tests"): Likewise.
2020-10-28 18:35:49 -04:00
|
|
|
|
(let* ((pkg (transform pkg))
|
2020-09-25 11:16:34 -04:00
|
|
|
|
(candidate-version (package-version pkg)))
|
2020-03-30 15:48:51 -04:00
|
|
|
|
(match (package-superseded pkg)
|
|
|
|
|
((? package? new)
|
|
|
|
|
(supersede entry new))
|
|
|
|
|
(#f
|
|
|
|
|
(case (version-compare candidate-version version)
|
|
|
|
|
((>)
|
|
|
|
|
(manifest-transaction-install-entry
|
2021-03-04 04:57:46 -05:00
|
|
|
|
(package->manifest-entry* pkg output)
|
2020-03-30 15:48:51 -04:00
|
|
|
|
transaction))
|
|
|
|
|
((<)
|
|
|
|
|
transaction)
|
|
|
|
|
((=)
|
2021-03-04 04:57:46 -05:00
|
|
|
|
(let* ((new (package->manifest-entry* pkg output)))
|
2020-03-30 16:11:54 -04:00
|
|
|
|
;; Here we want to determine whether the NEW actually
|
|
|
|
|
;; differs from ENTRY, but we need to intercept
|
|
|
|
|
;; 'build-things' calls because they would prevent us from
|
|
|
|
|
;; displaying the list of packages to install/upgrade
|
|
|
|
|
;; upfront. Thus, if lowering NEW triggers a build (due
|
|
|
|
|
;; to grafts), assume NEW differs from ENTRY.
|
2020-03-30 17:34:48 -04:00
|
|
|
|
(if (with-build-handler (const #f)
|
|
|
|
|
(manifest-entry=? (lower-manifest-entry* new)
|
|
|
|
|
entry))
|
2020-03-30 15:48:51 -04:00
|
|
|
|
transaction
|
|
|
|
|
(manifest-transaction-install-entry
|
|
|
|
|
new transaction)))))))))
|
|
|
|
|
(()
|
|
|
|
|
(warning (G_ "package '~a' no longer exists~%") name)
|
|
|
|
|
transaction)))))
|
|
|
|
|
|
|
|
|
|
(if (manifest-transaction-removal-candidate? entry transaction)
|
|
|
|
|
transaction
|
2020-09-25 11:16:34 -04:00
|
|
|
|
|
|
|
|
|
;; Upgrade ENTRY, preserving transformation options listed in its
|
|
|
|
|
;; properties.
|
|
|
|
|
(let ((transform (options->transformation
|
|
|
|
|
(or (assq-ref (manifest-entry-properties entry)
|
|
|
|
|
'transformations)
|
|
|
|
|
'()))))
|
|
|
|
|
(upgrade entry transform))))
|
2013-10-29 17:03:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Search paths.
|
|
|
|
|
;;;
|
|
|
|
|
|
2015-11-10 16:00:53 -05:00
|
|
|
|
(define* (search-path-environment-variables entries profiles
|
2015-05-20 05:52:45 -04:00
|
|
|
|
#:optional (getenv getenv)
|
|
|
|
|
#:key (kind 'exact))
|
2015-05-03 17:01:35 -04:00
|
|
|
|
"Return environment variable definitions that may be needed for the use of
|
2015-11-10 16:00:53 -05:00
|
|
|
|
ENTRIES, a list of manifest entries, in PROFILES. Use GETENV to determine the
|
2015-05-20 05:52:45 -04:00
|
|
|
|
current settings and report only settings not already effective. KIND
|
|
|
|
|
must be one of 'exact, 'prefix, or 'suffix, depending on the kind of search
|
|
|
|
|
path definition to be returned."
|
2015-05-03 16:33:27 -04:00
|
|
|
|
(let ((search-paths (delete-duplicates
|
2015-05-20 05:12:34 -04:00
|
|
|
|
(cons $PATH
|
|
|
|
|
(append-map manifest-entry-search-paths
|
|
|
|
|
entries)))))
|
2015-05-03 17:01:35 -04:00
|
|
|
|
(filter-map (match-lambda
|
2015-05-04 16:27:11 -04:00
|
|
|
|
((spec . value)
|
|
|
|
|
(let ((variable (search-path-specification-variable spec))
|
|
|
|
|
(sep (search-path-specification-separator spec)))
|
|
|
|
|
(environment-variable-definition variable value
|
2015-05-20 05:52:45 -04:00
|
|
|
|
#:separator sep
|
|
|
|
|
#:kind kind))))
|
2015-11-10 16:00:53 -05:00
|
|
|
|
(evaluate-search-paths search-paths profiles
|
2015-05-05 07:55:03 -04:00
|
|
|
|
getenv))))
|
2013-04-28 17:05:57 -04:00
|
|
|
|
|
2019-04-08 16:16:37 -04:00
|
|
|
|
(define (absolutize file)
|
|
|
|
|
"Return an absolute file name equivalent to FILE, but without resolving
|
|
|
|
|
symlinks like 'canonicalize-path' would do."
|
|
|
|
|
(if (string-prefix? "/" file)
|
|
|
|
|
file
|
|
|
|
|
(string-append (getcwd) "/" file)))
|
|
|
|
|
|
2019-06-05 11:33:37 -04:00
|
|
|
|
(define (display-search-path-hint entries profile)
|
|
|
|
|
"Display a hint on how to set environment variables to use ENTRIES, a list
|
|
|
|
|
of manifest entries, in the context of PROFILE."
|
|
|
|
|
(let* ((profile (user-friendly-profile (absolutize profile)))
|
|
|
|
|
(settings (search-path-environment-variables entries (list profile)
|
|
|
|
|
#:kind 'prefix)))
|
2013-04-28 17:05:57 -04:00
|
|
|
|
(unless (null? settings)
|
2019-06-05 11:33:37 -04:00
|
|
|
|
(display-hint (format #f (G_ "Consider setting the necessary environment
|
|
|
|
|
variables by running:
|
|
|
|
|
|
|
|
|
|
@example
|
|
|
|
|
GUIX_PROFILE=\"~a\"
|
|
|
|
|
. \"$GUIX_PROFILE/etc/profile\"
|
|
|
|
|
@end example
|
|
|
|
|
|
|
|
|
|
Alternately, see @command{guix package --search-paths -p ~s}.")
|
|
|
|
|
profile profile)))))
|
2013-04-28 17:05:57 -04:00
|
|
|
|
|
2021-01-10 09:50:30 -05:00
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Export a manifest.
|
|
|
|
|
;;;
|
|
|
|
|
|
|
|
|
|
(define* (export-manifest manifest
|
|
|
|
|
#:optional (port (current-output-port)))
|
|
|
|
|
"Write to PORT a manifest corresponding to MANIFEST."
|
|
|
|
|
(define (version-spec entry)
|
|
|
|
|
(let ((name (manifest-entry-name entry)))
|
|
|
|
|
(match (map package-version (find-packages-by-name name))
|
|
|
|
|
((_)
|
|
|
|
|
;; A single version of NAME is available, so do not specify the
|
|
|
|
|
;; version number, even if the available version doesn't match ENTRY.
|
|
|
|
|
"")
|
|
|
|
|
(versions
|
|
|
|
|
;; If ENTRY uses the latest version, don't specify any version.
|
|
|
|
|
;; Otherwise return the shortest unique version prefix. Note that
|
|
|
|
|
;; this is based on the currently available packages, which could
|
|
|
|
|
;; differ from the packages available in the revision that was used
|
|
|
|
|
;; to build MANIFEST.
|
|
|
|
|
(let ((current (manifest-entry-version entry)))
|
|
|
|
|
(if (every (cut version>? current <>)
|
|
|
|
|
(delete current versions))
|
|
|
|
|
""
|
|
|
|
|
(version-unique-prefix (manifest-entry-version entry)
|
|
|
|
|
versions)))))))
|
|
|
|
|
|
|
|
|
|
(match (manifest->code manifest
|
|
|
|
|
#:entry-package-version version-spec)
|
|
|
|
|
(('begin exp ...)
|
|
|
|
|
(format port (G_ "\
|
|
|
|
|
;; This \"manifest\" file can be passed to 'guix package -m' to reproduce
|
|
|
|
|
;; the content of your profile. This is \"symbolic\": it only specifies
|
|
|
|
|
;; package names. To reproduce the exact same profile, you also need to
|
|
|
|
|
;; capture the channels being used, as returned by \"guix describe\".
|
|
|
|
|
;; See the \"Replicating Guix\" section in the manual.\n"))
|
|
|
|
|
(for-each (lambda (exp)
|
|
|
|
|
(newline port)
|
|
|
|
|
(pretty-print exp port))
|
|
|
|
|
exp))))
|
|
|
|
|
|
2021-01-10 16:13:04 -05:00
|
|
|
|
(define (channel=? a b)
|
|
|
|
|
(and (channel-commit a) (channel-commit b)
|
|
|
|
|
(string=? (channel-commit a) (channel-commit b))))
|
|
|
|
|
|
|
|
|
|
(define* (export-channels manifest
|
|
|
|
|
#:optional (port (current-output-port)))
|
|
|
|
|
(define channels
|
|
|
|
|
(delete-duplicates
|
|
|
|
|
(append-map manifest-entry-provenance (manifest-entries manifest))
|
|
|
|
|
channel=?))
|
|
|
|
|
|
|
|
|
|
(define channel-names
|
|
|
|
|
(delete-duplicates (map channel-name channels)))
|
|
|
|
|
|
|
|
|
|
(define table
|
|
|
|
|
(fold (lambda (channel table)
|
|
|
|
|
(vhash-consq (channel-name channel) channel table))
|
|
|
|
|
vlist-null
|
|
|
|
|
channels))
|
|
|
|
|
|
|
|
|
|
(when (null? channels)
|
|
|
|
|
(leave (G_ "no provenance information for this profile~%")))
|
|
|
|
|
|
|
|
|
|
(format port (G_ "\
|
|
|
|
|
;; This channel file can be passed to 'guix pull -C' or to
|
|
|
|
|
;; 'guix time-machine -C' to obtain the Guix revision that was
|
|
|
|
|
;; used to populate this profile.\n"))
|
|
|
|
|
(newline port)
|
|
|
|
|
(display "(list\n" port)
|
|
|
|
|
(for-each (lambda (name)
|
|
|
|
|
(define indent " ")
|
|
|
|
|
(match (vhash-foldq* cons '() name table)
|
|
|
|
|
((channel extra ...)
|
|
|
|
|
(unless (null? extra)
|
|
|
|
|
(display indent port)
|
|
|
|
|
(format port (G_ "\
|
|
|
|
|
;; Note: these other commits were also used to install \
|
|
|
|
|
some of the packages in this profile:~%"))
|
|
|
|
|
(for-each (lambda (channel)
|
|
|
|
|
(format port "~a;; ~s~%"
|
|
|
|
|
indent (channel-commit channel)))
|
|
|
|
|
extra))
|
|
|
|
|
(pretty-print (channel->code channel) port
|
|
|
|
|
#:per-line-prefix indent))))
|
|
|
|
|
channel-names)
|
|
|
|
|
(display ")\n" port)
|
|
|
|
|
#t)
|
|
|
|
|
|
2012-10-31 20:46:15 -04:00
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Command-line options.
|
|
|
|
|
;;;
|
|
|
|
|
|
|
|
|
|
(define %default-options
|
|
|
|
|
;; Alist of default option values.
|
guix build: Re-purpose '--verbosity' and add '--debug'.
The previous '--verbosity' option was misleading and rarely what users
were looking for. The new option provides a consistent way to choose
whether or not to display the build log.
* guix/scripts/build.scm (show-build-options-help): Remove "--verbosity"
and add "--debug".
(set-build-options-from-command-line): Use the 'debug key of OPTS for
#:verbosity.
(%standard-build-options): Change "verbosity" to "debug". Use
'string->number*' instead of 'string->number'.
(%default-options): Change 'verbosity to 'debug and add a 'verbosity
key.
(show-help): Add '--verbosity'.
(%options): Likewise, and change '--quiet' to set the 'verbosity key of
RESULT.
(guix-build): Use 'with-status-verbosity' instead of parameterizing
CURRENT-BUILD-OUTPUT-PORT, honor the 'verbosity key of OPTS, and remove
'quiet?'.
* guix/scripts/environment.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug'.
(guix-environment): Honor the 'verbosity key of OPTS.
* guix/scripts/pack.scm (%default-options): Add 'debug.
(%options, show-help): Add '--verbosity'.
(guix-pack): Honor the 'verbosity key of OPTS.
* guix/scripts/package.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'. Mark '--verbose' as
deprecated and change it to set 'verbosity.
(guix-package): Honor the 'verbosity key of OPTS and remove 'verbose?'.
* guix/scripts/pull.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'.
(guix-pull): Honor the 'verbosity key of OPTS.
* guix/scripts/system.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug.
(guix-system): Honor the 'verbosity key of OPTS.
* guix/scripts/archive.scm (%default-options): Add 'debug,
'print-build-trace?, 'print-extended-build-trace?, and
'multiplexed-build-output?.
(show-help, %options): Add '--verbosity'.
(export-from-store): Remove call to 'set-build-options-from-command-line'.
(guix-archive): Wrap body in 'with-status-verbosity'. Add call to
'set-build-options-from-command-line.
* doc/guix.texi (Common Build Options): Document '--verbosity' and
'--debug'.
(Additional Build Options): Adjust description of '--quiet'.
2019-01-09 08:17:19 -05:00
|
|
|
|
`((verbosity . 1)
|
|
|
|
|
(debug . 0)
|
2016-03-02 07:43:13 -05:00
|
|
|
|
(graft? . #t)
|
2017-12-07 16:49:08 -05:00
|
|
|
|
(substitutes? . #t)
|
2019-11-21 09:28:13 -05:00
|
|
|
|
(offload? . #t)
|
2017-01-18 17:21:29 -05:00
|
|
|
|
(print-build-trace? . #t)
|
2018-10-15 17:06:55 -04:00
|
|
|
|
(print-extended-build-trace? . #t)
|
|
|
|
|
(multiplexed-build-output? . #t)))
|
2012-10-31 20:46:15 -04:00
|
|
|
|
|
|
|
|
|
(define (show-help)
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "Usage: guix package [OPTION]...
|
2015-06-07 04:46:06 -04:00
|
|
|
|
Install, remove, or upgrade packages in a single transaction.\n"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2015-06-07 04:46:06 -04:00
|
|
|
|
-i, --install PACKAGE ...
|
|
|
|
|
install PACKAGEs"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2013-03-01 15:12:32 -05:00
|
|
|
|
-e, --install-from-expression=EXP
|
|
|
|
|
install the package EXP evaluates to"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2015-08-09 11:35:51 -04:00
|
|
|
|
-f, --install-from-file=FILE
|
|
|
|
|
install the package that the code within FILE
|
|
|
|
|
evaluates to"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2015-06-07 04:46:06 -04:00
|
|
|
|
-r, --remove PACKAGE ...
|
|
|
|
|
remove PACKAGEs"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2013-04-15 17:23:27 -04:00
|
|
|
|
-u, --upgrade[=REGEXP] upgrade all the installed packages matching REGEXP"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2015-05-14 21:11:57 -04:00
|
|
|
|
-m, --manifest=FILE create a new profile generation with the manifest
|
|
|
|
|
from FILE"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2015-03-26 17:25:09 -04:00
|
|
|
|
--do-not-upgrade[=REGEXP] do not upgrade any packages matching REGEXP"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2013-01-17 16:20:42 -05:00
|
|
|
|
--roll-back roll back to the previous generation"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2015-05-21 08:26:01 -04:00
|
|
|
|
--search-paths[=KIND]
|
|
|
|
|
display needed environment variable definitions"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2013-09-19 07:07:39 -04:00
|
|
|
|
-l, --list-generations[=PATTERN]
|
|
|
|
|
list generations matching PATTERN"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2013-09-25 22:36:24 -04:00
|
|
|
|
-d, --delete-generations[=PATTERN]
|
|
|
|
|
delete generations matching PATTERN"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2014-10-10 09:58:43 -04:00
|
|
|
|
-S, --switch-generation=PATTERN
|
|
|
|
|
switch to a generation matching PATTERN"))
|
2021-01-10 09:50:30 -05:00
|
|
|
|
(display (G_ "
|
|
|
|
|
--export-manifest print a manifest for the chosen profile"))
|
2021-01-10 16:13:04 -05:00
|
|
|
|
(display (G_ "
|
|
|
|
|
--export-channels print channels for the chosen profile"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2012-10-31 20:46:15 -04:00
|
|
|
|
-p, --profile=PROFILE use PROFILE instead of the user's default profile"))
|
2019-09-24 11:50:48 -04:00
|
|
|
|
(display (G_ "
|
|
|
|
|
--list-profiles list the user's profiles"))
|
2014-03-01 12:29:29 -05:00
|
|
|
|
(newline)
|
2018-03-31 17:14:56 -04:00
|
|
|
|
(display (G_ "
|
|
|
|
|
--allow-collisions do not treat collisions in the profile as an error"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2013-01-07 16:54:54 -05:00
|
|
|
|
--bootstrap use the bootstrap Guile to build the profile"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
guix build: Re-purpose '--verbosity' and add '--debug'.
The previous '--verbosity' option was misleading and rarely what users
were looking for. The new option provides a consistent way to choose
whether or not to display the build log.
* guix/scripts/build.scm (show-build-options-help): Remove "--verbosity"
and add "--debug".
(set-build-options-from-command-line): Use the 'debug key of OPTS for
#:verbosity.
(%standard-build-options): Change "verbosity" to "debug". Use
'string->number*' instead of 'string->number'.
(%default-options): Change 'verbosity to 'debug and add a 'verbosity
key.
(show-help): Add '--verbosity'.
(%options): Likewise, and change '--quiet' to set the 'verbosity key of
RESULT.
(guix-build): Use 'with-status-verbosity' instead of parameterizing
CURRENT-BUILD-OUTPUT-PORT, honor the 'verbosity key of OPTS, and remove
'quiet?'.
* guix/scripts/environment.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug'.
(guix-environment): Honor the 'verbosity key of OPTS.
* guix/scripts/pack.scm (%default-options): Add 'debug.
(%options, show-help): Add '--verbosity'.
(guix-pack): Honor the 'verbosity key of OPTS.
* guix/scripts/package.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'. Mark '--verbose' as
deprecated and change it to set 'verbosity.
(guix-package): Honor the 'verbosity key of OPTS and remove 'verbose?'.
* guix/scripts/pull.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'.
(guix-pull): Honor the 'verbosity key of OPTS.
* guix/scripts/system.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug.
(guix-system): Honor the 'verbosity key of OPTS.
* guix/scripts/archive.scm (%default-options): Add 'debug,
'print-build-trace?, 'print-extended-build-trace?, and
'multiplexed-build-output?.
(show-help, %options): Add '--verbosity'.
(export-from-store): Remove call to 'set-build-options-from-command-line'.
(guix-archive): Wrap body in 'with-status-verbosity'. Add call to
'set-build-options-from-command-line.
* doc/guix.texi (Common Build Options): Document '--verbosity' and
'--debug'.
(Additional Build Options): Adjust description of '--quiet'.
2019-01-09 08:17:19 -05:00
|
|
|
|
-v, --verbosity=LEVEL use the given verbosity LEVEL"))
|
2012-10-31 20:46:15 -04:00
|
|
|
|
(newline)
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2013-01-28 01:29:10 -05:00
|
|
|
|
-s, --search=REGEXP search in synopsis and description using REGEXP"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2012-11-19 16:39:45 -05:00
|
|
|
|
-I, --list-installed[=REGEXP]
|
|
|
|
|
list installed packages matching REGEXP"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2012-11-19 17:02:59 -05:00
|
|
|
|
-A, --list-available[=REGEXP]
|
|
|
|
|
list available packages matching REGEXP"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2015-06-06 11:32:03 -04:00
|
|
|
|
--show=PACKAGE show details about PACKAGE"))
|
2012-11-19 16:39:45 -05:00
|
|
|
|
(newline)
|
2014-03-01 12:29:29 -05:00
|
|
|
|
(show-build-options-help)
|
|
|
|
|
(newline)
|
2020-11-21 06:14:04 -05:00
|
|
|
|
(show-transformation-options-help)
|
|
|
|
|
(newline)
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2012-10-31 20:46:15 -04:00
|
|
|
|
-h, --help display this help and exit"))
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(display (G_ "
|
2012-10-31 20:46:15 -04:00
|
|
|
|
-V, --version display version information and exit"))
|
|
|
|
|
(newline)
|
2013-01-05 09:55:47 -05:00
|
|
|
|
(show-bug-report-information))
|
2012-10-31 20:46:15 -04:00
|
|
|
|
|
|
|
|
|
(define %options
|
|
|
|
|
;; Specification of the command-line options.
|
2014-03-01 12:29:29 -05:00
|
|
|
|
(cons* (option '(#\h "help") #f #f
|
|
|
|
|
(lambda args
|
|
|
|
|
(show-help)
|
|
|
|
|
(exit 0)))
|
|
|
|
|
(option '(#\V "version") #f #f
|
|
|
|
|
(lambda args
|
|
|
|
|
(show-version-and-exit "guix package")))
|
|
|
|
|
|
|
|
|
|
(option '(#\i "install") #f #t
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(let arg-handler ((arg arg) (result result))
|
|
|
|
|
(values (if arg
|
|
|
|
|
(alist-cons 'install arg result)
|
|
|
|
|
result)
|
|
|
|
|
arg-handler))))
|
|
|
|
|
(option '(#\e "install-from-expression") #t #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (alist-cons 'install (read/eval-package-expression arg)
|
|
|
|
|
result)
|
|
|
|
|
#f)))
|
2015-08-09 11:35:51 -04:00
|
|
|
|
(option '(#\f "install-from-file") #t #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (alist-cons 'install
|
2020-04-14 12:02:26 -04:00
|
|
|
|
(let ((file (or (and (string-suffix? ".json" arg)
|
|
|
|
|
(json->scheme-file arg))
|
|
|
|
|
arg)))
|
|
|
|
|
(load* file (make-user-module '())))
|
2015-08-09 11:35:51 -04:00
|
|
|
|
result)
|
|
|
|
|
#f)))
|
2014-03-01 12:29:29 -05:00
|
|
|
|
(option '(#\r "remove") #f #t
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(let arg-handler ((arg arg) (result result))
|
|
|
|
|
(values (if arg
|
|
|
|
|
(alist-cons 'remove arg result)
|
|
|
|
|
result)
|
|
|
|
|
arg-handler))))
|
|
|
|
|
(option '(#\u "upgrade") #f #t
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
2017-08-01 16:02:26 -04:00
|
|
|
|
(when (and arg (string-prefix? "-" arg))
|
2017-07-31 16:22:27 -04:00
|
|
|
|
(warning (G_ "upgrade regexp '~a' looks like a \
|
|
|
|
|
command-line option~%")
|
|
|
|
|
arg)
|
|
|
|
|
(warning (G_ "is this intended?~%")))
|
2014-03-01 12:29:29 -05:00
|
|
|
|
(let arg-handler ((arg arg) (result result))
|
|
|
|
|
(values (alist-cons 'upgrade arg
|
|
|
|
|
;; Delete any prior "upgrade all"
|
|
|
|
|
;; command, or else "--upgrade gcc"
|
|
|
|
|
;; would upgrade everything.
|
|
|
|
|
(delete '(upgrade . #f) result))
|
|
|
|
|
arg-handler))))
|
2015-03-26 17:25:09 -04:00
|
|
|
|
(option '("do-not-upgrade") #f #t
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(let arg-handler ((arg arg) (result result))
|
|
|
|
|
(values (if arg
|
|
|
|
|
(alist-cons 'do-not-upgrade arg result)
|
|
|
|
|
result)
|
|
|
|
|
arg-handler))))
|
2017-06-26 16:51:14 -04:00
|
|
|
|
(option '("roll-back" "rollback") #f #f
|
2014-03-01 12:29:29 -05:00
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (alist-cons 'roll-back? #t result)
|
|
|
|
|
#f)))
|
2015-05-14 21:11:57 -04:00
|
|
|
|
(option '(#\m "manifest") #t #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (alist-cons 'manifest arg result)
|
|
|
|
|
arg-handler)))
|
2014-03-01 12:29:29 -05:00
|
|
|
|
(option '(#\l "list-generations") #f #t
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
2019-07-10 13:58:30 -04:00
|
|
|
|
(values (cons `(query list-generations ,arg)
|
2014-03-01 12:29:29 -05:00
|
|
|
|
result)
|
|
|
|
|
#f)))
|
2019-09-24 11:50:48 -04:00
|
|
|
|
(option '("list-profiles") #f #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (cons `(query list-profiles #t)
|
|
|
|
|
result)
|
|
|
|
|
#f)))
|
2014-03-01 12:29:29 -05:00
|
|
|
|
(option '(#\d "delete-generations") #f #t
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
2019-07-10 13:58:30 -04:00
|
|
|
|
(values (alist-cons 'delete-generations arg
|
2014-03-01 12:29:29 -05:00
|
|
|
|
result)
|
|
|
|
|
#f)))
|
2014-10-10 09:58:43 -04:00
|
|
|
|
(option '(#\S "switch-generation") #t #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (alist-cons 'switch-generation arg result)
|
|
|
|
|
#f)))
|
2015-05-20 05:52:45 -04:00
|
|
|
|
(option '("search-paths") #f #t
|
2014-03-01 12:29:29 -05:00
|
|
|
|
(lambda (opt name arg result arg-handler)
|
2015-05-20 05:52:45 -04:00
|
|
|
|
(let ((kind (match arg
|
|
|
|
|
((or "exact" "prefix" "suffix")
|
|
|
|
|
(string->symbol arg))
|
|
|
|
|
(#f
|
|
|
|
|
'exact)
|
|
|
|
|
(x
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(leave (G_ "~a: unsupported \
|
2015-05-20 05:52:45 -04:00
|
|
|
|
kind of search path~%")
|
|
|
|
|
x)))))
|
|
|
|
|
(values (cons `(query search-paths ,kind)
|
|
|
|
|
result)
|
|
|
|
|
#f))))
|
2021-01-10 09:50:30 -05:00
|
|
|
|
(option '("export-manifest") #f #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (cons `(query export-manifest) result)
|
|
|
|
|
#f)))
|
2021-01-10 16:13:04 -05:00
|
|
|
|
(option '("export-channels") #f #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (cons `(query export-channels) result)
|
|
|
|
|
#f)))
|
2014-03-01 12:29:29 -05:00
|
|
|
|
(option '(#\p "profile") #t #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
2014-07-05 08:56:08 -04:00
|
|
|
|
(values (alist-cons 'profile (canonicalize-profile arg)
|
2015-11-10 16:00:53 -05:00
|
|
|
|
result)
|
2014-03-01 12:29:29 -05:00
|
|
|
|
#f)))
|
|
|
|
|
(option '(#\n "dry-run") #f #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
2020-03-25 10:05:15 -04:00
|
|
|
|
(values (alist-cons 'dry-run? #t result)
|
2014-03-01 12:29:29 -05:00
|
|
|
|
#f)))
|
guix build: Re-purpose '--verbosity' and add '--debug'.
The previous '--verbosity' option was misleading and rarely what users
were looking for. The new option provides a consistent way to choose
whether or not to display the build log.
* guix/scripts/build.scm (show-build-options-help): Remove "--verbosity"
and add "--debug".
(set-build-options-from-command-line): Use the 'debug key of OPTS for
#:verbosity.
(%standard-build-options): Change "verbosity" to "debug". Use
'string->number*' instead of 'string->number'.
(%default-options): Change 'verbosity to 'debug and add a 'verbosity
key.
(show-help): Add '--verbosity'.
(%options): Likewise, and change '--quiet' to set the 'verbosity key of
RESULT.
(guix-build): Use 'with-status-verbosity' instead of parameterizing
CURRENT-BUILD-OUTPUT-PORT, honor the 'verbosity key of OPTS, and remove
'quiet?'.
* guix/scripts/environment.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug'.
(guix-environment): Honor the 'verbosity key of OPTS.
* guix/scripts/pack.scm (%default-options): Add 'debug.
(%options, show-help): Add '--verbosity'.
(guix-pack): Honor the 'verbosity key of OPTS.
* guix/scripts/package.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'. Mark '--verbose' as
deprecated and change it to set 'verbosity.
(guix-package): Honor the 'verbosity key of OPTS and remove 'verbose?'.
* guix/scripts/pull.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'.
(guix-pull): Honor the 'verbosity key of OPTS.
* guix/scripts/system.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug.
(guix-system): Honor the 'verbosity key of OPTS.
* guix/scripts/archive.scm (%default-options): Add 'debug,
'print-build-trace?, 'print-extended-build-trace?, and
'multiplexed-build-output?.
(show-help, %options): Add '--verbosity'.
(export-from-store): Remove call to 'set-build-options-from-command-line'.
(guix-archive): Wrap body in 'with-status-verbosity'. Add call to
'set-build-options-from-command-line.
* doc/guix.texi (Common Build Options): Document '--verbosity' and
'--debug'.
(Additional Build Options): Adjust description of '--quiet'.
2019-01-09 08:17:19 -05:00
|
|
|
|
(option '(#\v "verbosity") #t #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(let ((level (string->number* arg)))
|
|
|
|
|
(values (alist-cons 'verbosity level
|
|
|
|
|
(alist-delete 'verbosity result))
|
|
|
|
|
#f))))
|
2014-03-01 12:29:29 -05:00
|
|
|
|
(option '("bootstrap") #f #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (alist-cons 'bootstrap? #t result)
|
|
|
|
|
#f)))
|
guix build: Re-purpose '--verbosity' and add '--debug'.
The previous '--verbosity' option was misleading and rarely what users
were looking for. The new option provides a consistent way to choose
whether or not to display the build log.
* guix/scripts/build.scm (show-build-options-help): Remove "--verbosity"
and add "--debug".
(set-build-options-from-command-line): Use the 'debug key of OPTS for
#:verbosity.
(%standard-build-options): Change "verbosity" to "debug". Use
'string->number*' instead of 'string->number'.
(%default-options): Change 'verbosity to 'debug and add a 'verbosity
key.
(show-help): Add '--verbosity'.
(%options): Likewise, and change '--quiet' to set the 'verbosity key of
RESULT.
(guix-build): Use 'with-status-verbosity' instead of parameterizing
CURRENT-BUILD-OUTPUT-PORT, honor the 'verbosity key of OPTS, and remove
'quiet?'.
* guix/scripts/environment.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug'.
(guix-environment): Honor the 'verbosity key of OPTS.
* guix/scripts/pack.scm (%default-options): Add 'debug.
(%options, show-help): Add '--verbosity'.
(guix-pack): Honor the 'verbosity key of OPTS.
* guix/scripts/package.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'. Mark '--verbose' as
deprecated and change it to set 'verbosity.
(guix-package): Honor the 'verbosity key of OPTS and remove 'verbose?'.
* guix/scripts/pull.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'.
(guix-pull): Honor the 'verbosity key of OPTS.
* guix/scripts/system.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug.
(guix-system): Honor the 'verbosity key of OPTS.
* guix/scripts/archive.scm (%default-options): Add 'debug,
'print-build-trace?, 'print-extended-build-trace?, and
'multiplexed-build-output?.
(show-help, %options): Add '--verbosity'.
(export-from-store): Remove call to 'set-build-options-from-command-line'.
(guix-archive): Wrap body in 'with-status-verbosity'. Add call to
'set-build-options-from-command-line.
* doc/guix.texi (Common Build Options): Document '--verbosity' and
'--debug'.
(Additional Build Options): Adjust description of '--quiet'.
2019-01-09 08:17:19 -05:00
|
|
|
|
(option '("verbose") #f #f ;deprecated
|
2014-03-01 12:29:29 -05:00
|
|
|
|
(lambda (opt name arg result arg-handler)
|
guix build: Re-purpose '--verbosity' and add '--debug'.
The previous '--verbosity' option was misleading and rarely what users
were looking for. The new option provides a consistent way to choose
whether or not to display the build log.
* guix/scripts/build.scm (show-build-options-help): Remove "--verbosity"
and add "--debug".
(set-build-options-from-command-line): Use the 'debug key of OPTS for
#:verbosity.
(%standard-build-options): Change "verbosity" to "debug". Use
'string->number*' instead of 'string->number'.
(%default-options): Change 'verbosity to 'debug and add a 'verbosity
key.
(show-help): Add '--verbosity'.
(%options): Likewise, and change '--quiet' to set the 'verbosity key of
RESULT.
(guix-build): Use 'with-status-verbosity' instead of parameterizing
CURRENT-BUILD-OUTPUT-PORT, honor the 'verbosity key of OPTS, and remove
'quiet?'.
* guix/scripts/environment.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug'.
(guix-environment): Honor the 'verbosity key of OPTS.
* guix/scripts/pack.scm (%default-options): Add 'debug.
(%options, show-help): Add '--verbosity'.
(guix-pack): Honor the 'verbosity key of OPTS.
* guix/scripts/package.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'. Mark '--verbose' as
deprecated and change it to set 'verbosity.
(guix-package): Honor the 'verbosity key of OPTS and remove 'verbose?'.
* guix/scripts/pull.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'.
(guix-pull): Honor the 'verbosity key of OPTS.
* guix/scripts/system.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug.
(guix-system): Honor the 'verbosity key of OPTS.
* guix/scripts/archive.scm (%default-options): Add 'debug,
'print-build-trace?, 'print-extended-build-trace?, and
'multiplexed-build-output?.
(show-help, %options): Add '--verbosity'.
(export-from-store): Remove call to 'set-build-options-from-command-line'.
(guix-archive): Wrap body in 'with-status-verbosity'. Add call to
'set-build-options-from-command-line.
* doc/guix.texi (Common Build Options): Document '--verbosity' and
'--debug'.
(Additional Build Options): Adjust description of '--quiet'.
2019-01-09 08:17:19 -05:00
|
|
|
|
(values (alist-cons 'verbosity 2
|
|
|
|
|
(alist-delete 'verbosity
|
|
|
|
|
result))
|
2014-03-01 12:29:29 -05:00
|
|
|
|
#f)))
|
2018-03-31 17:14:56 -04:00
|
|
|
|
(option '("allow-collisions") #f #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (alist-cons 'allow-collisions? #t result)
|
|
|
|
|
#f)))
|
2014-03-01 12:29:29 -05:00
|
|
|
|
(option '(#\s "search") #t #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (cons `(query search ,(or arg ""))
|
|
|
|
|
result)
|
|
|
|
|
#f)))
|
|
|
|
|
(option '(#\I "list-installed") #f #t
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (cons `(query list-installed ,(or arg ""))
|
|
|
|
|
result)
|
|
|
|
|
#f)))
|
|
|
|
|
(option '(#\A "list-available") #f #t
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (cons `(query list-available ,(or arg ""))
|
|
|
|
|
result)
|
|
|
|
|
#f)))
|
2014-07-16 20:36:09 -04:00
|
|
|
|
(option '("show") #t #t
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (cons `(query show ,arg)
|
|
|
|
|
result)
|
|
|
|
|
#f)))
|
2014-03-01 12:29:29 -05:00
|
|
|
|
|
2016-01-31 15:33:08 -05:00
|
|
|
|
(append %transformation-options
|
|
|
|
|
%standard-build-options)))
|
2012-10-31 20:46:15 -04:00
|
|
|
|
|
2015-11-30 15:00:39 -05:00
|
|
|
|
(define (options->upgrade-predicate opts)
|
|
|
|
|
"Return a predicate based on the upgrade/do-not-upgrade regexps in OPTS
|
|
|
|
|
that, given a package name, returns true if the package is a candidate for
|
|
|
|
|
upgrading, #f otherwise."
|
2013-10-30 10:26:14 -04:00
|
|
|
|
(define upgrade-regexps
|
|
|
|
|
(filter-map (match-lambda
|
2015-11-30 15:00:39 -05:00
|
|
|
|
(('upgrade . regexp)
|
2019-03-16 02:01:26 -04:00
|
|
|
|
(make-regexp* (or regexp "") regexp/icase))
|
2015-11-30 15:00:39 -05:00
|
|
|
|
(_ #f))
|
2013-10-30 10:26:14 -04:00
|
|
|
|
opts))
|
|
|
|
|
|
2015-03-26 17:25:09 -04:00
|
|
|
|
(define do-not-upgrade-regexps
|
|
|
|
|
(filter-map (match-lambda
|
2015-11-30 15:00:39 -05:00
|
|
|
|
(('do-not-upgrade . regexp)
|
2019-03-16 02:01:26 -04:00
|
|
|
|
(make-regexp* regexp regexp/icase))
|
2015-11-30 15:00:39 -05:00
|
|
|
|
(_ #f))
|
2015-03-26 17:25:09 -04:00
|
|
|
|
opts))
|
|
|
|
|
|
2015-11-30 15:00:39 -05:00
|
|
|
|
(lambda (name)
|
|
|
|
|
(and (any (cut regexp-exec <> name) upgrade-regexps)
|
|
|
|
|
(not (any (cut regexp-exec <> name) do-not-upgrade-regexps)))))
|
|
|
|
|
|
|
|
|
|
(define (store-item->manifest-entry item)
|
|
|
|
|
"Return a manifest entry for ITEM, a \"/gnu/store/...\" file name."
|
|
|
|
|
(let-values (((name version)
|
2017-01-11 05:55:51 -05:00
|
|
|
|
(package-name->name+version (store-path-package-name item)
|
|
|
|
|
#\-)))
|
2015-11-30 15:00:39 -05:00
|
|
|
|
(manifest-entry
|
|
|
|
|
(name name)
|
|
|
|
|
(version version)
|
2017-01-11 05:55:51 -05:00
|
|
|
|
(output "out") ;XXX: wild guess
|
2015-11-30 15:00:39 -05:00
|
|
|
|
(item item))))
|
|
|
|
|
|
2018-09-04 04:56:14 -04:00
|
|
|
|
(define (package->manifest-entry* package output)
|
|
|
|
|
"Like 'package->manifest-entry', but attach PACKAGE provenance meta-data to
|
|
|
|
|
the resulting manifest entry."
|
2020-09-24 12:41:09 -04:00
|
|
|
|
(manifest-entry-with-provenance
|
|
|
|
|
(package->manifest-entry package output)))
|
2018-09-04 04:56:14 -04:00
|
|
|
|
|
2016-09-06 16:28:12 -04:00
|
|
|
|
(define (options->installable opts manifest transaction)
|
2015-11-30 15:00:39 -05:00
|
|
|
|
"Given MANIFEST, the current manifest, and OPTS, the result of 'args-fold',
|
2016-09-06 16:28:12 -04:00
|
|
|
|
return an variant of TRANSACTION that accounts for the specified installations
|
|
|
|
|
and upgrades."
|
2015-11-30 15:00:39 -05:00
|
|
|
|
(define upgrade?
|
|
|
|
|
(options->upgrade-predicate opts))
|
2013-10-30 10:26:14 -04:00
|
|
|
|
|
2016-09-06 16:28:12 -04:00
|
|
|
|
(define upgraded
|
2019-01-15 05:31:16 -05:00
|
|
|
|
(fold (lambda (entry transaction)
|
|
|
|
|
(if (upgrade? (manifest-entry-name entry))
|
2020-01-16 04:57:19 -05:00
|
|
|
|
(transaction-upgrade-entry (%store) entry transaction)
|
2019-01-15 05:31:16 -05:00
|
|
|
|
transaction))
|
|
|
|
|
transaction
|
|
|
|
|
(manifest-entries manifest)))
|
2013-10-30 10:26:14 -04:00
|
|
|
|
|
2015-11-30 15:00:39 -05:00
|
|
|
|
(define to-install
|
2013-10-30 10:26:14 -04:00
|
|
|
|
(filter-map (match-lambda
|
2015-11-30 15:00:39 -05:00
|
|
|
|
(('install . (? package? p))
|
|
|
|
|
;; When given a package via `-e', install the first of its
|
|
|
|
|
;; outputs (XXX).
|
2018-09-04 04:56:14 -04:00
|
|
|
|
(package->manifest-entry* p "out"))
|
2015-11-30 15:00:39 -05:00
|
|
|
|
(('install . (? string? spec))
|
|
|
|
|
(if (store-path? spec)
|
|
|
|
|
(store-item->manifest-entry spec)
|
2013-10-30 10:26:14 -04:00
|
|
|
|
(let-values (((package output)
|
|
|
|
|
(specification->package+output spec)))
|
2018-09-04 04:56:14 -04:00
|
|
|
|
(package->manifest-entry* package output))))
|
2019-09-18 08:55:44 -04:00
|
|
|
|
(('install . obj)
|
|
|
|
|
(leave (G_ "cannot install non-package object: ~s~%")
|
|
|
|
|
obj))
|
|
|
|
|
(_
|
|
|
|
|
#f))
|
2013-10-30 10:26:14 -04:00
|
|
|
|
opts))
|
|
|
|
|
|
2016-09-06 16:28:12 -04:00
|
|
|
|
(fold manifest-transaction-install-entry
|
|
|
|
|
upgraded
|
|
|
|
|
to-install))
|
|
|
|
|
|
|
|
|
|
(define (options->removable options manifest transaction)
|
|
|
|
|
"Given options, return a variant of TRANSACTION augmented with the list of
|
|
|
|
|
patterns of packages to remove."
|
|
|
|
|
(fold (lambda (opt transaction)
|
|
|
|
|
(match opt
|
|
|
|
|
(('remove . spec)
|
|
|
|
|
(call-with-values
|
|
|
|
|
(lambda ()
|
|
|
|
|
(package-specification->name+version+output spec))
|
|
|
|
|
(lambda (name version output)
|
|
|
|
|
(manifest-transaction-remove-pattern
|
|
|
|
|
(manifest-pattern
|
|
|
|
|
(name name)
|
|
|
|
|
(version version)
|
|
|
|
|
(output output))
|
|
|
|
|
transaction))))
|
|
|
|
|
(_ transaction)))
|
|
|
|
|
transaction
|
|
|
|
|
options))
|
2013-11-01 12:12:15 -04:00
|
|
|
|
|
2015-02-06 11:52:07 -05:00
|
|
|
|
(define (register-gc-root store profile)
|
|
|
|
|
"Register PROFILE, a profile generation symlink, as a GC root, unless it
|
|
|
|
|
doesn't need it."
|
|
|
|
|
(define absolute
|
|
|
|
|
;; We must pass the daemon an absolute file name for PROFILE. However, we
|
|
|
|
|
;; cannot use (canonicalize-path profile) because that would return us the
|
|
|
|
|
;; target of PROFILE in the store; using a store item as an indirect root
|
|
|
|
|
;; would mean that said store item will always remain live, which is not
|
|
|
|
|
;; what we want here.
|
|
|
|
|
(if (string-prefix? "/" profile)
|
|
|
|
|
profile
|
|
|
|
|
(string-append (getcwd) "/" profile)))
|
|
|
|
|
|
|
|
|
|
(add-indirect-root store absolute))
|
2014-04-02 09:44:42 -04:00
|
|
|
|
|
2015-11-30 07:46:31 -05:00
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Queries and actions.
|
|
|
|
|
;;;
|
|
|
|
|
|
2015-11-30 03:56:28 -05:00
|
|
|
|
(define (process-query opts)
|
|
|
|
|
"Process any query specified by OPTS. Return #t when a query was actually
|
|
|
|
|
processed, #f otherwise."
|
2020-05-21 17:43:06 -04:00
|
|
|
|
(let* ((profiles (delete-duplicates
|
|
|
|
|
(match (filter-map (match-lambda
|
|
|
|
|
(('profile . p) p)
|
|
|
|
|
(_ #f))
|
|
|
|
|
opts)
|
|
|
|
|
(() (list %current-profile))
|
|
|
|
|
(lst (reverse lst)))))
|
2015-11-30 03:56:28 -05:00
|
|
|
|
(profile (match profiles
|
|
|
|
|
((head tail ...) head))))
|
|
|
|
|
(match (assoc-ref opts 'query)
|
|
|
|
|
(('list-generations pattern)
|
2016-10-26 08:53:29 -04:00
|
|
|
|
(define (list-generation display-function number)
|
2015-11-30 03:56:28 -05:00
|
|
|
|
(unless (zero? number)
|
|
|
|
|
(display-generation profile number)
|
2016-10-26 08:53:29 -04:00
|
|
|
|
(display-function profile number)
|
2015-11-30 03:56:28 -05:00
|
|
|
|
(newline)))
|
2016-10-26 08:53:29 -04:00
|
|
|
|
(define (diff-profiles profile numbers)
|
|
|
|
|
(unless (null-list? (cdr numbers))
|
|
|
|
|
(display-profile-content-diff profile (car numbers) (cadr numbers))
|
|
|
|
|
(diff-profiles profile (cdr numbers))))
|
2017-05-23 16:45:03 -04:00
|
|
|
|
|
|
|
|
|
(leave-on-EPIPE
|
|
|
|
|
(cond ((not (file-exists? profile)) ; XXX: race condition
|
|
|
|
|
(raise (condition (&profile-not-found-error
|
|
|
|
|
(profile profile)))))
|
2019-07-10 13:58:30 -04:00
|
|
|
|
((not pattern)
|
2017-07-20 09:27:54 -04:00
|
|
|
|
(match (profile-generations profile)
|
|
|
|
|
(()
|
|
|
|
|
#t)
|
|
|
|
|
((first rest ...)
|
|
|
|
|
(list-generation display-profile-content first)
|
|
|
|
|
(diff-profiles profile (cons first rest)))))
|
2017-05-23 16:45:03 -04:00
|
|
|
|
((matching-generations pattern profile)
|
|
|
|
|
=>
|
|
|
|
|
(lambda (numbers)
|
|
|
|
|
(if (null-list? numbers)
|
|
|
|
|
(exit 1)
|
|
|
|
|
(begin
|
|
|
|
|
(list-generation display-profile-content (car numbers))
|
2019-07-10 13:58:30 -04:00
|
|
|
|
(diff-profiles profile numbers)))))))
|
2015-11-30 03:56:28 -05:00
|
|
|
|
#t)
|
|
|
|
|
|
|
|
|
|
(('list-installed regexp)
|
2019-03-16 02:01:26 -04:00
|
|
|
|
(let* ((regexp (and regexp (make-regexp* regexp regexp/icase)))
|
2020-05-21 17:43:06 -04:00
|
|
|
|
(manifest (concatenate-manifests
|
|
|
|
|
(map profile-manifest profiles)))
|
2015-11-30 03:56:28 -05:00
|
|
|
|
(installed (manifest-entries manifest)))
|
|
|
|
|
(leave-on-EPIPE
|
2018-01-09 17:10:04 -05:00
|
|
|
|
(let ((rows (filter-map
|
|
|
|
|
(match-lambda
|
|
|
|
|
(($ <manifest-entry> name version output path _)
|
|
|
|
|
(and (regexp-exec regexp name)
|
|
|
|
|
(list name (or version "?") output path))))
|
|
|
|
|
installed)))
|
|
|
|
|
;; Show most recently installed packages last.
|
|
|
|
|
(pretty-print-table (reverse rows)))))
|
2020-05-21 17:43:06 -04:00
|
|
|
|
#t)
|
2015-11-30 03:56:28 -05:00
|
|
|
|
|
|
|
|
|
(('list-available regexp)
|
2019-03-16 02:01:26 -04:00
|
|
|
|
(let* ((regexp (and regexp (make-regexp* regexp regexp/icase)))
|
2019-01-13 09:36:49 -05:00
|
|
|
|
(available (fold-available-packages
|
|
|
|
|
(lambda* (name version result
|
|
|
|
|
#:key outputs location
|
2019-02-01 06:43:42 -05:00
|
|
|
|
supported? deprecated?
|
2019-01-13 09:36:49 -05:00
|
|
|
|
#:allow-other-keys)
|
2019-02-01 06:43:42 -05:00
|
|
|
|
(if (and supported? (not deprecated?))
|
2019-01-13 09:36:49 -05:00
|
|
|
|
(if regexp
|
|
|
|
|
(if (regexp-exec regexp name)
|
|
|
|
|
(cons `(,name ,version
|
|
|
|
|
,outputs ,location)
|
|
|
|
|
result)
|
|
|
|
|
result)
|
|
|
|
|
(cons `(,name ,version
|
|
|
|
|
,outputs ,location)
|
|
|
|
|
result))
|
|
|
|
|
result))
|
2015-11-30 03:56:28 -05:00
|
|
|
|
'())))
|
|
|
|
|
(leave-on-EPIPE
|
2018-01-09 17:10:04 -05:00
|
|
|
|
(let ((rows (map (match-lambda
|
|
|
|
|
((name version outputs location)
|
|
|
|
|
(list name version (string-join outputs ",")
|
|
|
|
|
(location->string location))))
|
|
|
|
|
(sort available
|
|
|
|
|
(match-lambda*
|
|
|
|
|
(((name1 . _) (name2 . _))
|
|
|
|
|
(string<? name1 name2)))))))
|
|
|
|
|
(pretty-print-table rows)))
|
2015-11-30 03:56:28 -05:00
|
|
|
|
#t))
|
|
|
|
|
|
2019-09-24 11:50:48 -04:00
|
|
|
|
(('list-profiles _)
|
|
|
|
|
(let ((profiles (delete-duplicates
|
|
|
|
|
(filter-map (lambda (root)
|
|
|
|
|
(and (or (zero? (getuid))
|
|
|
|
|
(user-owned? root))
|
|
|
|
|
(generation-profile root)))
|
|
|
|
|
(gc-roots)))))
|
|
|
|
|
(leave-on-EPIPE
|
|
|
|
|
(for-each (lambda (profile)
|
|
|
|
|
(display (user-friendly-profile profile))
|
|
|
|
|
(newline))
|
|
|
|
|
(sort profiles string<?)))))
|
|
|
|
|
|
2016-01-04 16:27:38 -05:00
|
|
|
|
(('search _)
|
|
|
|
|
(let* ((patterns (filter-map (match-lambda
|
|
|
|
|
(('query 'search rx) rx)
|
|
|
|
|
(_ #f))
|
|
|
|
|
opts))
|
2019-06-25 17:37:32 -04:00
|
|
|
|
(regexps (map (cut make-regexp* <> regexp/icase) patterns))
|
|
|
|
|
(matches (find-packages-by-description regexps)))
|
2015-11-30 03:56:28 -05:00
|
|
|
|
(leave-on-EPIPE
|
2019-06-25 17:37:32 -04:00
|
|
|
|
(display-search-results matches (current-output-port)))
|
2015-11-30 03:56:28 -05:00
|
|
|
|
#t))
|
|
|
|
|
|
2020-05-10 19:40:44 -04:00
|
|
|
|
(('show _)
|
|
|
|
|
(let ((requested-names
|
|
|
|
|
(filter-map (match-lambda
|
|
|
|
|
(('query 'show requested-name) requested-name)
|
|
|
|
|
(_ #f))
|
|
|
|
|
opts)))
|
|
|
|
|
(for-each
|
|
|
|
|
(lambda (requested-name)
|
|
|
|
|
(let-values (((name version)
|
|
|
|
|
(package-name->name+version requested-name)))
|
|
|
|
|
(match (remove package-superseded
|
|
|
|
|
(find-packages-by-name name version))
|
|
|
|
|
(()
|
|
|
|
|
(leave (G_ "~a~@[@~a~]: package not found~%") name version))
|
|
|
|
|
(packages
|
|
|
|
|
(leave-on-EPIPE
|
|
|
|
|
(for-each (cute package->recutils <> (current-output-port))
|
|
|
|
|
packages))))))
|
|
|
|
|
requested-names))
|
|
|
|
|
#t)
|
2015-11-30 03:56:28 -05:00
|
|
|
|
|
|
|
|
|
(('search-paths kind)
|
|
|
|
|
(let* ((manifests (map profile-manifest profiles))
|
2017-06-21 04:57:10 -04:00
|
|
|
|
(entries (append-map manifest-transitive-entries
|
|
|
|
|
manifests))
|
2015-11-30 03:56:28 -05:00
|
|
|
|
(profiles (map user-friendly-profile profiles))
|
|
|
|
|
(settings (search-path-environment-variables entries profiles
|
|
|
|
|
(const #f)
|
|
|
|
|
#:kind kind)))
|
|
|
|
|
(format #t "~{~a~%~}" settings)
|
|
|
|
|
#t))
|
|
|
|
|
|
2021-01-10 09:50:30 -05:00
|
|
|
|
(('export-manifest)
|
|
|
|
|
(let* ((manifest (concatenate-manifests
|
|
|
|
|
(map profile-manifest profiles))))
|
|
|
|
|
(export-manifest manifest (current-output-port))
|
|
|
|
|
#t))
|
|
|
|
|
|
2021-01-10 16:13:04 -05:00
|
|
|
|
(('export-channels)
|
|
|
|
|
(let ((manifest (concatenate-manifests
|
|
|
|
|
(map profile-manifest profiles))))
|
|
|
|
|
(export-channels manifest (current-output-port))
|
|
|
|
|
#t))
|
|
|
|
|
|
2015-11-30 03:56:28 -05:00
|
|
|
|
(_ #f))))
|
|
|
|
|
|
2015-11-30 07:46:31 -05:00
|
|
|
|
|
|
|
|
|
(define* (roll-back-action store profile arg opts
|
|
|
|
|
#:key dry-run?)
|
|
|
|
|
"Roll back PROFILE to its previous generation."
|
|
|
|
|
(unless dry-run?
|
|
|
|
|
(roll-back* store profile)))
|
|
|
|
|
|
|
|
|
|
(define* (switch-generation-action store profile spec opts
|
|
|
|
|
#:key dry-run?)
|
|
|
|
|
"Switch PROFILE to the generation specified by SPEC."
|
|
|
|
|
(unless dry-run?
|
2016-11-02 01:48:11 -04:00
|
|
|
|
(let ((number (relative-generation-spec->number profile spec)))
|
2015-11-30 07:46:31 -05:00
|
|
|
|
(if number
|
|
|
|
|
(switch-to-generation* profile number)
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(leave (G_ "cannot switch to generation '~a'~%") spec)))))
|
2015-11-30 07:46:31 -05:00
|
|
|
|
|
|
|
|
|
(define* (delete-generations-action store profile pattern opts
|
|
|
|
|
#:key dry-run?)
|
|
|
|
|
"Delete PROFILE's generations that match PATTERN."
|
|
|
|
|
(unless dry-run?
|
|
|
|
|
(delete-matching-generations store profile pattern)))
|
|
|
|
|
|
2019-11-20 06:08:56 -05:00
|
|
|
|
(define (load-manifest file)
|
|
|
|
|
"Load the user-profile manifest (Scheme code) from FILE and return it."
|
|
|
|
|
(let ((user-module (make-user-module '((guix profiles) (gnu)))))
|
|
|
|
|
(load* file user-module)))
|
2015-11-30 07:46:31 -05:00
|
|
|
|
|
|
|
|
|
(define %actions
|
|
|
|
|
;; List of actions that may be processed. The car of each pair is the
|
|
|
|
|
;; action's symbol in the option list; the cdr is the action's procedure.
|
|
|
|
|
`((roll-back? . ,roll-back-action)
|
|
|
|
|
(switch-generation . ,switch-generation-action)
|
2019-11-20 06:08:56 -05:00
|
|
|
|
(delete-generations . ,delete-generations-action)))
|
2015-11-30 07:46:31 -05:00
|
|
|
|
|
2015-11-30 14:18:11 -05:00
|
|
|
|
(define (process-actions store opts)
|
|
|
|
|
"Process any install/remove/upgrade action from OPTS."
|
|
|
|
|
|
|
|
|
|
(define dry-run? (assoc-ref opts 'dry-run?))
|
|
|
|
|
(define bootstrap? (assoc-ref opts 'bootstrap?))
|
|
|
|
|
(define substitutes? (assoc-ref opts 'substitutes?))
|
2018-03-31 17:14:56 -04:00
|
|
|
|
(define allow-collisions? (assoc-ref opts 'allow-collisions?))
|
2015-11-30 14:18:11 -05:00
|
|
|
|
(define profile (or (assoc-ref opts 'profile) %current-profile))
|
2016-01-31 15:33:08 -05:00
|
|
|
|
(define transform (options->transformation opts))
|
|
|
|
|
|
|
|
|
|
(define (transform-entry entry)
|
guix build: 'options->transformation' no longer takes a 'store' parameter.
* guix/scripts/build.scm (transform-package-source)
(transform-package-inputs, transform-package-inputs/graft)
(transform-package-source-branch, transform-package-source-commit)
(transform-package-source-git-url, transform-package-toolchain)
(transform-package-with-debug-info, transform-package-tests): Remove
'store' parameter.
(options->transformation, options->derivations): Adjust accordingly.
* guix/scripts/environment.scm (options/resolve-packages): Likewise.
* guix/scripts/graph.scm (guix-graph): Likewise.
* guix/scripts/pack.scm (guix-pack): Likewise.
* guix/scripts/package.scm (transaction-upgrade-entry): Likewise.
(process-actions): Likewise.
* tests/scripts-build.scm ("options->transformation, no transformations")
("options->transformation, with-source, replacement"):
Adjust tests.
("options->transformation, with-source")
("options->transformation, with-source, with version")
("options->transformation, with-source, PKG=URI"): Use 'lower-object' to
compute the store file name of the source.
("options->transformation, with-source, no matches"): Remove
'with-store' and adjust accordingly.
("options->transformation, with-input"): Likewise.
("options->transformation, with-graft"): Likewise.
("options->transformation, with-branch"): Likewise.
("options->transformation, with-commit"): Likewise.
("options->transformation, with-git-url"): Likewise.
("options->transformation, with-git-url + with-branch"): Likewise.
("options->transformation, with-c-toolchain"): Likewise.
("options->transformation, with-c-toolchain twice"): Likewise.
("options->transformation, with-c-toolchain, no effect"): Likewise.
("options->transformation, with-debug-info"): Likewise.
("options->transformation, without-tests"): Likewise.
2020-10-28 18:35:49 -04:00
|
|
|
|
(let ((item (transform (manifest-entry-item entry))))
|
2020-09-24 16:13:06 -04:00
|
|
|
|
(manifest-entry-with-transformations
|
|
|
|
|
(manifest-entry
|
|
|
|
|
(inherit entry)
|
|
|
|
|
(item item)
|
|
|
|
|
(version (if (package? item)
|
|
|
|
|
(package-version item)
|
|
|
|
|
(manifest-entry-version entry)))))))
|
2015-11-30 14:18:11 -05:00
|
|
|
|
|
2020-01-19 16:52:31 -05:00
|
|
|
|
(when (equal? profile %current-profile)
|
|
|
|
|
;; Normally the daemon created %CURRENT-PROFILE when we connected, unless
|
|
|
|
|
;; it's a version that lacks the fix for <https://bugs.gnu.org/37744>
|
|
|
|
|
;; (aka. CVE-2019-18192). Ensure %CURRENT-PROFILE exists so that
|
|
|
|
|
;; 'with-profile-lock' can create its lock file below.
|
|
|
|
|
(ensure-default-profile))
|
2019-10-25 15:39:21 -04:00
|
|
|
|
|
|
|
|
|
;; First, acquire a lock on the profile, to ensure only one guix process
|
|
|
|
|
;; is modifying it at a time.
|
2019-11-29 08:53:22 -05:00
|
|
|
|
(with-profile-lock profile
|
2019-10-25 15:39:21 -04:00
|
|
|
|
;; Then, process roll-backs, generation removals, etc.
|
|
|
|
|
(for-each (match-lambda
|
|
|
|
|
((key . arg)
|
|
|
|
|
(and=> (assoc-ref %actions key)
|
|
|
|
|
(lambda (proc)
|
|
|
|
|
(proc store profile arg opts
|
|
|
|
|
#:dry-run? dry-run?)))))
|
|
|
|
|
opts)
|
|
|
|
|
|
|
|
|
|
;; Then, process normal package removal/installation/upgrade.
|
2019-11-20 06:08:56 -05:00
|
|
|
|
(let* ((files (filter-map (match-lambda
|
|
|
|
|
(('manifest . file) file)
|
|
|
|
|
(_ #f))
|
|
|
|
|
opts))
|
|
|
|
|
(manifest (match files
|
|
|
|
|
(() (profile-manifest profile))
|
2019-12-29 10:22:35 -05:00
|
|
|
|
(_ (map-manifest-entries
|
|
|
|
|
manifest-entry-with-provenance
|
|
|
|
|
(concatenate-manifests
|
|
|
|
|
(map load-manifest files))))))
|
2019-10-25 15:39:21 -04:00
|
|
|
|
(step1 (options->removable opts manifest
|
|
|
|
|
(manifest-transaction)))
|
|
|
|
|
(step2 (options->installable opts manifest step1))
|
|
|
|
|
(step3 (manifest-transaction
|
|
|
|
|
(inherit step2)
|
|
|
|
|
(install (map transform-entry
|
|
|
|
|
(manifest-transaction-install step2)))))
|
2019-11-20 06:08:56 -05:00
|
|
|
|
(new (manifest-perform-transaction manifest step3))
|
|
|
|
|
(trans (if (null? files)
|
|
|
|
|
step3
|
|
|
|
|
(fold manifest-transaction-install-entry
|
|
|
|
|
step3
|
|
|
|
|
(manifest-entries manifest)))))
|
2019-10-25 15:39:21 -04:00
|
|
|
|
|
|
|
|
|
(warn-about-old-distro)
|
|
|
|
|
|
2021-06-13 17:46:17 -04:00
|
|
|
|
(when (and (null? files) (manifest-transaction-null? trans)
|
|
|
|
|
(not (any (match-lambda
|
|
|
|
|
((key . _) (assoc-ref %actions key)))
|
|
|
|
|
opts)))
|
2021-05-28 09:41:32 -04:00
|
|
|
|
;; We can reach this point because the user did not specify any action
|
|
|
|
|
;; (as in "guix package"), did not specify any package (as in "guix
|
|
|
|
|
;; install"), or because there's nothing to upgrade (as when running
|
|
|
|
|
;; "guix upgrade" on an up-to-date profile). We cannot distinguish
|
|
|
|
|
;; among these here; all we can say is that there's nothing to do.
|
|
|
|
|
(warning (G_ "nothing to do~%")))
|
2021-05-28 04:53:49 -04:00
|
|
|
|
|
2019-11-20 06:08:56 -05:00
|
|
|
|
(unless (manifest-transaction-null? trans)
|
|
|
|
|
;; When '--manifest' is used, display information about TRANS as if we
|
|
|
|
|
;; were starting from an empty profile.
|
|
|
|
|
(show-manifest-transaction store
|
|
|
|
|
(if (null? files)
|
|
|
|
|
manifest
|
|
|
|
|
(make-manifest '()))
|
|
|
|
|
trans
|
2019-10-25 15:39:21 -04:00
|
|
|
|
#:dry-run? dry-run?)
|
|
|
|
|
(build-and-use-profile store profile new
|
|
|
|
|
#:allow-collisions? allow-collisions?
|
2020-03-19 05:42:28 -04:00
|
|
|
|
#:bootstrap? bootstrap?)))))
|
2015-11-30 14:18:11 -05:00
|
|
|
|
|
2012-10-31 20:46:15 -04:00
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Entry point.
|
|
|
|
|
;;;
|
|
|
|
|
|
2020-09-01 16:13:11 -04:00
|
|
|
|
(define-command (guix-package . args)
|
|
|
|
|
(synopsis "manage packages and profiles")
|
|
|
|
|
|
2015-02-25 17:31:51 -05:00
|
|
|
|
(define (handle-argument arg result arg-handler)
|
|
|
|
|
;; Process non-option argument ARG by calling back ARG-HANDLER.
|
|
|
|
|
(if arg-handler
|
|
|
|
|
(arg-handler arg result)
|
ui: Rename '_' to 'G_'.
This avoids collisions with '_' when the latter is used as a 'match'
pattern for instance. See
<https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>.
* guix/ui.scm: Rename '_' to 'G_'.
* po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly.
* build-aux/compile-all.scm (warnings): Remove 'format'.
* gnu/packages.scm,
gnu/services.scm,
gnu/services/shepherd.scm,
gnu/system.scm,
gnu/system/shadow.scm,
guix/gnupg.scm,
guix/http-client.scm,
guix/import/cpan.scm,
guix/import/elpa.scm,
guix/import/pypi.scm,
guix/nar.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/authenticate.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/container.scm,
guix/scripts/container/exec.scm,
guix/scripts/copy.scm,
guix/scripts/download.scm,
guix/scripts/edit.scm,
guix/scripts/environment.scm,
guix/scripts/gc.scm,
guix/scripts/graph.scm,
guix/scripts/hash.scm,
guix/scripts/import.scm,
guix/scripts/import/cpan.scm,
guix/scripts/import/cran.scm,
guix/scripts/import/crate.scm,
guix/scripts/import/elpa.scm,
guix/scripts/import/gem.scm,
guix/scripts/import/gnu.scm,
guix/scripts/import/hackage.scm,
guix/scripts/import/nix.scm,
guix/scripts/import/pypi.scm,
guix/scripts/import/stackage.scm,
guix/scripts/lint.scm,
guix/scripts/offload.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/perform-download.scm,
guix/scripts/publish.scm,
guix/scripts/pull.scm,
guix/scripts/refresh.scm,
guix/scripts/size.scm,
guix/scripts/substitute.scm,
guix/scripts/system.scm,
guix/ssh.scm,
guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was
obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-03 09:57:02 -04:00
|
|
|
|
(leave (G_ "~A: extraneous argument~%") arg)))
|
2012-10-31 20:46:15 -04:00
|
|
|
|
|
2018-09-04 11:32:27 -04:00
|
|
|
|
(define opts
|
|
|
|
|
(parse-command-line args %options (list %default-options #f)
|
|
|
|
|
#:argument-handler handle-argument))
|
|
|
|
|
|
guix package: Add 'install', 'remove', and 'upgrade' aliases.
* guix/scripts/install.scm, guix/scripts/remove.scm,
guix/scripts/upgrade.scm, tests/guix-package-aliases.sh: New files.
* Makefile.am (MODULES, SH_TESTS): Add them.
* po/guix/POTFILES.in: Add them.
* guix/scripts/package.scm (guix-package): Split with...
(guix-package*): ... this. New procedure.
* doc/guix.texi (Invoking guix package): Document them.
(Binary Installation, Application Setup, Package Management)
(Packages with Multiple Outputs, Package Modules)
(X.509 Certificates, Installing Debugging Files): Use 'guix install' in
simple examples.
* etc/completion/bash/guix (_guix_complete): Handle "install", "remove",
and "upgrade".
2019-04-27 12:04:00 -04:00
|
|
|
|
(guix-package* opts))
|
|
|
|
|
|
|
|
|
|
(define (guix-package* opts)
|
|
|
|
|
"Run the 'guix package' command on OPTS, an alist resulting for command-line
|
|
|
|
|
option processing with 'parse-command-line'."
|
2018-09-04 11:32:27 -04:00
|
|
|
|
(with-error-handling
|
|
|
|
|
(or (process-query opts)
|
|
|
|
|
(parameterize ((%store (open-connection))
|
|
|
|
|
(%graft? (assoc-ref opts 'graft?)))
|
guix build: Re-purpose '--verbosity' and add '--debug'.
The previous '--verbosity' option was misleading and rarely what users
were looking for. The new option provides a consistent way to choose
whether or not to display the build log.
* guix/scripts/build.scm (show-build-options-help): Remove "--verbosity"
and add "--debug".
(set-build-options-from-command-line): Use the 'debug key of OPTS for
#:verbosity.
(%standard-build-options): Change "verbosity" to "debug". Use
'string->number*' instead of 'string->number'.
(%default-options): Change 'verbosity to 'debug and add a 'verbosity
key.
(show-help): Add '--verbosity'.
(%options): Likewise, and change '--quiet' to set the 'verbosity key of
RESULT.
(guix-build): Use 'with-status-verbosity' instead of parameterizing
CURRENT-BUILD-OUTPUT-PORT, honor the 'verbosity key of OPTS, and remove
'quiet?'.
* guix/scripts/environment.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug'.
(guix-environment): Honor the 'verbosity key of OPTS.
* guix/scripts/pack.scm (%default-options): Add 'debug.
(%options, show-help): Add '--verbosity'.
(guix-pack): Honor the 'verbosity key of OPTS.
* guix/scripts/package.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'. Mark '--verbose' as
deprecated and change it to set 'verbosity.
(guix-package): Honor the 'verbosity key of OPTS and remove 'verbose?'.
* guix/scripts/pull.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'.
(guix-pull): Honor the 'verbosity key of OPTS.
* guix/scripts/system.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug.
(guix-system): Honor the 'verbosity key of OPTS.
* guix/scripts/archive.scm (%default-options): Add 'debug,
'print-build-trace?, 'print-extended-build-trace?, and
'multiplexed-build-output?.
(show-help, %options): Add '--verbosity'.
(export-from-store): Remove call to 'set-build-options-from-command-line'.
(guix-archive): Wrap body in 'with-status-verbosity'. Add call to
'set-build-options-from-command-line.
* doc/guix.texi (Common Build Options): Document '--verbosity' and
'--debug'.
(Additional Build Options): Adjust description of '--quiet'.
2019-01-09 08:17:19 -05:00
|
|
|
|
(with-status-verbosity (assoc-ref opts 'verbosity)
|
2017-01-18 17:21:29 -05:00
|
|
|
|
(set-build-options-from-command-line (%store) opts)
|
2020-03-19 05:42:28 -04:00
|
|
|
|
(with-build-handler (build-notifier #:use-substitutes?
|
|
|
|
|
(assoc-ref opts 'substitutes?)
|
2020-07-22 17:22:13 -04:00
|
|
|
|
#:verbosity
|
|
|
|
|
(assoc-ref opts 'verbosity)
|
2020-03-19 05:42:28 -04:00
|
|
|
|
#:dry-run?
|
|
|
|
|
(assoc-ref opts 'dry-run?))
|
|
|
|
|
(parameterize ((%guile-for-build
|
|
|
|
|
(package-derivation
|
|
|
|
|
(%store)
|
|
|
|
|
(if (assoc-ref opts 'bootstrap?)
|
|
|
|
|
%bootstrap-guile
|
2020-03-26 19:12:15 -04:00
|
|
|
|
(default-guile)))))
|
2020-03-19 05:42:28 -04:00
|
|
|
|
(process-actions (%store) opts))))))))
|