summaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-03-19 10:42:28 +0100
committerLudovic Courtès <ludo@gnu.org>2020-03-22 12:42:51 +0100
commit65ffb9388c1c3d870cb07e4cb3ef12c9ac06a161 (patch)
tree0988fce3f8421b2da0e91ee92839a1e5dc91d131 /guix/scripts/package.scm
parent5f5e9a5cd63352875ea968f89bc4b8cb4318cc02 (diff)
downloadguix-patches-65ffb9388c1c3d870cb07e4cb3ef12c9ac06a161.tar
guix-patches-65ffb9388c1c3d870cb07e4cb3ef12c9ac06a161.tar.gz
guix package, pull: Use 'with-build-handler'.
* guix/scripts/package.scm (build-and-use-profile): Remove #:dry-run? and #:use-substitutes?. Remove call to 'show-what-to-build' and 'dry-run?' special case. (process-actions): Adjust accordingly. (guix-package*): Wrap 'parameterize' in 'with-build-handler'. * guix/scripts/pull.scm (build-and-install): Remove #:use-substitutes? and #:dry-run? and adjust 'update-profile' call accordingly. Remove 'dry-run?' conditional. (guix-pull): Wrap body in 'with-build-handler'.
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r--guix/scripts/package.scm29
1 files changed, 13 insertions, 16 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index e620309e30..b5d16acec0 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -132,8 +132,7 @@ denote ranges as interpreted by 'matching-generations'."
#:key
(hooks %default-profile-hooks)
allow-collisions?
- bootstrap? use-substitutes?
- dry-run?)
+ bootstrap?)
"Build a new generation of PROFILE, a file name, using the packages
specified in MANIFEST, a manifest object. When ALLOW-COLLISIONS? is true,
do not treat collisions in MANIFEST as an error. HOOKS is a list of \"profile
@@ -144,12 +143,8 @@ hooks\" run when building the profile."
#:hooks (if bootstrap? '() hooks)
#:locales? (not bootstrap?))))
(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 <>)))
(format (current-error-port) (G_ "nothing to be done~%")))
@@ -920,9 +915,7 @@ processed, #f otherwise."
#:dry-run? dry-run?)
(build-and-use-profile store profile new
#:allow-collisions? allow-collisions?
- #:bootstrap? bootstrap?
- #:use-substitutes? substitutes?
- #:dry-run? dry-run?)))))
+ #:bootstrap? bootstrap?)))))
;;;
@@ -951,10 +944,14 @@ option processing with 'parse-command-line'."
(%graft? (assoc-ref opts 'graft?)))
(with-status-verbosity (assoc-ref opts 'verbosity)
(set-build-options-from-command-line (%store) opts)
- (parameterize ((%guile-for-build
- (package-derivation
- (%store)
- (if (assoc-ref opts 'bootstrap?)
- %bootstrap-guile
- (canonical-package guile-2.2)))))
- (process-actions (%store) opts)))))))
+ (with-build-handler (build-notifier #:use-substitutes?
+ (assoc-ref opts 'substitutes?)
+ #:dry-run?
+ (assoc-ref opts 'dry-run?))
+ (parameterize ((%guile-for-build
+ (package-derivation
+ (%store)
+ (if (assoc-ref opts 'bootstrap?)
+ %bootstrap-guile
+ (canonical-package guile-2.2)))))
+ (process-actions (%store) opts))))))))