GNU bug report logs -
#69328
[PATCH 00/12] Better source code recovery from SWH
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Fri, 23 Feb 2024 14:46:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Fixes <https://issues.guix.gnu.org/43442>.
* guix/svn-download.scm (svn-fetch)[build]: Add
‘swh-download-directory-by-nar-hash’ call as a last resort.
Import (guix swh).
* guix/svn-download.scm (svn-multi-fetch)[build]: Likewise.
Change-Id: Ifcb9be1e9c2b05ce172c44e45dcf3a3ea6df8e76
---
guix/svn-download.scm | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/guix/svn-download.scm b/guix/svn-download.scm
index c6688908de..ed1379a09e 100644
--- a/guix/svn-download.scm
+++ b/guix/svn-download.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014-2016, 2019, 2021-2023 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2014-2016, 2019, 2021-2024 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha <at> totakura.in>
;;; Copyright © 2017, 2019, 2021 Ricardo Wurmus <rekado <at> elephly.net>
;;;
@@ -94,12 +94,14 @@ (define* (svn-fetch ref hash-algo hash
(with-imported-modules
(source-module-closure '((guix build svn)
(guix build download-nar)
- (guix build utils)))
+ (guix build utils)
+ (guix swh)))
(with-extensions (list guile-json guile-gnutls ;for (guix swh)
guile-lzlib)
#~(begin
(use-modules (guix build svn)
(guix build download-nar)
+ (guix swh)
(ice-9 match))
(or (svn-fetch (getenv "svn url")
@@ -111,7 +113,10 @@ (define* (svn-fetch ref hash-algo hash
(_ #f))
#:user-name (getenv "svn user name")
#:password (getenv "svn password"))
- (download-nar #$output))))))
+ (download-nar #$output)
+ (parameterize ((%verify-swh-certificate? #f))
+ (swh-download-directory-by-nar-hash #$hash '#$hash-algo
+ #$output)))))))
(mlet %store-monad ((guile (package->derivation guile system)))
(gexp->derivation (or name "svn-checkout") build
@@ -174,13 +179,15 @@ (define* (svn-multi-fetch ref hash-algo hash
(with-imported-modules
(source-module-closure '((guix build svn)
(guix build download-nar)
- (guix build utils)))
+ (guix build utils)
+ (guix swh)))
(with-extensions (list guile-json guile-gnutls ;for (guix swh)
guile-lzlib)
#~(begin
(use-modules (guix build svn)
(guix build utils)
(guix build download-nar)
+ (guix swh)
(srfi srfi-1)
(ice-9 match))
@@ -206,7 +213,10 @@ (define* (svn-multi-fetch ref hash-algo hash
(begin
(when (file-exists? #$output)
(delete-file-recursively #$output))
- (download-nar #$output)))))))
+ (or (download-nar #$output)
+ (parameterize ((%verify-swh-certificate? #f))
+ (swh-download-directory-by-nar-hash
+ #$hash '#$hash-algo #$output)))))))))
(mlet %store-monad ((guile (package->derivation guile system)))
(gexp->derivation (or name "svn-checkout") build
--
2.41.0
This bug report was last modified 1 year and 102 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.