From a8792bc7962c3aeaba66ed810901fcfd96ed3603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 23 Jan 2023 18:20:41 +0100 Subject: [PATCH] import: opam: Do not crash when description is missing. Previous 'guix import opam coccinelle' would crash due to the lack of a description. * guix/import/opam.scm (opam->guix-package): Call 'beautify-description' only when "description" metadata is available. --- guix/import/opam.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/import/opam.scm b/guix/import/opam.scm index 29b2b886bf..938a88f69d 100644 --- a/guix/import/opam.scm +++ b/guix/import/opam.scm @@ -382,8 +382,8 @@ (define* (opam->guix-package name #:key (repo 'opam) version #:allow-other-keys) ,(list 'quasiquote `((upstream-name . ,name)))))) (home-page ,(metadata-ref opam-content "homepage")) (synopsis ,(metadata-ref opam-content "synopsis")) - (description ,(beautify-description - (metadata-ref opam-content "description"))) + (description ,(and=> (metadata-ref opam-content "description") + beautify-description)) (license ,(spdx-string->license (metadata-ref opam-content "license")))) (filter