[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/11: pull: Add '--profile'.
From: |
Ludovic Courtès |
Subject: |
09/11: pull: Add '--profile'. |
Date: |
Fri, 7 Sep 2018 05:44:42 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit ee94cfeb99a7e3879c92ca21318960077ce4100e
Author: Ludovic Courtès <address@hidden>
Date: Mon Sep 3 12:46:40 2018 +0200
pull: Add '--profile'.
* guix/scripts/pull.scm (show-help, %options): Add '--profile'.
(build-and-install): Change 'config-dir' argument to 'profile'.
(guix-pull): Honor '--profile'.
* doc/guix.texi (Invoking guix pull): Document it.
---
doc/guix.texi | 4 ++++
guix/scripts/pull.scm | 19 ++++++++++++-------
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 2c5b01e..30f1be2 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2851,6 +2851,10 @@ is provided, the subset of generations that match
@var{pattern}.
The syntax of @var{pattern} is the same as with @code{guix package
--list-generations} (@pxref{Invoking guix package}).
address@hidden address@hidden
address@hidden -p @var{profile}
+Use @var{profile} instead of @file{~/.config/guix/current}.
+
@item --bootstrap
Use the bootstrap Guile to build the latest Guix. This option is only
useful to Guix developers.
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 18c04f0..ebc5dc9 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -80,6 +80,8 @@ Download and deploy the latest version of Guix.\n"))
-l, --list-generations[=PATTERN]
list generations matching PATTERN"))
(display (G_ "
+ -p, --profile=PROFILE use PROFILE instead of ~/.config/guix/current"))
+ (display (G_ "
--bootstrap use the bootstrap Guile to build the new Guix"))
(newline)
(show-build-options-help)
@@ -113,6 +115,10 @@ Download and deploy the latest version of Guix.\n"))
(lambda (opt name arg result)
(alist-cons 'ref `(branch . ,(string-append "origin/" arg))
result)))
+ (option '(#\p "profile") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'profile (canonicalize-profile arg)
+ result)))
(option '(#\n "dry-run") #f #f
(lambda (opt name arg result)
(alist-cons 'dry-run? #t (alist-cons 'graft? #f result))))
@@ -152,15 +158,12 @@ Download and deploy the latest version of Guix.\n"))
#:heading (G_ "New in this
revision:\n"))))
(_ #t)))
-(define* (build-and-install instances config-dir
+(define* (build-and-install instances profile
#:key verbose?)
- "Build the tool from SOURCE, and install it in CONFIG-DIR."
+ "Build the tool from SOURCE, and install it in PROFILE."
(define update-profile
(store-lift build-and-use-profile))
- (define profile
- (string-append config-dir "/current"))
-
(mlet %store-monad ((manifest (channel-instances->manifest instances)))
(mbegin %store-monad
(update-profile profile manifest)
@@ -414,7 +417,9 @@ Use '~/.config/guix/channels.scm' instead."))
(let* ((opts (parse-command-line args %options
(list %default-options)))
(cache (string-append (cache-directory) "/pull"))
- (channels (channel-list opts)))
+ (channels (channel-list opts))
+ (profile (or (assoc-ref opts 'profile)
+ (string-append (config-directory) "/current"))))
(cond ((assoc-ref opts 'query)
(process-query opts))
@@ -456,7 +461,7 @@ Use '~/.config/guix/channels.scm' instead."))
%bootstrap-guile
(canonical-package guile-2.2)))))
(run-with-store store
- (build-and-install instances (config-directory)
+ (build-and-install instances profile
#:verbose?
(assoc-ref opts
'verbose?)))))))))))))
- branch master updated (0012e0d -> 2b73d82), Ludovic Courtès, 2018/09/07
- 01/11: vm: Make UUID computation really deterministic., Ludovic Courtès, 2018/09/07
- 08/11: gnu: Add r-ggformula., Ludovic Courtès, 2018/09/07
- 05/11: gnu: Add r-abctools., Ludovic Courtès, 2018/09/07
- 07/11: gnu: Add r-mosaiccore., Ludovic Courtès, 2018/09/07
- 09/11: pull: Add '--profile'.,
Ludovic Courtès <=
- 11/11: guix package: Record package provenance in manifest entries., Ludovic Courtès, 2018/09/07
- 10/11: Add 'guix describe'., Ludovic Courtès, 2018/09/07
- 02/11: gnu: emacs-ess: Update to 17.11., Ludovic Courtès, 2018/09/07
- 04/11: gnu: Add r-abcrf., Ludovic Courtès, 2018/09/07
- 06/11: gnu: Add r-ggstance., Ludovic Courtès, 2018/09/07
- 03/11: gnu: Add r-abcp2., Ludovic Courtès, 2018/09/07