aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-08-01 23:38:07 +0200
committerLudovic Courtès <ludo@gnu.org>2017-08-02 00:04:00 +0200
commitc53fc481440ff9d4cf23e8da3abc0759faca337a (patch)
tree2a68a342b39050cbe4454f325ea6ad3af3a3834d /guix
parent3085b50200a49429d51b043c742bf053f37d1491 (diff)
downloadgnu-guix-c53fc481440ff9d4cf23e8da3abc0759faca337a.tar
gnu-guix-c53fc481440ff9d4cf23e8da3abc0759faca337a.tar.gz
pull: Honor '--no-grafts'.
* guix/scripts/pull.scm (guix-pull): Parameterize %GRAFT? as a function of OPTS.
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/pull.scm52
1 files changed, 28 insertions, 24 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 02cec999a3..a1deec8040 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -27,6 +27,7 @@
#:use-module (guix derivations)
#:use-module (guix download)
#:use-module (guix gexp)
+ #:use-module (guix grafts)
#:use-module (guix monads)
#:use-module (guix scripts build)
#:use-module ((guix build utils)
@@ -256,33 +257,36 @@ certificates~%"))
(unless (assoc-ref opts 'dry-run?) ;XXX: not very useful
(with-store store
- (set-build-options-from-command-line store opts)
+ (parameterize ((%graft? (assoc-ref opts 'graft?)))
+ (set-build-options-from-command-line store opts)
- ;; For reproducibility, always refer to the LE certificates when we
- ;; know we're talking to Savannah.
- (when (use-le-certs? url)
- (honor-lets-encrypt-certificates! store))
+ ;; For reproducibility, always refer to the LE certificates when we
+ ;; know we're talking to Savannah.
+ (when (use-le-certs? url)
+ (honor-lets-encrypt-certificates! store))
- (format (current-error-port)
- (G_ "Updating from Git repository at '~a'...~%")
- url)
+ (format (current-error-port)
+ (G_ "Updating from Git repository at '~a'...~%")
+ url)
- (let-values (((checkout commit)
- (latest-repository-commit store url
- #:ref ref
- #:cache-directory cache)))
+ (let-values (((checkout commit)
+ (latest-repository-commit store url
+ #:ref ref
+ #:cache-directory cache)))
- (format (current-error-port)
- (G_ "Building from Git commit ~a...~%")
- commit)
- (parameterize ((%guile-for-build
- (package-derivation store
- (if (assoc-ref opts 'bootstrap?)
- %bootstrap-guile
- (canonical-package guile-2.0)))))
- (run-with-store store
- (build-and-install checkout (config-directory)
- #:commit commit
- #:verbose? (assoc-ref opts 'verbose?)))))))))))
+ (format (current-error-port)
+ (G_ "Building from Git commit ~a...~%")
+ commit)
+ (parameterize ((%guile-for-build
+ (package-derivation
+ store
+ (if (assoc-ref opts 'bootstrap?)
+ %bootstrap-guile
+ (canonical-package guile-2.0)))))
+ (run-with-store store
+ (build-and-install checkout (config-directory)
+ #:commit commit
+ #:verbose?
+ (assoc-ref opts 'verbose?))))))))))))
;;; pull.scm ends here