diff --git a/gnu/packages.scm b/gnu/packages.scm index 7f0b58b..57a3e21 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -30,6 +30,8 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) #:use-module (srfi srfi-39) #:export (search-patch search-bootstrap-binary @@ -70,13 +72,23 @@ %load-path))) (define (search-patch file-name) - "Search the patch FILE-NAME." - (search-path (%patch-path) file-name)) + "Search the patch FILE-NAME. Raise an error if not found." + (or (search-path (%patch-path) file-name) + (raise (condition + (&message (message (format #f (_ "~a: patch not found") + file-name))))))) (define (search-bootstrap-binary file-name system) - "Search the bootstrap binary FILE-NAME for SYSTEM." - (search-path (%bootstrap-binaries-path) - (string-append system "/" file-name))) + "Search the bootstrap binary FILE-NAME for SYSTEM. Raise an error if not +found." + (or (search-path (%bootstrap-binaries-path) + (string-append system "/" file-name)) + (raise (condition + (&message + (message + (format #f (_ "could not find bootstrap binary '~a' \ +for system '~a'") + file-name system))))))) (define %distro-root-directory ;; Absolute file name of the module hierarchy.