From 36341854dfedc3d173d09e686ffc3e255c102b01 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 30 Dec 2013 22:19:19 +0100 Subject: pk-crypto: Work around Libgcrypt bug . * guix/pk-crypto.scm (canonical-sexp-fold): Call 'nth-data' before 'nth' to work around . * tests/pk-crypto.scm ("https://bugs.g10code.com/gnupg/issue1594"): New test. --- guix/pk-crypto.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'guix') diff --git a/guix/pk-crypto.scm b/guix/pk-crypto.scm index 0e7affcce8..cf18faea04 100644 --- a/guix/pk-crypto.scm +++ b/guix/pk-crypto.scm @@ -298,8 +298,11 @@ return #f if not found." (if (= index len) result (loop (+ 1 index) - (proc (or (canonical-sexp-nth sexp index) - (canonical-sexp-nth-data sexp index)) + ;; XXX: Call 'nth-data' *before* 'nth' to work around + ;; , which + ;; affects 1.6.0 and earlier versions. + (proc (or (canonical-sexp-nth-data sexp index) + (canonical-sexp-nth sexp index)) result))))) (error "sexp is not a list" sexp))) -- cgit v1.2.3