From 54237556bab42ad0d451af1f466b011ba201385a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 11 Jan 2022 17:32:45 +0100 Subject: ui: 'package->recutils' can split the "system:" line. Previously, long system lines would not be split, which would confuse 'less', possibly leading it to hide the first line of the package recutils record (the "name:" line). * guix/ui.scm (package->recutils)[split-lines]: New procedure. [dependencies->recutils]: Use it. Use it for the "systems:" value. --- guix/ui.scm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'guix') diff --git a/guix/ui.scm b/guix/ui.scm index 251a3a4ab9..fc6f44e9ea 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès +;;; Copyright © 2012-2022 Ludovic Courtès ;;; Copyright © 2013, 2018 Mark H Weaver ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2014 Cyril Roelandt @@ -1514,13 +1514,15 @@ HYPERLINKS? is true, emit hyperlink escape sequences when appropriate." ;; the initial "+ " prefix. (if (> width 2) (- width 2) width)) + (define (split-lines str indent) + (string->recutils + (fill-paragraph str width* indent))) + (define (dependencies->recutils packages) (let ((list (string-join (delete-duplicates (map package-full-name (sort packages packagerecutils - (fill-paragraph list width* - (string-length "dependencies: "))))) + (split-lines list (string-length "dependencies: ")))) (define (package