Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Ceresoli <luca@lucaceresoli.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 11/51] core/legal-info: add package version to license directory
Date: Thu, 3 Dec 2015 18:17:29 +0100	[thread overview]
Message-ID: <56607929.9050504@lucaceresoli.net> (raw)
In-Reply-To: <11dbe139facc8db195d221126c0d69da8ed6bc4d.1448289515.git.yann.morin.1998@free.fr>

Dear Yann,

Yann E. MORIN wrote:
> Now that we save the source archives in a directory named after the
> package and its version, do the same for the license files, for
> consistency.
>
> It has a not-so-bad side-effect of also saving the version string in
> the all-licenses list.
>
> The only (small) drawback, is that the warnings about undefined
> _LICENSE_FILES now contains the version string, too. That's unavoidable,
> since that's what is stored in the legal report.

Is it a drawback at all? I don't think so.

>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> ---
>   package/pkg-generic.mk | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index bb3a6da..07ff820 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -791,10 +791,10 @@ ifneq ($$(call qstrip,$$($(2)_SOURCE)),)
>   # is that the license still applies to the files distributed as part
>   # of the rootfs, even if the sources are not themselves redistributed.
>   ifeq ($$(call qstrip,$$($(2)_LICENSE_FILES)),)
> -	@$$(call legal-license-nofiles,$$($(2)_RAWNAME),$$(call UPPERCASE,$(4)))
> -	@$$(call legal-warning-pkg,$$($(2)_RAWNAME),cannot save license ($(2)_LICENSE_FILES not defined))
> +	@$$(call legal-license-nofiles,$$($(2)_RAWNAME)-$$($(2)_VERSION),$$(call UPPERCASE,$(4)))
> +	@$$(call legal-warning-pkg,$$($(2)_RAWNAME)-$$($(2)_VERSION),cannot save license ($(2)_LICENSE_FILES not defined))
>   else
> -	@$$(foreach F,$$($(2)_LICENSE_FILES),$$(call legal-license-file,$$($(2)_RAWNAME),$$(F),$$($(2)_DIR)/$$(F),$$(call UPPERCASE,$(4)))$$(sep))
> +	@$$(foreach F,$$($(2)_LICENSE_FILES),$$(call legal-license-file,$$($(2)_RAWNAME)-$$($(2)_VERSION),$$(F),$$($(2)_DIR)/$$(F),$$(call UPPERCASE,$(4)))$$(sep))

Mmh, you're computing "$$($(2)_RAWNAME)-$$($(2)_VERSION)" three times
in a few lines. And it's also computed elsewhere:

package/pkg-generic.mk:156:$(BUILD_DIR)/%/.stamp_patched: NAMEVER = 
$(RAWNAME)-$($(PKG)_VERSION)
package/pkg-generic.mk:427:  $(2)_SOURCE                        ?= 
$$($(2)_RAWNAME)-$$($(2)_VERSION).tar.gz
package/pkg-generic.mk:485:$(2)_REDIST_SOURCES_DIR = 
$$(REDIST_SOURCES_DIR_$$(call 
UPPERCASE,$(4)))/$$($(2)_RAWNAME)-$$($(2)_VERSION)
package/pkg-generic.mk:821:     @$$(call 
legal-manifest,$$($(2)_RAWNAME),$$($(2)_VERSION),$$($(2)_LICENSE),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_ACTUAL_SOURCE_SITE),$$(call 
UPPERCASE,$(4)))

We should compute it once and store it in a new per-package variable.

BTW, I tested this patch and it works, but I'd like to give my
"Tested-by" tag after you do these changes, thanks.

-- 
Luca

  reply	other threads:[~2015-12-03 17:17 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 14:48 [Buildroot] [PATCH 0/51] legal-info: unassorted improvements and fixes (branch yem/legal) Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 01/51] core/pkg-autotools: align host configure commands to target one Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 02/51] package/gcc: comment on why we override the generic configure commands Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 03/51] package/gcc: align gcc-final configure-cmds to the generic ones Yann E. MORIN
