From f249af3086ce420d73feb385a4120f15210285fd Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 31 Dec 2020 15:50:48 +0100 Subject: import/elpa: Abort early on failure to fetch meta data. * guix/import/elpa.scm (elpa->guix-package): Raise condition instead of returning #FALSE. * guix/scripts/import/elpa.scm (guix-import-elpa): Handle conditions when importing recursively. --- guix/import/elpa.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'guix/import/elpa.scm') diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index 8922e57840..1d586acab6 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ludovic Courtès ;;; Copyright © 2018 Oleg Pykhalov ;;; Copyright © 2020 Martin Becze +;;; Copyright © 2020 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +30,8 @@ #:use-module (srfi srfi-9 gnu) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) #:use-module ((guix download) #:select (download-to-store)) #:use-module (guix import utils) #:use-module (guix http-client) @@ -392,7 +395,12 @@ type ''." (define* (elpa->guix-package name #:key (repo 'gnu) version) "Fetch the package NAME from REPO and produce a Guix package S-expression." (match (fetch-elpa-package name repo) - (#f #f) + (#false + (raise (condition + (&message + (message (format #false + "couldn't find meta-data for ELPA package `~a'." + name)))))) (package ;; ELPA is known to contain only GPLv3+ code. Other repos may contain ;; code under other license but there's no license metadata. -- cgit v1.2.3