[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
113/137: guix: download-multi-svn-to-store: Allow exporting from base UR
From: |
guix-commits |
Subject: |
113/137: guix: download-multi-svn-to-store: Allow exporting from base URL. |
Date: |
Mon, 24 Jun 2024 18:27:26 -0400 (EDT) |
ngz pushed a commit to branch tex-team
in repository guix.
commit 0709868ff24f0b91380659269d7d4678bc9b5a5a
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Sun Jun 23 17:29:37 2024 +0200
guix: download-multi-svn-to-store: Allow exporting from base URL.
* guix/svn-download.scm (download-multi-svn-to-store): Allow exporting from
locations such as "./" or "somefile.txt".
Change-Id: If37362e4672b175fe413acc56ed67064ad998fe3
---
guix/svn-download.scm | 40 ++++++++++++++++++++++++----------------
1 file changed, 24 insertions(+), 16 deletions(-)
diff --git a/guix/svn-download.scm b/guix/svn-download.scm
index 62649e4374..b20cdc79d1 100644
--- a/guix/svn-download.scm
+++ b/guix/svn-download.scm
@@ -351,21 +351,29 @@ reports to LOG."
reports to LOG."
(call-with-temporary-directory
(lambda (temp)
- (and (every (lambda (location)
- (let ((dir (string-append temp "/" (dirname location))))
- (mkdir-p dir))
- (parameterize ((current-output-port log))
- (build:svn-fetch (string-append (svn-multi-reference-url
ref)
- "/" location)
- (svn-multi-reference-revision ref)
- (if (string-suffix? "/" location)
- (string-append temp "/" location)
- (string-append temp "/" (dirname
location)))
- #:recursive?
- (svn-multi-reference-recursive? ref)
- #:user-name
(svn-multi-reference-user-name ref)
- #:password (svn-multi-reference-password
ref))))
- (svn-multi-reference-locations ref))
- (add-to-store store name #t "sha256" temp)))))
+ ;; When "svn" is called, TEMP already exists. As a consequence, "svn"
+ ;; refuses to export files there, assuming it would overwrite a previous
+ ;; export. It can be an issue if locations includes files at SVN URL.
+ ;; To circumvent this, export in a fresh sub-directory.
+ (let ((output (string-append temp "/svn")))
+ (mkdir-p output)
+ (and (every (lambda (location)
+ (unless (string-suffix? "/" location)
+ (mkdir-p (string-append output "/" (dirname location))))
+ (parameterize ((current-output-port log))
+ (build:svn-fetch
+ (string-append (svn-multi-reference-url ref)
+ "/"
+ location)
+ (svn-multi-reference-revision ref)
+ (if (string-suffix? "/" location)
+ (string-append output "/" location)
+ (string-append output "/" (dirname location)))
+ #:recursive?
+ (svn-multi-reference-recursive? ref)
+ #:user-name (svn-multi-reference-user-name ref)
+ #:password (svn-multi-reference-password ref))))
+ (svn-multi-reference-locations ref))
+ (add-to-store store name #t "sha256" output))))))
;;; svn-download.scm ends here
- 122/137: gnu: texlive-amstex: Create missing symlink., (continued)
- 122/137: gnu: texlive-amstex: Create missing symlink., guix-commits, 2024/06/24
- 88/137: gnu: Set version of all TeX Live packages to "2023.0"., guix-commits, 2024/06/24
- 133/137: gnu: texlive-jadetex: Small refactoring., guix-commits, 2024/06/24
- 83/137: guix: import texlive: Remove `files-differ?' function., guix-commits, 2024/06/24
- 92/137: gnu: Factorize URLs relative to TeX Live., guix-commits, 2024/06/24
- 93/137: gnu: Refactor TeX Live packages to refer to SVN directly., guix-commits, 2024/06/24
- 108/137: gnu: texlive-blockdraw-mp: Specify upstream name., guix-commits, 2024/06/24
- 101/137: gnu: texlive-newverbs: Do not create origin for "ydocstrip.tex"., guix-commits, 2024/06/24
- 109/137: gnu: texlive-kfsh-nat: Specify upstream name., guix-commits, 2024/06/24
- 111/137: gnu: tex: Set properties to protect inputs during updates., guix-commits, 2024/06/24
- 113/137: guix: download-multi-svn-to-store: Allow exporting from base URL.,
guix-commits <=
- 118/137: gnu: texlive-r-und-s: Specify upstream name., guix-commits, 2024/06/24
- 119/137: gnu: texlive-pstricks-calcnotes: Specify upstream name., guix-commits, 2024/06/24
- 120/137: gnu: texlive-ec: Remove reference to TeX Live version in license., guix-commits, 2024/06/24
- 123/137: gnu: texlive-csplain: Create missing symlinks., guix-commits, 2024/06/24
- 125/137: gnu: texlive-lollipop: Create missing symlink., guix-commits, 2024/06/24
- 126/137: gnu: texlive-mex: Create missing symlinks., guix-commits, 2024/06/24
- 127/137: gnu: texlive-mltex: Create missing symlinks., guix-commits, 2024/06/24
- 129/137: gnu: texlive-platex: Create missing symlink., guix-commits, 2024/06/24
- 131/137: gnu: texlive-texsis: Create missing symlink., guix-commits, 2024/06/24
- 136/137: gnu: texlive-luajittex-bin: Skip build on ppc64le and riscv64 architectures., guix-commits, 2024/06/24