diff mbox

[2/5] core/pkg-generic: call MESSAGE when saving package legal-info

Message ID 606d7f78d9c7e1af1c1fd1b72ab489853d230f70.1498428166.git.yann.morin.1998@free.fr
State Accepted
Headers show

Commit Message

Yann E. MORIN June 25, 2017, 10:03 p.m. UTC
Currently, the per-package legal-info is mostly silent, but we're soon
to add a check for the hashes of the license files.

In that case, and when there is a hash mis-match, we want a user to know
what package had a changed license file.

So, we add a call to MESSAGE to display the package we're currently
saving the legal-info of, like so:

    >>> busybox 1.26.2 Collecting legal info

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Rahul Bedarkar <rahulbedarkar89@gmail.com>
---
 package/pkg-generic.mk | 2 ++
 1 file changed, 2 insertions(+)

Comments

Peter Korsgaard July 3, 2017, 3:59 p.m. UTC | #1
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Currently, the per-package legal-info is mostly silent, but we're soon
 > to add a check for the hashes of the license files.

 > In that case, and when there is a hash mis-match, we want a user to know
 > what package had a changed license file.

 > So, we add a call to MESSAGE to display the package we're currently
 > saving the legal-info of, like so:

 >>>> busybox 1.26.2 Collecting legal info

I wonder if we still need the general "Collecting legal info" message,
as it now looks something like:

>>>   Collecting legal info
>>> toolchain-buildroot  Collecting legal info
>>> host-gcc-final 6.3.0 Collecting legal info
>>> host-binutils 2.27 Collecting legal info
>>> host-gmp 6.1.2 Collecting legal info

Though, with the entire patch series applied it might be handy to match
the warnings, E.G.:

>>>   Collecting legal info
WARNING: no hash file for COPYING
>>> toolchain-buildroot  Collecting legal info

Presumably this warning is from legal-info-prepare. I'm not sure exactly
how we should get rid of this warning? A buildroot.hash with an entry
for our COPYING?

That can be fixed later though - Committed, thanks.
diff mbox

Patch

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index f474704980..22330edc5b 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -835,7 +835,9 @@  endif
 endif
 
 # legal-info: produce legally relevant info.
+$(1)-legal-info: PKG=$(2)
 $(1)-legal-info:
+	@$$(call MESSAGE,"Collecting legal info")
 # Packages without a source are assumed to be part of Buildroot, skip them.
 	$$(foreach hook,$$($(2)_PRE_LEGAL_INFO_HOOKS),$$(call $$(hook))$$(sep))
 ifneq ($$(call qstrip,$$($(2)_SOURCE)),)