From 9860b7cf81b1a5b104b37f2b09c6ff3875571806 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Mon, 12 Dec 2022 01:21:29 -0500 Subject: [PATCH] common/xbps-src/shutils/show.sh: display `$license` one-per-line previously, if there was a newline in `$license`, it would not format properly in `xbps-src show`. This fixes it by splitting it by word and removing commas and displaying it like some other variables. fixes #40996 Example: ``` $ ./xbps-src show keepassxc pkgname: keepassxc ... License(s): GPL-3.0-or-later License(s): BSD-3-Clause License(s): CC0-1.0 License(s): LGPL-2.0-only License(s): LGPL-2.1-only License(s): LGPL-3.0-or-later License(s): Nokia-Qt-exception-1.1 License(s): MIT License(s): BSL-1.0 ``` --- common/xbps-src/shutils/show.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/xbps-src/shutils/show.sh b/common/xbps-src/shutils/show.sh index d781d07aae86..f16ae24e5697 100644 --- a/common/xbps-src/shutils/show.sh +++ b/common/xbps-src/shutils/show.sh @@ -17,7 +17,9 @@ show_pkg() { done echo "maintainer: $maintainer" [ -n "$homepage" ] && echo "Upstream URL: $homepage" - [ -n "$license" ] && echo "License(s): $license" + for i in ${license//,/}; do + [ -n "$i" ] && echo "License(s): $i" + done [ -n "$changelog" ] && echo "Changelog: $changelog" [ -n "$build_style" ] && echo "build_style: $build_style" for i in $build_helper; do