summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorPaul Garlick <pgarlick@tourbillion-technology.com>2020-10-06 14:44:09 +0100
committerPaul Garlick <pgarlick@tourbillion-technology.com>2020-10-06 14:47:57 +0100
commit1ec67d5220b0ebac20263b44f4fefaf51ba8fdbb (patch)
treedeec85c6ea868abb9db1b954fccdd34e443c0003 /guix
parenta489d2f1f22033b1e6a2638b6f39b7f761240e2f (diff)
Revert "build: svn: Handle fetch errors."
This reverts commit 2fb12dd1bb725592e1561ac8f4b32fb68accb161, which causes the 'svn export' command to fail with: svn: E155000: Destination directory exists; please remove the directory or use --force to overwrite
Diffstat (limited to 'guix')
-rw-r--r--guix/build/svn.scm46
1 files changed, 15 insertions, 31 deletions
diff --git a/guix/build/svn.scm b/guix/build/svn.scm
index 48d28f0327..33783f3056 100644
--- a/guix/build/svn.scm
+++ b/guix/build/svn.scm
@@ -2,7 +2,6 @@
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,8 +20,6 @@
(define-module (guix build svn)
#:use-module (guix build utils)
- #:use-module (srfi srfi-34)
- #:use-module (ice-9 format)
#:export (svn-fetch))
;;; Commentary:
@@ -39,33 +36,20 @@
(password #f))
"Fetch REVISION from URL into DIRECTORY. REVISION must be an integer, and a
valid Subversion revision. Return #t on success, #f otherwise."
- (mkdir-p directory)
-
- (guard (c ((invoke-error? c)
- (format (current-error-port)
- "svn-fetch: '~a~{ ~a~}' failed with exit code ~a~%"
- (invoke-error-program c)
- (invoke-error-arguments c)
- (or (invoke-error-exit-status c)
- (invoke-error-stop-signal c)
- (invoke-error-term-signal c)))
- (delete-file-recursively directory)
- #f))
- (with-directory-excursion directory
- (apply invoke svn-command
- "export" "--non-interactive"
- ;; 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)))
+ (apply invoke svn-command
+ "export" "--non-interactive"
+ ;; 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