2015-12-03 17:10   ` Luca Ceresoli
2015-11-23 14:47 ` [Buildroot] [PATCH 04/51] core/pkg-generic: add macro to hardlink-or-copy Yann E. MORIN
2015-11-23 17:15   ` Luca Ceresoli
2015-11-23 14:47 ` [Buildroot] [PATCH 05/51] core/legal-info: use the macro to install source archives Yann E. MORIN
2015-11-23 17:18   ` Luca Ceresoli
2015-11-23 17:21     ` Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 06/51] package/perl: include perl-cross in the legal-info output Yann E. MORIN
2015-11-23 17:25   ` Luca Ceresoli
2015-11-23 17:58     ` Yann E. MORIN
2015-11-23 20:24   ` Thomas Petazzoni
2015-11-23 21:23     ` Yann E. MORIN
2015-12-03 17:11       ` Luca Ceresoli
2015-12-03 18:37         ` Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 07/51] core: add a global variable with already-unquoted global patch dir Yann E. MORIN
2015-11-23 16:18   ` Thomas Petazzoni
2015-11-23 16:30     ` Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 08/51] core/legal-info: allow ignoring packages from the legal-info Yann E. MORIN
2015-11-23 20:26   ` Thomas Petazzoni
2015-11-24 22:05     ` Peter Korsgaard
2015-12-03 17:12       ` Luca Ceresoli
2015-12-03 18:36         ` Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 09/51] core/pkg-virtual: ignore from legal-info output Yann E. MORIN
2015-12-03 17:13   ` Luca Ceresoli
2015-11-23 14:47 ` [Buildroot] [PATCH 10/51] core/legal-info: install source archives in their own sub-dir Yann E. MORIN
2015-12-03 17:16   ` Luca Ceresoli
2015-12-03 17:25     ` Luca Ceresoli
2015-11-23 14:47 ` [Buildroot] [PATCH 11/51] core/legal-info: add package version to license directory Yann E. MORIN
2015-12-03 17:17   ` Luca Ceresoli [this message]
2015-12-03 18:41     ` Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 12/51] core/apply-patches: store full path of applied patches Yann E. MORIN
2015-12-03 17:18   ` Luca Ceresoli
2015-12-03 18:52     ` Yann E. MORIN
2015-12-04 12:02       ` Luca Ceresoli
2015-11-23 14:47 ` [Buildroot] [PATCH 13/51] core/legal-info: also save patches Yann E. MORIN
2015-12-03 17:19   ` Luca Ceresoli
2015-11-23 14:47 ` [Buildroot] [PATCH 14/51] core/legal-info: update the legal-info report header Yann E. MORIN
2015-12-03 17:21   ` Luca Ceresoli
2015-12-03 18:53     ` Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 15/51] core/legal-info: ensure legal-info works in off-line mode Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 16/51] toolchain/external: add hash for Arago actual sources Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 17/51] core/legal-info: generate a hash of all saved files Yann E. MORIN
2015-12-03 17:24   ` Luca Ceresoli
2015-12-03 19:11     ` Yann E. MORIN
2015-12-04 11:40       ` Luca Ceresoli
2015-11-23 14:47 ` [Buildroot] [PATCH 18/51] package/gcc: add a patch for arc rather than using sed Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 19/51] package/gcc: simplify setting GCC_SOURCE Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 20/51] pacakge/gcc: rename all variables as it is a host-only package Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 21/51] package/gcc: prefix all common variables with HOST_GCC_COMMON_ Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 22/51] package/gcc: rename the common files Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 23/51] package/gcc: rename gcc-final into plain gcc Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 24/51] package/gcc-initial: ignore from legal-info output Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 25/51] package/gcc: add licensing info for host variant Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 26/51] package/gcc: create the ./configure symlink as a post-patch hook Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 27/51] pacakge/gcc: drop custom patch command Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 28/51] core: include arch-specific definitions Yann E. MORIN
2015-11-23 14:47 ` [Buildroot] [PATCH 29/51] arch/xtensa: add definitions for the Xtensa overlay Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 30/51] package/binutils: use the Xtensa variables Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 31/51] package/gdb: " Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 32/51] package/gcc: " Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 33/51] arch/xtensa: add macro to extract the overlay Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 34/51] package/binutils: use macro to extract Xtensa overlay Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 35/51] package/gdb: " Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 36/51] package/gcc: " Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 37/51] arch/xtensa: add macro to install legal-info Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 38/51] pacage/gcc: use macro to install Xtensa overlay legal-info Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 39/51] package/binutils: " Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 40/51] package/gdb: " Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 41/51] package/binutils: extract Xtensa overlay as post-extract hook Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 42/51] package/gdb: " Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 43/51] arch/xtensa: add macros to generate hooks Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 44/51] package/binutils: use the Xtensa macro generators Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 45/51] package/gdb: " Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 46/51] package/gcc: " Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 47/51] arc/xtensa: get rid of an intermediate blind kconfig option Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 48/51] arch/xtensa: allow specifying path to tarball file Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 49/51] arch/xtensa: accept the overlay to be compressed Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 50/51] arch/xtensa: accept the overlay to be an URL Yann E. MORIN
2015-11-23 20:35   ` Thomas Petazzoni
2015-11-23 21:28     ` Yann E. MORIN
2015-11-23 14:48 ` [Buildroot] [PATCH 51/51] configs/qemu-xtensa: use overlay from the github repository Yann E. MORIN
2015-11-23 20:22 ` [Buildroot] [PATCH 0/51] legal-info: unassorted improvements and fixes (branch yem/legal) Thomas Petazzoni
2015-11-23 21:09   ` Yann E. MORIN

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=56607929.9050504@lucaceresoli.net \
    --to=luca@lucaceresoli.net \
    --cc=buildroot@busybox.net \
    /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