diff mbox series

package/pkg-utils: add missing licensing data to show-info

Message ID 20240127163807.233065-1-yann.morin.1998@free.fr
State Accepted
Headers show
Series package/pkg-utils: add missing licensing data to show-info | expand

Commit Message

Yann E. MORIN Jan. 27, 2024, 4:38 p.m. UTC
While the list of licenses is present in the show-info output, the list
of license files and the redistributable status were missing. Add them.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 package/pkg-utils.mk | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Thomas Petazzoni Feb. 5, 2024, 9:39 p.m. UTC | #1
On Sat, 27 Jan 2024 17:38:07 +0100
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> While the list of licenses is present in the show-info output, the list
> of license files and the redistributable status were missing. Add them.
> 
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> ---
>  package/pkg-utils.mk | 4 ++++
>  1 file changed, 4 insertions(+)

Applied to master, thanks.

Thomas
Peter Korsgaard Feb. 29, 2024, 3:42 p.m. UTC | #2
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > On Sat, 27 Jan 2024 17:38:07 +0100
 > "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

 >> While the list of licenses is present in the show-info output, the list
 >> of license files and the redistributable status were missing. Add them.
 >> 
 >> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
 >> ---
 >> package/pkg-utils.mk | 4 ++++
 >> 1 file changed, 4 insertions(+)

 > Applied to master, thanks.

Committed to 2023.02.x and 2023.11.x, thanks.
diff mbox series

Patch

diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index 059e86ae0a..723bbe4e24 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -157,6 +157,10 @@  endef
 define _json-info-pkg-details
 	"version": $(call mk-json-str,$($(1)_DL_VERSION)),
 	"licenses": $(call mk-json-str,$($(1)_LICENSE)),
+	"license_files": [
+		$(foreach f, $($(1)_LICENSE_FILES),$(call mk-json-str,$(f))$(comma))
+	],
+	"redistributable": $(if $(filter NO,$($(1)_REDISTRIBUTE)),false,true),
 	"dl_dir": $(call mk-json-str,$($(1)_DL_SUBDIR)),
 	"downloads": [
 	$(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)),