hg-download: Use invoke instead of system*.
* guix/build/hg.scm (hg-fetch): Use invoke and remove vestigial plumbing.
This commit is contained in:
parent
81d8211e1b
commit
469de8c3fa
1 changed files with 16 additions and 14 deletions
|
@ -1,5 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
|
||||||
|
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -33,19 +34,20 @@
|
||||||
"Fetch CHANGESET from URL into DIRECTORY. CHANGESET must be a valid
|
"Fetch CHANGESET from URL into DIRECTORY. CHANGESET must be a valid
|
||||||
Mercurial changeset identifier. Return #t on success, #f otherwise."
|
Mercurial changeset identifier. Return #t on success, #f otherwise."
|
||||||
|
|
||||||
(and (zero? (system* hg-command
|
(invoke hg-command
|
||||||
"clone" url
|
"clone" url
|
||||||
"--rev" changeset
|
"--rev" changeset
|
||||||
;; Disable TLS certificate verification. The hash of
|
;; Disable TLS certificate verification. The hash of
|
||||||
;; the checkout is known in advance anyway.
|
;; the checkout is known in advance anyway.
|
||||||
"--insecure"
|
"--insecure"
|
||||||
directory))
|
directory)
|
||||||
(with-directory-excursion directory
|
|
||||||
(begin
|
;; The contents of '.hg' vary as a function of the current
|
||||||
;; The contents of '.hg' vary as a function of the current
|
;; status of the Mercurial repo. Since we want a fixed
|
||||||
;; status of the Mercurial repo. Since we want a fixed
|
;; output, this directory needs to be taken out.
|
||||||
;; output, this directory needs to be taken out.
|
(with-directory-excursion directory
|
||||||
(delete-file-recursively ".hg")
|
(delete-file-recursively ".hg"))
|
||||||
#t))))
|
|
||||||
|
#t)
|
||||||
|
|
||||||
;;; hg.scm ends here
|
;;; hg.scm ends here
|
||||||
|
|
Reference in a new issue