All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Kory Maincent <kory.maincent@bootlin.com>
Cc: buildroot@buildroot.org,
	Giulio Benetti <giulio.benetti@benettiengineering.com>,
	Romain Naour <romain.naour@gmail.com>
Subject: Re: [Buildroot] [PATCH 1/5] toolchain-external: Fix license file management after toolchain move
Date: Wed, 28 May 2025 18:40:47 +0200	[thread overview]
Message-ID: <20250528184047.3564a9db@windsurf> (raw)
In-Reply-To: <20250528-fix_license_toolchain-v1-1-34295630709b@bootlin.com>

On Wed, 28 May 2025 16:57:58 +0200
Kory Maincent <kory.maincent@bootlin.com> wrote:

> The toolchain move to TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR was
> preventing license file management from working properly. Copy license
> files back to the original toolchain directory to resolve this issue.
> 
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
>  toolchain/toolchain-external/pkg-toolchain-external.mk | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
> index c08bf0a653..13d196a1c9 100644
> --- a/toolchain/toolchain-external/pkg-toolchain-external.mk
> +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
> @@ -106,6 +106,11 @@ define TOOLCHAIN_EXTERNAL_MOVE
>  	rm -rf $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
>  	mkdir -p $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
>  	mv $(@D)/* $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)/
> +	# Copy back the license files needed for legal-info generation
> +	$(foreach f, $($(PKG)_LICENSE_FILES), \
> +		[[ -d $$(dirname $(@D)/$(f)) ]] || mkdir -p $$(dirname $(@D)/$(f))
> +		cp $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)/$(f) $(@D)/$(f)
> +	)

I am wondering if this is the right solution. The fact that we move
everything from $(@D) to $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR) is
kind of weird. For all packages we don't "move" things from $(@D) to
the installation location, we rather copy stuff.

Should we do the same here? Maybe with hard links so that we don't pay
the full price of the copy?

	rsync -a --hard-link --link-dest=$(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR) $(@D)

or something like this? Of course, then we should change the name of
the macro :-)

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2025-05-28 16:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-28 14:57 [Buildroot] [PATCH 0/5] Add support for license files for external toolchain Kory Maincent via buildroot
2025-05-28 14:57 ` [Buildroot] [PATCH 1/5] toolchain-external: Fix license file management after toolchain move Kory Maincent via buildroot
2025-05-28 16:40   ` Thomas Petazzoni via buildroot [this message]
2025-06-02 15:02     ` Kory Maincent via buildroot
2025-05-28 14:57 ` [Buildroot] [PATCH 2/5] toolchain-external-bootlin: Add support for license file description Kory Maincent via buildroot
2025-05-28 14:58 ` [Buildroot] [PATCH 3/5] toolchain-external-linaro*: " Kory Maincent via buildroot
2025-05-28 16:46   ` Thomas Petazzoni via buildroot
2025-06-02 14:49     ` Kory Maincent via buildroot
2025-10-06 13:18       ` Kory Maincent via buildroot
2025-05-28 14:58 ` [Buildroot] [PATCH 4/5] toolchain-external-arm*: " Kory Maincent via buildroot
2025-05-28 14:58 ` [Buildroot] [PATCH 5/5] toolchain-external-codesourcery-mips: " Kory Maincent via buildroot

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=20250528184047.3564a9db@windsurf \
    --to=buildroot@buildroot.org \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=kory.maincent@bootlin.com \
    --cc=romain.naour@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.