Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] common/xbps-src/shutils/show.sh: display `$license` one-per-line
@ 2022-12-12  6:25 classabbyamp
  2022-12-15 20:50 ` meator
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: classabbyamp @ 2022-12-12  6:25 UTC (permalink / raw)
  To: ml

[-- 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-12-19  0:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-12  6:25 [PR PATCH] common/xbps-src/shutils/show.sh: display `$license` one-per-line classabbyamp
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

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).