Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@openwide.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/6 RFC] core/pkg-generic: allow packages to exclude files when extracting
Date: Sat, 3 Oct 2015 16:46:09 +0200	[thread overview]
Message-ID: <560FEA31.2080404@openwide.fr> (raw)
In-Reply-To: <419c992b5ee60036fd6e601f421e92f0ebadffe1.1441233378.git.yann.morin.1998@free.fr>

Hi Yann,

Le 03/09/2015 00:51, Yann E. MORIN a ?crit :
> Currently, packages that need to exclude parts of the archives when
> extracting (e.g. to gain space), like gcc or toolchain-external, have to
> provide custom extract commands, just for the sake of adding a bunch of
> --exclude directives when calling tar.
> 
> Add a new variable that packages may set, to provide a space-separated
> list of patterns to exclude.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

Reviewed-by: Romain Naour <romain.naour@openwide.fr>

Best regards,
Romain

> ---
>  docs/manual/adding-packages-generic.txt | 4 ++++
>  package/pkg-generic.mk                  | 5 ++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt
> index 4c12b42..e7a473c 100644
> --- a/docs/manual/adding-packages-generic.txt
> +++ b/docs/manual/adding-packages-generic.txt
> @@ -312,6 +312,10 @@ information is (assuming the package name is +libfoo+) :
>    that have more than one leading component to strip, set this
>    variable with the value to be passed to tar. Default: 1.
>  
> +* +LIBFOO_EXCLUDES+ is a space-separated list of patterns to exclude
> +  when extracting the archive. Each item from that list is passed as
> +  a tar's +--exclude+ option. By default, empty.
> +
>  * +LIBFOO_DEPENDENCIES+ lists the dependencies (in terms of package
>    name) that are required for the current target package to
>    compile. These dependencies are guaranteed to be compiled and
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 6a7d97e..d1877a7 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -476,7 +476,10 @@ $(2)_TARGET_DIRCLEAN =		$$($(2)_DIR)/.stamp_dircleaned
>  # default extract command
>  $(2)_EXTRACT_CMDS ?= \
>  	$$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $$(DL_DIR)/$$($(2)_SOURCE) | \
> -	$$(TAR) --strip-components=$$($(2)_STRIP_COMPONENTS) -C $$($(2)_DIR) $$(TAR_OPTIONS) -)
> +	$$(TAR) --strip-components=$$($(2)_STRIP_COMPONENTS) \
> +		-C $$($(2)_DIR) \
> +		$$(foreach x,$$($(2)_EXCLUDES),--exclude='$$(x)' ) \
> +		$$(TAR_OPTIONS) -)
>  
>  # pre/post-steps hooks
>  $(2)_PRE_DOWNLOAD_HOOKS         ?=
> 

  reply	other threads:[~2015-10-03 14:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02 22:51 [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds) Yann E. MORIN
2015-09-02 22:51 ` [Buildroot] [PATCH 1/6 RFC] core/pkg-generic: allow packages to exclude files when extracting Yann E. MORIN
2015-10-03 14:46   ` Romain Naour [this message]
2015-09-02 22:51 ` [Buildroot] [PATCH 2/6 RFC] core/pkg-generic: always dereference hardlinks from archives Yann E. MORIN
2015-09-02 22:51 ` [Buildroot] [PATCH 3/6 RFC] package/gcc: use generic extract commands Yann E. MORIN
2015-10-03 14:49   ` Romain Naour
2015-09-02 22:51 ` [Buildroot] [PATCH 4/6 RFC] toolchain/external: use generic extract commands (!blackfin case) Yann E. MORIN
2015-10-03 14:55   ` Romain Naour
2015-09-02 22:51 ` [Buildroot] [PATCH 5/6 RFC] toolchain/external: use generic extract commands (blackfin case) Yann E. MORIN
2015-10-03 14:55   ` Romain Naour
2015-09-02 22:52 ` [Buildroot] [PATCH 6/6 RFC] Add support for MIPS Codescape MTI GNU Linux toolchain Yann E. MORIN
2015-09-03 14:06   ` Vicente Olivert Riera
2015-10-03 14:58   ` Romain Naour
2015-10-03 13:31 ` [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds) Romain Naour
2015-10-03 14:06   ` Arnout Vandecappelle

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=560FEA31.2080404@openwide.fr \
    --to=romain.naour@openwide.fr \
    --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