2013-01-06 00:47:50 +01:00
|
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2018-02-27 15:46:56 +01:00
|
|
|
|
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
2013-01-17 22:20:42 +01:00
|
|
|
|
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
|
2015-03-26 22:25:09 +01:00
|
|
|
|
;;; Copyright © 2013, 2015 Mark H Weaver <mhw@netris.org>
|
2016-02-23 09:38:00 +01:00
|
|
|
|
;;; Copyright © 2014, 2016 Alex Kost <alezost@gmail.com>
|
2016-10-26 14:53:29 +02:00
|
|
|
|
;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
|
|
|
|
|
;;; Copyright © 2016 Benz Schenk <benz.schenk@uzh.ch>
|
2016-11-02 06:48:11 +01:00
|
|
|
|
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
|
2012-11-01 01:46:15 +01:00
|
|
|
|
;;;
|
2013-01-06 00:47:50 +01:00
|
|
|
|
;;; This file is part of GNU Guix.
|
2012-11-01 01:46:15 +01:00
|
|
|
|
;;;
|
2013-01-06 00:47:50 +01:00
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
2012-11-01 01:46:15 +01: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-06 00:47:50 +01:00
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
2012-11-01 01:46:15 +01: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-06 00:47:50 +01:00
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
2012-11-01 01:46:15 +01: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 10:15:25 +01:00
|
|
|
|
(define-module (guix scripts package)
|
2012-11-03 21:19:43 +01:00
|
|
|
|
#:use-module (guix ui)
|
2012-11-01 01:46:15 +01:00
|
|
|
|
#:use-module (guix store)
|
2016-03-02 13:43:13 +01:00
|
|
|
|
#:use-module (guix grafts)
|
2012-11-01 01:46:15 +01: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 16:31:45 +01: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 22:11:37 +02:00
|
|
|
|
#:use-module (guix search-paths)
|
2014-07-26 22:08:10 +02:00
|
|
|
|
#:use-module (guix monads)
|
2012-11-01 01:46:15 +01:00
|
|
|
|
#:use-module (guix utils)
|
2012-12-13 22:53:05 +01:00
|
|
|
|
#:use-module (guix config)
|
2015-09-10 11:37:36 +02:00
|
|
|
|
#:use-module (guix scripts)
|
2014-03-01 18:29:29 +01:00
|
|
|
|
#:use-module (guix scripts build)
|
2014-12-27 23:46:10 +01:00
|
|
|
|
#:use-module ((guix build utils)
|
2015-11-24 18:12:03 +01:00
|
|
|
|
#:select (directory-exists? mkdir-p))
|
2012-11-01 01:46:15 +01:00
|
|
|
|
#:use-module (ice-9 format)
|
|
|
|
|
#:use-module (ice-9 match)
|
2017-06-13 23:04:05 +02: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 07:24:21 +01:00
|
|
|
|
#:use-module (ice-9 vlist)
|
2012-11-01 01:46:15 +01:00
|
|
|
|
#:use-module (srfi srfi-1)
|
|
|
|
|
#:use-module (srfi srfi-11)
|
|
|
|
|
#:use-module (srfi srfi-26)
|
2014-10-08 15:29:01 +02:00
|
|
|
|
#:use-module (srfi srfi-34)
|
|
|
|
|
#:use-module (srfi srfi-35)
|
2012-11-01 01:46:15 +01:00
|
|
|
|
#:use-module (srfi srfi-37)
|
2013-01-18 01:06:47 +01:00
|
|
|
|
#:use-module (gnu packages)
|
2015-11-24 18:12:03 +01:00
|
|
|
|
#:autoload (gnu packages base) (canonical-package)
|
2017-12-03 22:13:33 +01:00
|
|
|
|
#:autoload (gnu packages guile) (guile-2.2)
|
2015-11-24 18:12:03 +01:00
|
|
|
|
#:autoload (gnu packages bootstrap) (%bootstrap-guile)
|
2016-03-25 09:27:18 +01:00
|
|
|
|
#:export (build-and-use-profile
|
|
|
|
|
delete-generations
|
2015-05-27 20:08:31 +02:00
|
|
|
|
display-search-paths
|
2013-12-22 01:08:21 +01:00
|
|
|
|
guix-package))
|
2012-11-01 01:46:15 +01:00
|
|
|
|
|
|
|
|
|
(define %store
|
2013-01-15 22:39:03 +01:00
|
|
|
|
(make-parameter #f))
|
2012-11-01 01:46:15 +01: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 16:31:45 +01:00
|
|
|
|
;;; Profiles.
|
2012-11-01 01:46:15 +01:00
|
|
|
|
;;;
|
|
|
|
|
|
2013-10-30 17:31:05 +01:00
|
|
|
|
(define %user-profile-directory
|
2012-11-01 01:46:15 +01:00
|
|
|
|
(and=> (getenv "HOME")
|
|
|
|
|
(cut string-append <> "/.guix-profile")))
|
|
|
|
|
|
|
|
|
|
(define %profile-directory
|
2014-01-08 21:12:55 +01:00
|
|
|
|
(string-append %state-directory "/profiles/"
|
2014-07-05 14:36:44 +02:00
|
|
|
|
(or (and=> (or (getenv "USER")
|
|
|
|
|
(getenv "LOGNAME"))
|
2012-11-01 01:46:15 +01:00
|
|
|
|
(cut string-append "per-user/" <>))
|
|
|
|
|
"default")))
|
|
|
|
|
|
|
|
|
|
(define %current-profile
|
2012-12-13 23:02:22 +01:00
|
|
|
|
;; Call it `guix-profile', not `profile', to allow Guix profiles to
|
|
|
|
|
;; coexist with Nix profiles.
|
|
|
|
|
(string-append %profile-directory "/guix-profile"))
|
2012-11-01 01:46:15 +01:00
|
|
|
|
|
2014-07-05 14:56:08 +02:00
|
|
|
|
(define (canonicalize-profile profile)
|
|
|
|
|
"If PROFILE is %USER-PROFILE-DIRECTORY, return %CURRENT-PROFILE. Otherwise
|
|
|
|
|
return PROFILE unchanged. The goal is to treat '-p ~/.guix-profile' as if
|
|
|
|
|
'-p' was omitted." ; see <http://bugs.gnu.org/17939>
|
2017-07-20 15:23:13 +02:00
|
|
|
|
|
|
|
|
|
;; Trim trailing slashes so that the basename comparison below works as
|
|
|
|
|
;; intended.
|
|
|
|
|
(let ((profile (string-trim-right profile #\/)))
|
|
|
|
|
(if (and %user-profile-directory
|
|
|
|
|
(string=? (canonicalize-path (dirname profile))
|
|
|
|
|
(dirname %user-profile-directory))
|
|
|
|
|
(string=? (basename profile) (basename %user-profile-directory)))
|
|
|
|
|
%current-profile
|
|
|
|
|
profile)))
|
2014-07-05 14:56:08 +02:00
|
|
|
|
|
2015-05-03 22:33:27 +02:00
|
|
|
|
(define (user-friendly-profile profile)
|
|
|
|
|
"Return either ~/.guix-profile if that's what PROFILE refers to, directly or
|
|
|
|
|
indirectly, or PROFILE."
|
|
|
|
|
(if (and %user-profile-directory
|
|
|
|
|
(false-if-exception
|
|
|
|
|
(string=? (readlink %user-profile-directory) profile)))
|
|
|
|
|
%user-profile-directory
|
|
|
|
|
profile))
|
|
|
|
|
|
2015-11-30 09:56:28 +01:00
|
|
|
|
(define (ensure-default-profile)
|
|
|
|
|
"Ensure the default profile symlink and directory exist and are writable."
|
|
|
|
|
|
|
|
|
|
(define (rtfm)
|
|
|
|
|
(format (current-error-port)
|
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 15:57:02 +02:00
|
|
|
|
(G_ "Try \"info '(guix) Invoking guix package'\" for \
|
2015-11-30 09:56:28 +01:00
|
|
|
|
more information.~%"))
|
|
|
|
|
(exit 1))
|
|
|
|
|
|
|
|
|
|
;; Create ~/.guix-profile if it doesn't exist yet.
|
|
|
|
|
(when (and %user-profile-directory
|
|
|
|
|
%current-profile
|
|
|
|
|
(not (false-if-exception
|
|
|
|
|
(lstat %user-profile-directory))))
|
|
|
|
|
(symlink %current-profile %user-profile-directory))
|
|
|
|
|
|
|
|
|
|
(let ((s (stat %profile-directory #f)))
|
|
|
|
|
;; Attempt to create /…/profiles/per-user/$USER if needed.
|
|
|
|
|
(unless (and s (eq? 'directory (stat:type s)))
|
|
|
|
|
(catch 'system-error
|
|
|
|
|
(lambda ()
|
|
|
|
|
(mkdir-p %profile-directory))
|
|
|
|
|
(lambda args
|
|
|
|
|
;; Often, we cannot create %PROFILE-DIRECTORY because its
|
|
|
|
|
;; parent directory is root-owned and we're running
|
|
|
|
|
;; unprivileged.
|
|
|
|
|
(format (current-error-port)
|
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 15:57:02 +02:00
|
|
|
|
(G_ "error: while creating directory `~a': ~a~%")
|
2015-11-30 09:56:28 +01:00
|
|
|
|
%profile-directory
|
|
|
|
|
(strerror (system-error-errno args)))
|
|
|
|
|
(format (current-error-port)
|
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 15:57:02 +02:00
|
|
|
|
(G_ "Please create the `~a' directory, with you as the owner.~%")
|
2015-11-30 09:56:28 +01:00
|
|
|
|
%profile-directory)
|
|
|
|
|
(rtfm))))
|
|
|
|
|
|
|
|
|
|
;; Bail out if it's not owned by the user.
|
|
|
|
|
(unless (or (not s) (= (stat:uid s) (getuid)))
|
|
|
|
|
(format (current-error-port)
|
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 15:57:02 +02:00
|
|
|
|
(G_ "error: directory `~a' is not owned by you~%")
|
2015-11-30 09:56:28 +01:00
|
|
|
|
%profile-directory)
|
|
|
|
|
(format (current-error-port)
|
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 15:57:02 +02:00
|
|
|
|
(G_ "Please change the owner of `~a' to user ~s.~%")
|
2015-11-30 09:56:28 +01:00
|
|
|
|
%profile-directory (or (getenv "USER")
|
|
|
|
|
(getenv "LOGNAME")
|
|
|
|
|
(getuid)))
|
|
|
|
|
(rtfm))))
|
|
|
|
|
|
2014-10-04 18:45:35 +02:00
|
|
|
|
(define (delete-generations store profile generations)
|
|
|
|
|
"Delete GENERATIONS from PROFILE.
|
|
|
|
|
GENERATIONS is a list of generation numbers."
|
2015-10-26 23:01:06 +01:00
|
|
|
|
(for-each (cut delete-generation* store profile <>)
|
2014-10-04 18:45:35 +02:00
|
|
|
|
generations))
|
|
|
|
|
|
2015-04-06 20:02:22 +02: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-24 05:37:05 +01:00
|
|
|
|
denote ranges as interpreted by 'matching-generations'."
|
2015-04-06 20:02:22 +02:00
|
|
|
|
(let ((current (generation-number profile)))
|
|
|
|
|
(cond ((not (file-exists? profile)) ; XXX: race condition
|
|
|
|
|
(raise (condition (&profile-not-found-error
|
|
|
|
|
(profile profile)))))
|
|
|
|
|
((string-null? pattern)
|
2015-11-30 09:54:07 +01:00
|
|
|
|
(delete-generations store profile
|
2015-04-06 20:02:22 +02:00
|
|
|
|
(delv current (profile-generations profile))))
|
|
|
|
|
;; Do not delete the zeroth generation.
|
|
|
|
|
((equal? 0 (string->number pattern))
|
2015-04-06 21:27:03 +02:00
|
|
|
|
#t)
|
2015-04-06 20:02:22 +02: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 21:26:12 +02: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 15:57:02 +02:00
|
|
|
|
(warning (G_ "not removing generation ~a, which is current~%")
|
2015-04-06 21:26:12 +02:00
|
|
|
|
current))
|
|
|
|
|
|
|
|
|
|
;; Make sure we don't inadvertently remove the current
|
|
|
|
|
;; generation.
|
|
|
|
|
(let ((numbers (delv current numbers)))
|
2015-04-06 21:27:03 +02: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 15:57:02 +02:00
|
|
|
|
(leave (G_ "no matching generation~%")))
|
2015-11-30 09:54:07 +01:00
|
|
|
|
(delete-generations store profile numbers))))
|
2015-04-06 20:02:22 +02:00
|
|
|
|
(else
|
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 15:57:02 +02:00
|
|
|
|
(leave (G_ "invalid syntax: ~a~%") pattern)))))
|
2015-04-06 20:02:22 +02:00
|
|
|
|
|
2015-11-30 10:09:33 +01:00
|
|
|
|
(define* (build-and-use-profile store profile manifest
|
|
|
|
|
#:key
|
|
|
|
|
bootstrap? use-substitutes?
|
|
|
|
|
dry-run?)
|
|
|
|
|
"Build a new generation of PROFILE, a file name, using the packages
|
|
|
|
|
specified in MANIFEST, a manifest object."
|
|
|
|
|
(when (equal? profile %current-profile)
|
|
|
|
|
(ensure-default-profile))
|
|
|
|
|
|
|
|
|
|
(let* ((prof-drv (run-with-store store
|
|
|
|
|
(profile-derivation manifest
|
|
|
|
|
#:hooks (if bootstrap?
|
|
|
|
|
'()
|
2016-12-17 12:43:10 +01:00
|
|
|
|
%default-profile-hooks)
|
|
|
|
|
#:locales? (not bootstrap?))))
|
2015-11-30 10:09:33 +01:00
|
|
|
|
(prof (derivation->output-path prof-drv)))
|
|
|
|
|
(show-what-to-build store (list prof-drv)
|
|
|
|
|
#:use-substitutes? use-substitutes?
|
|
|
|
|
#:dry-run? dry-run?)
|
|
|
|
|
|
|
|
|
|
(cond
|
|
|
|
|
(dry-run? #t)
|
|
|
|
|
((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 15:57:02 +02:00
|
|
|
|
(format (current-error-port) (G_ "nothing to be done~%")))
|
2015-11-30 10:09:33 +01: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)
|
|
|
|
|
(switch-symlinks profile name)
|
|
|
|
|
(unless (string=? profile %current-profile)
|
|
|
|
|
(register-gc-root store name))
|
|
|
|
|
(format #t (N_ "~a package in profile~%"
|
|
|
|
|
"~a packages in profile~%"
|
|
|
|
|
count)
|
|
|
|
|
count)
|
2016-07-28 20:04:10 +02:00
|
|
|
|
(display-search-paths entries (list profile)
|
|
|
|
|
#:kind 'prefix))))))))
|
2015-11-30 10:09:33 +01: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 16:31:45 +01:00
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Package specifications.
|
|
|
|
|
;;;
|
|
|
|
|
|
2016-01-04 22:27:38 +01:00
|
|
|
|
(define (find-packages-by-description regexps)
|
2017-06-13 23:04:05 +02:00
|
|
|
|
"Return two values: the list of packages whose name, synopsis, or
|
|
|
|
|
description matches at least one of REGEXPS sorted by relevance, and the list
|
|
|
|
|
of relevance scores."
|
|
|
|
|
(let ((matches (fold-packages (lambda (package result)
|
2018-02-27 15:46:56 +01:00
|
|
|
|
(if (package-superseded package)
|
|
|
|
|
result
|
|
|
|
|
(match (package-relevance package
|
|
|
|
|
regexps)
|
|
|
|
|
((? zero?)
|
|
|
|
|
result)
|
|
|
|
|
(score
|
|
|
|
|
(cons (list package score)
|
|
|
|
|
result)))))
|
2017-06-13 23:04:05 +02:00
|
|
|
|
'())))
|
|
|
|
|
(unzip2 (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 07:29:10 +01:00
|
|
|
|
|
2016-09-06 22:28:12 +02:00
|
|
|
|
(define (transaction-upgrade-entry entry transaction)
|
|
|
|
|
"Return a variant of TRANSACTION that accounts for the upgrade of ENTRY, a
|
|
|
|
|
<manifest-entry>."
|
2016-09-06 23:14:07 +02: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 15:57:02 +02:00
|
|
|
|
(info (G_ "package '~a' has been superseded by '~a'~%")
|
2016-09-06 23:14:07 +02:00
|
|
|
|
(manifest-entry-name old) (package-name new))
|
|
|
|
|
(manifest-transaction-install-entry
|
|
|
|
|
(package->manifest-entry new (manifest-entry-output old))
|
|
|
|
|
(manifest-transaction-remove-pattern
|
|
|
|
|
(manifest-pattern
|
|
|
|
|
(name (manifest-entry-name old))
|
|
|
|
|
(version (manifest-entry-version old))
|
|
|
|
|
(output (manifest-entry-output old)))
|
|
|
|
|
transaction)))
|
|
|
|
|
|
2017-06-26 22:48:57 +02:00
|
|
|
|
(match (if (manifest-transaction-removal-candidate? entry transaction)
|
|
|
|
|
'dismiss
|
|
|
|
|
entry)
|
|
|
|
|
('dismiss
|
|
|
|
|
transaction)
|
2016-09-06 19:27:27 +02:00
|
|
|
|
(($ <manifest-entry> name version output (? string? path))
|
|
|
|
|
(match (vhash-assoc name (find-newest-available-packages))
|
|
|
|
|
((_ candidate-version pkg . rest)
|
2016-09-06 23:14:07 +02:00
|
|
|
|
(match (package-superseded pkg)
|
|
|
|
|
((? package? new)
|
|
|
|
|
(supersede entry new))
|
|
|
|
|
(#f
|
|
|
|
|
(case (version-compare candidate-version version)
|
|
|
|
|
((>)
|
|
|
|
|
(manifest-transaction-install-entry
|
|
|
|
|
(package->manifest-entry pkg output)
|
|
|
|
|
transaction))
|
|
|
|
|
((<)
|
|
|
|
|
transaction)
|
|
|
|
|
((=)
|
|
|
|
|
(let ((candidate-path (derivation->output-path
|
|
|
|
|
(package-derivation (%store) pkg))))
|
2017-06-07 11:15:29 +02:00
|
|
|
|
;; XXX: When there are propagated inputs, assume we need to
|
|
|
|
|
;; upgrade the whole entry.
|
|
|
|
|
(if (and (string=? path candidate-path)
|
|
|
|
|
(null? (package-propagated-inputs pkg)))
|
2016-09-06 23:14:07 +02:00
|
|
|
|
transaction
|
|
|
|
|
(manifest-transaction-install-entry
|
|
|
|
|
(package->manifest-entry pkg output)
|
|
|
|
|
transaction))))))))
|
2016-09-06 19:27:27 +02:00
|
|
|
|
(#f
|
2017-06-25 22:16:58 +02:00
|
|
|
|
(warning (G_ "package '~a' no longer exists~%") name)
|
2016-09-06 22:28:12 +02:00
|
|
|
|
transaction)))))
|
2013-10-29 22:03:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Search paths.
|
|
|
|
|
;;;
|
|
|
|
|
|
2015-11-10 22:00:53 +01:00
|
|
|
|
(define* (search-path-environment-variables entries profiles
|
2015-05-20 11:52:45 +02:00
|
|
|
|
#:optional (getenv getenv)
|
|
|
|
|
#:key (kind 'exact))
|
2015-05-03 23:01:35 +02:00
|
|
|
|
"Return environment variable definitions that may be needed for the use of
|
2015-11-10 22:00:53 +01:00
|
|
|
|
ENTRIES, a list of manifest entries, in PROFILES. Use GETENV to determine the
|
2015-05-20 11:52:45 +02: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 22:33:27 +02:00
|
|
|
|
(let ((search-paths (delete-duplicates
|
2015-05-20 11:12:34 +02:00
|
|
|
|
(cons $PATH
|
|
|
|
|
(append-map manifest-entry-search-paths
|
|
|
|
|
entries)))))
|
2015-05-03 23:01:35 +02:00
|
|
|
|
(filter-map (match-lambda
|
2015-05-04 22:27:11 +02:00
|
|
|
|
((spec . value)
|
|
|
|
|
(let ((variable (search-path-specification-variable spec))
|
|
|
|
|
(sep (search-path-specification-separator spec)))
|
|
|
|
|
(environment-variable-definition variable value
|
2015-05-20 11:52:45 +02:00
|
|
|
|
#:separator sep
|
|
|
|
|
#:kind kind))))
|
2015-11-10 22:00:53 +01:00
|
|
|
|
(evaluate-search-paths search-paths profiles
|
2015-05-05 13:55:03 +02:00
|
|
|
|
getenv))))
|
2013-04-28 23:05:57 +02:00
|
|
|
|
|
2015-11-10 22:00:53 +01:00
|
|
|
|
(define* (display-search-paths entries profiles
|
2015-05-20 11:52:45 +02:00
|
|
|
|
#:key (kind 'exact))
|
2013-04-28 23:05:57 +02:00
|
|
|
|
"Display the search path environment variables that may need to be set for
|
2013-10-30 17:13:27 +01:00
|
|
|
|
ENTRIES, a list of manifest entries, in the context of PROFILE."
|
2015-11-10 22:00:53 +01:00
|
|
|
|
(let* ((profiles (map user-friendly-profile profiles))
|
|
|
|
|
(settings (search-path-environment-variables entries profiles
|
2015-05-20 11:52:45 +02:00
|
|
|
|
#:kind kind)))
|
2013-04-28 23:05:57 +02:00
|
|
|
|
(unless (null? settings)
|
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 15:57:02 +02:00
|
|
|
|
(format #t (G_ "The following environment variable definitions may be needed:~%"))
|
2013-05-09 22:58:23 +02:00
|
|
|
|
(format #t "~{ ~a~%~}" settings))))
|
2013-04-28 23:05:57 +02:00
|
|
|
|
|
2012-11-01 01:46:15 +01:00
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Command-line options.
|
|
|
|
|
;;;
|
|
|
|
|
|
|
|
|
|
(define %default-options
|
|
|
|
|
;; Alist of default option values.
|
2017-08-31 05:12:12 +02:00
|
|
|
|
`((verbosity . 0)
|
2016-03-02 13:43:13 +01:00
|
|
|
|
(graft? . #t)
|
2017-12-07 22:49:08 +01:00
|
|
|
|
(substitutes? . #t)
|
|
|
|
|
(build-hook? . #t)))
|
2012-11-01 01:46:15 +01: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 15:57:02 +02:00
|
|
|
|
(display (G_ "Usage: guix package [OPTION]...
|
2015-06-07 10:46:06 +02: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2015-06-07 10:46:06 +02: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2013-03-01 21:12:32 +01: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2015-08-09 17:35:51 +02: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2015-06-07 10:46:06 +02: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2013-04-15 23:23:27 +02: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2015-05-15 03:11:57 +02: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2015-03-26 22:25:09 +01: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2013-01-17 22:20:42 +01: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2015-05-21 14:26:01 +02: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2013-09-19 13:07:39 +02: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2013-09-26 04:36:24 +02: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2014-10-10 15:58:43 +02:00
|
|
|
|
-S, --switch-generation=PATTERN
|
|
|
|
|
switch to a generation 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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2012-11-01 01:46:15 +01:00
|
|
|
|
-p, --profile=PROFILE use PROFILE instead of the user's default profile"))
|
2014-03-01 18:29:29 +01: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2013-01-07 22:54:54 +01: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2012-12-12 14:59:16 +01:00
|
|
|
|
--verbose produce verbose output"))
|
2012-11-01 01:46:15 +01: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2013-01-28 07:29:10 +01: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2012-11-19 22:39:45 +01: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2012-11-19 23:02:59 +01: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2015-06-06 17:32:03 +02:00
|
|
|
|
--show=PACKAGE show details about PACKAGE"))
|
2012-11-19 22:39:45 +01:00
|
|
|
|
(newline)
|
2014-03-01 18:29:29 +01:00
|
|
|
|
(show-build-options-help)
|
|
|
|
|
(newline)
|
2016-01-31 21:33:08 +01: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2012-11-01 01:46:15 +01: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 15:57:02 +02:00
|
|
|
|
(display (G_ "
|
2012-11-01 01:46:15 +01:00
|
|
|
|
-V, --version display version information and exit"))
|
|
|
|
|
(newline)
|
2013-01-05 15:55:47 +01:00
|
|
|
|
(show-bug-report-information))
|
2012-11-01 01:46:15 +01:00
|
|
|
|
|
|
|
|
|
(define %options
|
|
|
|
|
;; Specification of the command-line options.
|
2014-03-01 18:29:29 +01: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 17:35:51 +02:00
|
|
|
|
(option '(#\f "install-from-file") #t #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (alist-cons 'install
|
|
|
|
|
(load* arg (make-user-module '()))
|
|
|
|
|
result)
|
|
|
|
|
#f)))
|
2014-03-01 18:29:29 +01: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 22:02:26 +02:00
|
|
|
|
(when (and arg (string-prefix? "-" arg))
|
2017-07-31 22:22:27 +02:00
|
|
|
|
(warning (G_ "upgrade regexp '~a' looks like a \
|
|
|
|
|
command-line option~%")
|
|
|
|
|
arg)
|
|
|
|
|
(warning (G_ "is this intended?~%")))
|
2014-03-01 18:29:29 +01: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 22:25:09 +01: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 22:51:14 +02:00
|
|
|
|
(option '("roll-back" "rollback") #f #f
|
2014-03-01 18:29:29 +01:00
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (alist-cons 'roll-back? #t result)
|
|
|
|
|
#f)))
|
2015-05-15 03:11:57 +02:00
|
|
|
|
(option '(#\m "manifest") #t #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (alist-cons 'manifest arg result)
|
|
|
|
|
arg-handler)))
|
2014-03-01 18:29:29 +01:00
|
|
|
|
(option '(#\l "list-generations") #f #t
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (cons `(query list-generations ,(or arg ""))
|
|
|
|
|
result)
|
|
|
|
|
#f)))
|
|
|
|
|
(option '(#\d "delete-generations") #f #t
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (alist-cons 'delete-generations (or arg "")
|
|
|
|
|
result)
|
|
|
|
|
#f)))
|
2014-10-10 15:58:43 +02: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 11:52:45 +02:00
|
|
|
|
(option '("search-paths") #f #t
|
2014-03-01 18:29:29 +01:00
|
|
|
|
(lambda (opt name arg result arg-handler)
|
2015-05-20 11:52:45 +02: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 15:57:02 +02:00
|
|
|
|
(leave (G_ "~a: unsupported \
|
2015-05-20 11:52:45 +02:00
|
|
|
|
kind of search path~%")
|
|
|
|
|
x)))))
|
|
|
|
|
(values (cons `(query search-paths ,kind)
|
|
|
|
|
result)
|
|
|
|
|
#f))))
|
2014-03-01 18:29:29 +01:00
|
|
|
|
(option '(#\p "profile") #t #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
2014-07-05 14:56:08 +02:00
|
|
|
|
(values (alist-cons 'profile (canonicalize-profile arg)
|
2015-11-10 22:00:53 +01:00
|
|
|
|
result)
|
2014-03-01 18:29:29 +01:00
|
|
|
|
#f)))
|
|
|
|
|
(option '(#\n "dry-run") #f #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
2016-08-28 16:22:19 +02:00
|
|
|
|
(values (alist-cons 'dry-run? #t
|
|
|
|
|
(alist-cons 'graft? #f result))
|
2014-03-01 18:29:29 +01:00
|
|
|
|
#f)))
|
|
|
|
|
(option '("bootstrap") #f #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (alist-cons 'bootstrap? #t result)
|
|
|
|
|
#f)))
|
|
|
|
|
(option '("verbose") #f #f
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (alist-cons 'verbose? #t result)
|
|
|
|
|
#f)))
|
|
|
|
|
(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-17 02:36:09 +02:00
|
|
|
|
(option '("show") #t #t
|
|
|
|
|
(lambda (opt name arg result arg-handler)
|
|
|
|
|
(values (cons `(query show ,arg)
|
|
|
|
|
result)
|
|
|
|
|
#f)))
|
2014-03-01 18:29:29 +01:00
|
|
|
|
|
2016-01-31 21:33:08 +01:00
|
|
|
|
(append %transformation-options
|
|
|
|
|
%standard-build-options)))
|
2012-11-01 01:46:15 +01:00
|
|
|
|
|
2015-11-30 21:00:39 +01: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 15:26:14 +01:00
|
|
|
|
(define upgrade-regexps
|
|
|
|
|
(filter-map (match-lambda
|
2015-11-30 21:00:39 +01:00
|
|
|
|
(('upgrade . regexp)
|
|
|
|
|
(make-regexp* (or regexp "")))
|
|
|
|
|
(_ #f))
|
2013-10-30 15:26:14 +01:00
|
|
|
|
opts))
|
|
|
|
|
|
2015-03-26 22:25:09 +01:00
|
|
|
|
(define do-not-upgrade-regexps
|
|
|
|
|
(filter-map (match-lambda
|
2015-11-30 21:00:39 +01:00
|
|
|
|
(('do-not-upgrade . regexp)
|
|
|
|
|
(make-regexp* regexp))
|
|
|
|
|
(_ #f))
|
2015-03-26 22:25:09 +01:00
|
|
|
|
opts))
|
|
|
|
|
|
2015-11-30 21:00:39 +01: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 11:55:51 +01:00
|
|
|
|
(package-name->name+version (store-path-package-name item)
|
|
|
|
|
#\-)))
|
2015-11-30 21:00:39 +01:00
|
|
|
|
(manifest-entry
|
|
|
|
|
(name name)
|
|
|
|
|
(version version)
|
2017-01-11 11:55:51 +01:00
|
|
|
|
(output "out") ;XXX: wild guess
|
2015-11-30 21:00:39 +01:00
|
|
|
|
(item item))))
|
|
|
|
|
|
2016-09-06 22:28:12 +02:00
|
|
|
|
(define (options->installable opts manifest transaction)
|
2015-11-30 21:00:39 +01:00
|
|
|
|
"Given MANIFEST, the current manifest, and OPTS, the result of 'args-fold',
|
2016-09-06 22:28:12 +02:00
|
|
|
|
return an variant of TRANSACTION that accounts for the specified installations
|
|
|
|
|
and upgrades."
|
2015-11-30 21:00:39 +01:00
|
|
|
|
(define upgrade?
|
|
|
|
|
(options->upgrade-predicate opts))
|
2013-10-30 15:26:14 +01:00
|
|
|
|
|
2016-09-06 22:28:12 +02:00
|
|
|
|
(define upgraded
|
2017-10-07 15:44:23 +02:00
|
|
|
|
(fold-right (lambda (entry transaction)
|
|
|
|
|
(if (upgrade? (manifest-entry-name entry))
|
|
|
|
|
(transaction-upgrade-entry entry transaction)
|
|
|
|
|
transaction))
|
|
|
|
|
transaction
|
|
|
|
|
(manifest-entries manifest)))
|
2013-10-30 15:26:14 +01:00
|
|
|
|
|
2015-11-30 21:00:39 +01:00
|
|
|
|
(define to-install
|
2013-10-30 15:26:14 +01:00
|
|
|
|
(filter-map (match-lambda
|
2015-11-30 21:00:39 +01:00
|
|
|
|
(('install . (? package? p))
|
|
|
|
|
;; When given a package via `-e', install the first of its
|
|
|
|
|
;; outputs (XXX).
|
2016-02-23 09:38:00 +01:00
|
|
|
|
(package->manifest-entry p "out"))
|
2015-11-30 21:00:39 +01:00
|
|
|
|
(('install . (? string? spec))
|
|
|
|
|
(if (store-path? spec)
|
|
|
|
|
(store-item->manifest-entry spec)
|
2013-10-30 15:26:14 +01:00
|
|
|
|
(let-values (((package output)
|
|
|
|
|
(specification->package+output spec)))
|
2016-02-23 09:38:00 +01:00
|
|
|
|
(package->manifest-entry package output))))
|
2015-11-30 21:00:39 +01:00
|
|
|
|
(_ #f))
|
2013-10-30 15:26:14 +01:00
|
|
|
|
opts))
|
|
|
|
|
|
2016-09-06 22:28:12 +02: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 17:12:15 +01:00
|
|
|
|
|
2015-02-06 17:52:07 +01: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 15:44:42 +02:00
|
|
|
|
|
2015-11-30 13:46:31 +01:00
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Queries and actions.
|
|
|
|
|
;;;
|
|
|
|
|
|
2015-11-30 09:56:28 +01:00
|
|
|
|
(define (process-query opts)
|
|
|
|
|
"Process any query specified by OPTS. Return #t when a query was actually
|
|
|
|
|
processed, #f otherwise."
|
|
|
|
|
(let* ((profiles (match (filter-map (match-lambda
|
|
|
|
|
(('profile . p) p)
|
|
|
|
|
(_ #f))
|
|
|
|
|
opts)
|
|
|
|
|
(() (list %current-profile))
|
2017-01-22 22:25:26 +01:00
|
|
|
|
(lst (reverse lst))))
|
2015-11-30 09:56:28 +01:00
|
|
|
|
(profile (match profiles
|
|
|
|
|
((head tail ...) head))))
|
|
|
|
|
(match (assoc-ref opts 'query)
|
|
|
|
|
(('list-generations pattern)
|
2016-10-26 14:53:29 +02:00
|
|
|
|
(define (list-generation display-function number)
|
2015-11-30 09:56:28 +01:00
|
|
|
|
(unless (zero? number)
|
|
|
|
|
(display-generation profile number)
|
2016-10-26 14:53:29 +02:00
|
|
|
|
(display-function profile number)
|
2015-11-30 09:56:28 +01:00
|
|
|
|
(newline)))
|
2016-10-26 14:53:29 +02: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 22:45:03 +02:00
|
|
|
|
|
|
|
|
|
(leave-on-EPIPE
|
|
|
|
|
(cond ((not (file-exists? profile)) ; XXX: race condition
|
|
|
|
|
(raise (condition (&profile-not-found-error
|
|
|
|
|
(profile profile)))))
|
|
|
|
|
((string-null? pattern)
|
2017-07-20 15:27:54 +02:00
|
|
|
|
(match (profile-generations profile)
|
|
|
|
|
(()
|
|
|
|
|
#t)
|
|
|
|
|
((first rest ...)
|
|
|
|
|
(list-generation display-profile-content first)
|
|
|
|
|
(diff-profiles profile (cons first rest)))))
|
2017-05-23 22:45:03 +02:00
|
|
|
|
((matching-generations pattern profile)
|
|
|
|
|
=>
|
|
|
|
|
(lambda (numbers)
|
|
|
|
|
(if (null-list? numbers)
|
|
|
|
|
(exit 1)
|
|
|
|
|
(begin
|
|
|
|
|
(list-generation display-profile-content (car numbers))
|
|
|
|
|
(diff-profiles profile numbers)))))
|
|
|
|
|
(else
|
|
|
|
|
(leave (G_ "invalid syntax: ~a~%")
|
|
|
|
|
pattern))))
|
2015-11-30 09:56:28 +01:00
|
|
|
|
#t)
|
|
|
|
|
|
|
|
|
|
(('list-installed regexp)
|
|
|
|
|
(let* ((regexp (and regexp (make-regexp* regexp)))
|
|
|
|
|
(manifest (profile-manifest profile))
|
|
|
|
|
(installed (manifest-entries manifest)))
|
|
|
|
|
(leave-on-EPIPE
|
|
|
|
|
(for-each (match-lambda
|
|
|
|
|
(($ <manifest-entry> name version output path _)
|
|
|
|
|
(when (or (not regexp)
|
|
|
|
|
(regexp-exec regexp name))
|
|
|
|
|
(format #t "~a\t~a\t~a\t~a~%"
|
|
|
|
|
name (or version "?") output path))))
|
|
|
|
|
|
|
|
|
|
;; Show most recently installed packages last.
|
|
|
|
|
(reverse installed)))
|
|
|
|
|
#t))
|
|
|
|
|
|
|
|
|
|
(('list-available regexp)
|
|
|
|
|
(let* ((regexp (and regexp (make-regexp* regexp)))
|
|
|
|
|
(available (fold-packages
|
|
|
|
|
(lambda (p r)
|
|
|
|
|
(let ((n (package-name p)))
|
2017-10-26 05:35:43 +02:00
|
|
|
|
(if (and (supported-package? p)
|
|
|
|
|
(not (package-superseded p)))
|
2015-11-30 09:56:28 +01:00
|
|
|
|
(if regexp
|
|
|
|
|
(if (regexp-exec regexp n)
|
|
|
|
|
(cons p r)
|
|
|
|
|
r)
|
|
|
|
|
(cons p r))
|
|
|
|
|
r)))
|
|
|
|
|
'())))
|
|
|
|
|
(leave-on-EPIPE
|
|
|
|
|
(for-each (lambda (p)
|
|
|
|
|
(format #t "~a\t~a\t~a\t~a~%"
|
|
|
|
|
(package-name p)
|
|
|
|
|
(package-version p)
|
|
|
|
|
(string-join (package-outputs p) ",")
|
|
|
|
|
(location->string (package-location p))))
|
|
|
|
|
(sort available
|
|
|
|
|
(lambda (p1 p2)
|
|
|
|
|
(string<? (package-name p1)
|
|
|
|
|
(package-name p2))))))
|
|
|
|
|
#t))
|
|
|
|
|
|
2016-01-04 22:27:38 +01:00
|
|
|
|
(('search _)
|
|
|
|
|
(let* ((patterns (filter-map (match-lambda
|
|
|
|
|
(('query 'search rx) rx)
|
|
|
|
|
(_ #f))
|
|
|
|
|
opts))
|
|
|
|
|
(regexps (map (cut make-regexp* <> regexp/icase) patterns)))
|
2015-11-30 09:56:28 +01:00
|
|
|
|
(leave-on-EPIPE
|
2017-06-13 23:04:05 +02:00
|
|
|
|
(let-values (((packages scores)
|
|
|
|
|
(find-packages-by-description regexps)))
|
|
|
|
|
(for-each (lambda (package score)
|
|
|
|
|
(package->recutils package (current-output-port)
|
|
|
|
|
#:extra-fields
|
|
|
|
|
`((relevance . ,score))))
|
|
|
|
|
packages
|
|
|
|
|
scores)))
|
2015-11-30 09:56:28 +01:00
|
|
|
|
#t))
|
|
|
|
|
|
|
|
|
|
(('show requested-name)
|
|
|
|
|
(let-values (((name version)
|
|
|
|
|
(package-name->name+version requested-name)))
|
|
|
|
|
(leave-on-EPIPE
|
|
|
|
|
(for-each (cute package->recutils <> (current-output-port))
|
|
|
|
|
(find-packages-by-name name version)))
|
|
|
|
|
#t))
|
|
|
|
|
|
|
|
|
|
(('search-paths kind)
|
|
|
|
|
(let* ((manifests (map profile-manifest profiles))
|
2017-06-21 10:57:10 +02:00
|
|
|
|
(entries (append-map manifest-transitive-entries
|
|
|
|
|
manifests))
|
2015-11-30 09:56:28 +01:00
|
|
|
|
(profiles (map user-friendly-profile profiles))
|
|
|
|
|
(settings (search-path-environment-variables entries profiles
|
|
|
|
|
(const #f)
|
|
|
|
|
#:kind kind)))
|
|
|
|
|
(format #t "~{~a~%~}" settings)
|
|
|
|
|
#t))
|
|
|
|
|
|
|
|
|
|
(_ #f))))
|
|
|
|
|
|
2015-11-30 13:46:31 +01: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 06:48:11 +01:00
|
|
|
|
(let ((number (relative-generation-spec->number profile spec)))
|
2015-11-30 13:46:31 +01: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 15:57:02 +02:00
|
|
|
|
(leave (G_ "cannot switch to generation '~a'~%") spec)))))
|
2015-11-30 13:46:31 +01: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)))
|
|
|
|
|
|
|
|
|
|
(define* (manifest-action store profile file opts
|
|
|
|
|
#:key dry-run?)
|
|
|
|
|
"Change PROFILE to contain the packages specified in FILE."
|
|
|
|
|
(let* ((user-module (make-user-module '((guix profiles) (gnu))))
|
|
|
|
|
(manifest (load* file user-module))
|
|
|
|
|
(bootstrap? (assoc-ref opts 'bootstrap?))
|
|
|
|
|
(substitutes? (assoc-ref opts 'substitutes?)))
|
|
|
|
|
(if dry-run?
|
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 15:57:02 +02:00
|
|
|
|
(format #t (G_ "would install new manifest from '~a' with ~d entries~%")
|
2015-11-30 13:46:31 +01:00
|
|
|
|
file (length (manifest-entries manifest)))
|
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 15:57:02 +02:00
|
|
|
|
(format #t (G_ "installing new manifest from '~a' with ~d entries~%")
|
2015-11-30 13:46:31 +01:00
|
|
|
|
file (length (manifest-entries manifest))))
|
|
|
|
|
(build-and-use-profile store profile manifest
|
|
|
|
|
#:bootstrap? bootstrap?
|
|
|
|
|
#:use-substitutes? substitutes?
|
|
|
|
|
#:dry-run? dry-run?)))
|
|
|
|
|
|
|
|
|
|
(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)
|
|
|
|
|
(delete-generations . ,delete-generations-action)
|
|
|
|
|
(manifest . ,manifest-action)))
|
|
|
|
|
|
2015-11-30 20:18:11 +01: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?))
|
|
|
|
|
(define profile (or (assoc-ref opts 'profile) %current-profile))
|
2016-01-31 21:33:08 +01:00
|
|
|
|
(define transform (options->transformation opts))
|
|
|
|
|
|
|
|
|
|
(define (transform-entry entry)
|
2016-05-27 15:17:42 +02:00
|
|
|
|
(let ((item (transform store (manifest-entry-item entry))))
|
|
|
|
|
(manifest-entry
|
|
|
|
|
(inherit entry)
|
|
|
|
|
(item item)
|
|
|
|
|
(version (if (package? item)
|
|
|
|
|
(package-version item)
|
|
|
|
|
(manifest-entry-version entry))))))
|
2015-11-30 20:18:11 +01:00
|
|
|
|
|
|
|
|
|
;; First, 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)
|
|
|
|
|
|
2017-06-26 22:48:57 +02:00
|
|
|
|
;; Then, process normal package removal/installation/upgrade.
|
2016-09-06 22:28:12 +02:00
|
|
|
|
(let* ((manifest (profile-manifest profile))
|
2017-06-26 22:48:57 +02:00
|
|
|
|
(step1 (options->removable opts manifest
|
|
|
|
|
(manifest-transaction)))
|
|
|
|
|
(step2 (options->installable opts manifest step1))
|
2016-09-06 22:28:12 +02:00
|
|
|
|
(step3 (manifest-transaction
|
|
|
|
|
(inherit step2)
|
|
|
|
|
(install (map transform-entry
|
|
|
|
|
(manifest-transaction-install step2)))))
|
|
|
|
|
(new (manifest-perform-transaction manifest step3)))
|
|
|
|
|
|
2017-05-10 15:25:59 +02:00
|
|
|
|
(warn-about-old-distro)
|
|
|
|
|
|
2016-09-06 22:28:12 +02:00
|
|
|
|
(unless (manifest-transaction-null? step3)
|
|
|
|
|
(show-manifest-transaction store manifest step3
|
2015-11-30 20:18:11 +01:00
|
|
|
|
#:dry-run? dry-run?)
|
|
|
|
|
(build-and-use-profile store profile new
|
|
|
|
|
#:bootstrap? bootstrap?
|
|
|
|
|
#:use-substitutes? substitutes?
|
|
|
|
|
#:dry-run? dry-run?))))
|
|
|
|
|
|
2012-11-01 01:46:15 +01:00
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Entry point.
|
|
|
|
|
;;;
|
|
|
|
|
|
|
|
|
|
(define (guix-package . args)
|
2015-02-25 23:31:51 +01: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 15:57:02 +02:00
|
|
|
|
(leave (G_ "~A: extraneous argument~%") arg)))
|
2012-11-01 01:46:15 +01:00
|
|
|
|
|
2015-02-25 23:31:51 +01:00
|
|
|
|
(let ((opts (parse-command-line args %options (list %default-options #f)
|
|
|
|
|
#:argument-handler handle-argument)))
|
2014-10-08 15:29:01 +02:00
|
|
|
|
(with-error-handling
|
|
|
|
|
(or (process-query opts)
|
2016-03-02 13:43:13 +01:00
|
|
|
|
(parameterize ((%store (open-connection))
|
|
|
|
|
(%graft? (assoc-ref opts 'graft?)))
|
2014-03-01 18:29:29 +01:00
|
|
|
|
(set-build-options-from-command-line (%store) opts)
|
2013-04-12 15:43:55 +02:00
|
|
|
|
|
2013-01-15 22:39:03 +01:00
|
|
|
|
(parameterize ((%guile-for-build
|
gnu: Split (gnu packages base), adding (gnu packages commencement).
* gnu/packages/base.scm (gnu-make-boot0, diffutils-boot0,
findutils-boot0, %boot0-inputs, nix-system->gnu-triplet, boot-triplet,
binutils-boot0, gcc-boot0, perl-boot0, linux-libre-headers-boot0,
texinfo-boot0, %boot1-inputs, glibc-final-with-bootstrap-bash,
cross-gcc-wrapper, static-bash-for-glibc, glibc-final,
gcc-boot0-wrapped, %boot2-inputs, binutils-final, libstdc++,
gcc-final, ld-wrapper-boot3, %boot3-inputs, bash-final, %boot4-inputs,
guile-final, gnu-make-final, ld-wrapper, coreutils-final, grep-final,
%boot5-inputs, %final-inputs, canonical-package, gcc-toolchain,
gcc-toolchain-4.8, gcc-toolchain-4.9): Move to...
* gnu/packages/commencement.scm: ... here. New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* build-aux/check-final-inputs-self-contained.scm: Adjust accordingly.
* gnu/packages/cross-base.scm: Likewise.
* gnu/packages/make-bootstrap.scm: Likewise.
* guix/build-system/cmake.scm (cmake-build): Likewise.
* guix/build-system/gnu.scm (standard-packages, gnu-build,
gnu-cross-build): Likewise.
* guix/build-system/perl.scm (perl-build): Likewise.
* guix/build-system/python.scm (python-build): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Likewise.
* guix/download.scm (url-fetch): Likewise.
* guix/gexp.scm (default-guile): Likewise.
* guix/git-download.scm (git-fetch): Likewise.
* guix/monads.scm (run-with-store): Likewise.
* guix/packages.scm (default-guile): Likewise.
* guix/scripts/package.scm (guix-package): Likewise.
* guix/scripts/refresh.scm: Likewise.
* guix/svn-download.scm (svn-fetch): Likewise.
* tests/builders.scm (%bootstrap-inputs, %bootstrap-search-paths):
Likewise.
* tests/packages.scm ("GNU Make, bootstrap"): Likewise.
* tests/guix-package.sh: Likewise.
* gnu/services/base.scm: Use 'canonical-package' instead of xxx-final.
* gnu/services/xorg.scm: Likewise.
* gnu/system/vm.scm: Likewise.
* guix/scripts/pull.scm (guix-pull): Likewise.
2014-08-27 00:25:17 +02:00
|
|
|
|
(package-derivation
|
|
|
|
|
(%store)
|
|
|
|
|
(if (assoc-ref opts 'bootstrap?)
|
|
|
|
|
%bootstrap-guile
|
2017-12-03 22:13:33 +01:00
|
|
|
|
(canonical-package guile-2.2)))))
|
2015-11-30 20:18:11 +01:00
|
|
|
|
(process-actions (%store) opts)))))))
|