summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-28 22:40:32 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-28 22:40:32 -0400
commit438a0de332fc09d9ba14d7c989af9c17ca9c6be2 (patch)
tree869ee142cd19a803ce4d1e33d69d0d85f3be5a44 /guix
parente5ae499f4c91508123edae3df29afa94c6ef33ae (diff)
parentd00f1075077e55a3c2c750b3dd41be2a09eff530 (diff)
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'guix')
-rw-r--r--guix/build/syscalls.scm5
-rw-r--r--guix/lint.scm5
-rw-r--r--guix/substitutes.scm10
3 files changed, 17 insertions, 3 deletions
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index df9b9f6ac7..d947b010d3 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -970,7 +970,10 @@ backend device."
(string->pointer key)
(string->pointer "")
0)))
- (cond ((< size 0) #f)
+ (cond ((< size 0)
+ (throw 'system-error "getxattr" "~S: ~A"
+ (list file key (strerror err))
+ (list err)))
((zero? size) "")
;; Get VALUE in buffer of SIZE. XXX actual size can race.
(else (let*-values (((buf) (make-bytevector size))
diff --git a/guix/lint.scm b/guix/lint.scm
index 3ed7fd6e4d..9eece374ff 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2013-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
@@ -1485,6 +1485,9 @@ the NIST server non-fatal."
(package-version package))))
((force lookup) name version)))))
+;; Prevent Guile 3 from inlining this procedure so we can mock it in tests.
+(set! package-vulnerabilities package-vulnerabilities)
+
(define* (check-vulnerabilities package
#:optional (package-vulnerabilities
package-vulnerabilities))
diff --git a/guix/substitutes.scm b/guix/substitutes.scm
index 84c7be83ca..e732096933 100644
--- a/guix/substitutes.scm
+++ b/guix/substitutes.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2021, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2018 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2020 Christopher Baines <mail@cbaines.net>
@@ -35,6 +35,7 @@
#:select ((open-connection-for-uri
. guix:open-connection-for-uri)
resolve-uri-reference))
+ #:autoload (gnutls) (error->string error/premature-termination)
#:use-module (guix progress)
#:use-module (ice-9 match)
#:use-module (ice-9 format)
@@ -152,6 +153,13 @@ indicates that PATH is unavailable at CACHE-URL."
(strerror
(system-error-errno `(system-error ,@args)))))
#f)
+ (('gnutls-error error proc . rest)
+ (if (eq? error error/premature-termination)
+ (begin
+ (warning (G_ "~a: TLS connection failed: in ~a: ~a~%") host
+ proc (error->string error))
+ #f)
+ (apply throw 'gnutls-error error proc rest)))
(args
(apply throw args)))))