GNU bug report logs -
#27296
Modular Texlive
Previous Next
Reported by: Ricardo Wurmus <rekado <at> elephly.net>
Date: Fri, 9 Jun 2017 10:44:01 UTC
Severity: important
Done: Ricardo Wurmus <rekado <at> elephly.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* guix/svn-download.scm (download-svn-to-store): New procedure.
---
guix/svn-download.scm | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/guix/svn-download.scm b/guix/svn-download.scm
index c1200fa0c..c118869af 100644
--- a/guix/svn-download.scm
+++ b/guix/svn-download.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha <at> totakura.in>
+;;; Copyright © 2017 Ricardo Wurmus <rekado <at> elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,12 +24,15 @@
#:use-module (guix store)
#:use-module (guix monads)
#:use-module (guix packages)
+ #:use-module (guix utils)
+ #:use-module ((guix build svn) #:prefix build:)
#:use-module (ice-9 match)
#:export (svn-reference
svn-reference?
svn-reference-url
svn-reference-revision
- svn-fetch))
+ svn-fetch
+ download-svn-to-store))
;;; Commentary:
;;;
@@ -79,4 +83,21 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f."
#:guile-for-build guile
#:local-build? #t)))
+(define* (download-svn-to-store store ref
+ #:optional (name (basename (svn-reference-url ref)))
+ #:key (log (current-error-port)))
+ "Download from REF, a <svn-reference> object to STORE. Write progress
+reports to LOG."
+ (call-with-temporary-directory
+ (lambda (temp)
+ (let ((result
+ (parameterize ((current-output-port log))
+ (build:svn-fetch (svn-reference-url ref)
+ (svn-reference-revision ref)
+ temp
+ #:user-name (svn-reference-user-name ref)
+ #:password (svn-reference-password ref)))))
+ (and result
+ (add-to-store store name #t "sha256" temp))))))
+
;;; svn-download.scm ends here
--
2.12.2
This bug report was last modified 8 years and 32 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.