summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-03-16 03:20:55 -0400
committerMark H Weaver <mhw@netris.org>2018-03-16 05:02:36 -0400
commit469de8c3fa57369f0c09aa9eceaa33c3808f60da (patch)
tree8f14f9916d652f88401c5217d6ec59da753fe8b8 /guix
parent81d8211e1bf3fa40bc72c1c219ef4eaae590f2dc (diff)
hg-download: Use invoke instead of system*.
* guix/build/hg.scm (hg-fetch): Use invoke and remove vestigial plumbing.
Diffstat (limited to 'guix')
-rw-r--r--guix/build/hg.scm30
1 files changed, 16 insertions, 14 deletions
diff --git a/guix/build/hg.scm b/guix/build/hg.scm
index ae4574de57..ea51eb670b 100644
--- a/guix/build/hg.scm
+++ b/guix/build/hg.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -33,19 +34,20 @@
"Fetch CHANGESET from URL into DIRECTORY. CHANGESET must be a valid
Mercurial changeset identifier. Return #t on success, #f otherwise."
- (and (zero? (system* hg-command
- "clone" url
- "--rev" changeset
- ;; Disable TLS certificate verification. The hash of
- ;; the checkout is known in advance anyway.
- "--insecure"
- directory))
- (with-directory-excursion directory
- (begin
- ;; The contents of '.hg' vary as a function of the current
- ;; status of the Mercurial repo. Since we want a fixed
- ;; output, this directory needs to be taken out.
- (delete-file-recursively ".hg")
- #t))))
+ (invoke hg-command
+ "clone" url
+ "--rev" changeset
+ ;; Disable TLS certificate verification. The hash of
+ ;; the checkout is known in advance anyway.
+ "--insecure"
+ directory)
+
+ ;; The contents of '.hg' vary as a function of the current
+ ;; status of the Mercurial repo. Since we want a fixed
+ ;; output, this directory needs to be taken out.
+ (with-directory-excursion directory
+ (delete-file-recursively ".hg"))
+
+ #t)
;;; hg.scm ends here