From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] common/xbps-src/shutils/show.sh: display `$license` one-per-line
Date: Mon, 12 Dec 2022 07:25:36 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41032@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1027 bytes --]
There is a new pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages license-show
https://github.com/void-linux/void-packages/pull/41032
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
```
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
A patch file from https://github.com/void-linux/void-packages/pull/41032.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-license-show-41032.patch --]
[-- Type: text/x-diff, Size: 1469 bytes --]
From 9860b7cf81b1a5b104b37f2b09c6ff3875571806 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
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
next reply other threads:[~2022-12-12 6:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-12 6:25 classabbyamp [this message]
2022-12-15 20:50 ` meator
2022-12-15 21:52 ` meator
2022-12-15 21:55 ` classabbyamp
2022-12-16 3:29 ` [PR PATCH] [Updated] " classabbyamp
2022-12-16 3:44 ` [PR REVIEW] common/xbps-src/shutils/show.sh: make show display consistent CameronNemo
2022-12-16 3:45 ` classabbyamp
2022-12-16 3:46 ` [PR PATCH] [Updated] " classabbyamp
2022-12-16 3:49 ` [PR REVIEW] " CameronNemo
2022-12-16 3:51 ` [PR PATCH] [Updated] " classabbyamp
2022-12-16 4:26 ` CameronNemo
2022-12-19 0:27 ` [PR PATCH] [Merged]: " classabbyamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41032@inbox.vuxu.org \
--to=classabbyamp@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).