Subject: Re: bug#53548: [PATCH] Harden beautify-description

From: Ludovic Courtès <[email-masked]>
Date: Tue, 08 Feb 2022 10:51:51 +0100

Hi!

Alice BRENON <[email-masked]> skribis:

> From cfb57a40a90bfc31d1b846f3e981469285f1bd7b Mon Sep 17 00:00:00 2001
> From: Alice BRENON <[email-masked]>
> Date: Wed, 26 Jan 2022 09:27:12 +0100
> Subject: [PATCH] guix: import: Harden beautify-description.
>
> * guix/import/utils.scm (beautify-description): Handle non-string
> arguments.
> [use-modules]: Explicitly import G_ from (guix i18n) and make (guix ui)
> import explicit.
> * guix/import/opam.scm: [use-modules] Make imports explicit for module
> (guix import utils).

Applied.

I removed extra space from the message, as shown below.

Thanks!

Ludo’.

diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 934b224bec..9cadbb3d5f 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -244,8 +244,8 @@ (define* (beautify-description description #:optional (length 80))
 LENGTH characters."
   (let ((cleaned (cond
                   ((not (string? description))
-                   (G_ "This package lacks a description.  Run \"info '(guix)
-                       Synopses and Descriptions'\" for more information."))
+                   (G_ "This package lacks a description.  Run \
+\"info '(guix) Synopses and Descriptions'\" for more information."))
                   ((string-prefix? "A " description)
                    (string-append "This package provides a"
                                   (substring description 1)))