Revert "build: svn: Handle fetch errors."
This reverts commit 2fb12dd1bb
, which
causes the 'svn export' command to fail with:
svn: E155000: Destination directory exists; please remove the directory
or use --force to overwrite
master
parent
a489d2f1f2
commit
1ec67d5220
|
@ -2,7 +2,6 @@
|
||||||
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
|
;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
|
||||||
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
|
||||||
;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
|
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -21,8 +20,6 @@
|
||||||
|
|
||||||
(define-module (guix build svn)
|
(define-module (guix build svn)
|
||||||
#:use-module (guix build utils)
|
#:use-module (guix build utils)
|
||||||
#:use-module (srfi srfi-34)
|
|
||||||
#:use-module (ice-9 format)
|
|
||||||
#:export (svn-fetch))
|
#:export (svn-fetch))
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
@ -39,33 +36,20 @@
|
||||||
(password #f))
|
(password #f))
|
||||||
"Fetch REVISION from URL into DIRECTORY. REVISION must be an integer, and a
|
"Fetch REVISION from URL into DIRECTORY. REVISION must be an integer, and a
|
||||||
valid Subversion revision. Return #t on success, #f otherwise."
|
valid Subversion revision. Return #t on success, #f otherwise."
|
||||||
(mkdir-p directory)
|
(apply invoke svn-command
|
||||||
|
"export" "--non-interactive"
|
||||||
(guard (c ((invoke-error? c)
|
;; Trust the server certificate. This is OK as we
|
||||||
(format (current-error-port)
|
;; verify the checksum later. This can be removed when
|
||||||
"svn-fetch: '~a~{ ~a~}' failed with exit code ~a~%"
|
;; ca-certificates package is added.
|
||||||
(invoke-error-program c)
|
"--trust-server-cert" "-r" (number->string revision)
|
||||||
(invoke-error-arguments c)
|
`(,@(if (and user-name password)
|
||||||
(or (invoke-error-exit-status c)
|
(list (string-append "--username=" user-name)
|
||||||
(invoke-error-stop-signal c)
|
(string-append "--password=" password))
|
||||||
(invoke-error-term-signal c)))
|
'())
|
||||||
(delete-file-recursively directory)
|
,@(if recursive?
|
||||||
#f))
|
'()
|
||||||
(with-directory-excursion directory
|
(list "--ignore-externals"))
|
||||||
(apply invoke svn-command
|
,url ,directory))
|
||||||
"export" "--non-interactive"
|
#t)
|
||||||
;; Trust the server certificate. This is OK as we
|
|
||||||
;; verify the checksum later. This can be removed when
|
|
||||||
;; ca-certificates package is added.
|
|
||||||
"--trust-server-cert" "-r" (number->string revision)
|
|
||||||
`(,@(if (and user-name password)
|
|
||||||
(list (string-append "--username=" user-name)
|
|
||||||
(string-append "--password=" password))
|
|
||||||
'())
|
|
||||||
,@(if recursive?
|
|
||||||
'()
|
|
||||||
(list "--ignore-externals"))
|
|
||||||
,url ,directory))
|
|
||||||
#t)))
|
|
||||||
|
|
||||||
;;; svn.scm ends here
|
;;; svn.scm ends here
|
||||||
|
|
Reference in New Issue