[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/14: import: utils: Harden beautify-description.
From: |
guix-commits |
Subject: |
01/14: import: utils: Harden beautify-description. |
Date: |
Tue, 8 Feb 2022 07:36:50 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 6207da50e2fe919b36b40bf9aac6e6f1e60401a8
Author: Alice BRENON <alice.brenon@ens-lyon.fr>
AuthorDate: Wed Jan 26 09:27:12 2022 +0100
import: utils: 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).
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
guix/import/opam.scm | 8 ++++++--
guix/import/utils.scm | 7 ++++++-
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/guix/import/opam.scm b/guix/import/opam.scm
index a6f6fe8c9f..f569c921b1 100644
--- a/guix/import/opam.scm
+++ b/guix/import/opam.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
-;;; Copyright © 2021 Alice Brenon <alice.brenon@ens-lyon.fr>
+;;; Copyright © 2021, 2022 Alice Brenon <alice.brenon@ens-lyon.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -42,7 +42,11 @@
#:use-module ((guix utils) #:select (cache-directory
version>?
call-with-temporary-output-file))
- #:use-module (guix import utils)
+ #:use-module ((guix import utils) #:select (beautify-description
+ guix-hash-url
+ recursive-import
+ spdx-string->license
+ url-fetch))
#:use-module ((guix licenses) #:prefix license:)
#:export (opam->guix-package
opam-recursive-import
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 1c3cfa3e0b..9cadbb3d5f 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
+;;; Copyright © 2022 Alice Brenon <alice.brenon@ens-lyon.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,10 +38,11 @@
#:use-module (guix discovery)
#:use-module (guix build-system)
#:use-module (guix gexp)
+ #:use-module ((guix i18n) #:select (G_))
#:use-module (guix store)
#:use-module (guix download)
#:use-module (guix sets)
- #:use-module (guix ui)
+ #:use-module ((guix ui) #:select (fill-paragraph))
#:use-module (gnu packages)
#:use-module (ice-9 match)
#:use-module (ice-9 rdelim)
@@ -241,6 +243,9 @@ with dashes."
a proper sentence and by using two spaces between sentences, and wrap lines at
LENGTH characters."
(let ((cleaned (cond
+ ((not (string? description))
+ (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)))
- branch master updated (35d56676db -> 4be896d6e0), guix-commits, 2022/02/08
- 11/14: gnu: iwd: Remove reference to %outputs., guix-commits, 2022/02/08
- 07/14: gnu: Deprecate the 'g-golf' variable., guix-commits, 2022/02/08
- 09/14: gnu: nomad: Depends on proper version of g-golf., guix-commits, 2022/02/08
- 06/14: gnu: g-golf: Update to 0.0.1-1010-1824633., guix-commits, 2022/02/08
- 13/14: gnu: ell: Remove input labels., guix-commits, 2022/02/08
- 14/14: gnu: iwd: Update to 1.24., guix-commits, 2022/02/08
- 02/14: gnu: Add bloomberg-bde-tools., guix-commits, 2022/02/08
- 08/14: gnu: Add guile2.2-g-golf., guix-commits, 2022/02/08
- 12/14: gnu: iwd: Build from Git sources., guix-commits, 2022/02/08
- 01/14: import: utils: Harden beautify-description.,
guix-commits <=
- 04/14: gnu: Add emacs-spray., guix-commits, 2022/02/08
- 03/14: gnu: Add bloomberg-bde., guix-commits, 2022/02/08
- 05/14: gnu: Fix typo., guix-commits, 2022/02/08
- 10/14: gnu: iwd: Remove input labels., guix-commits, 2022/02/08