All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 1/5] package: refactor listing of extractor dependencies
Date: Tue, 14 Feb 2017 14:42:34 +0100	[thread overview]
Message-ID: <CAAXf6LXFZbgxn_hBHRwL_ciDxnd=F+ZizLyCqBYgGqdK+=WgiQ@mail.gmail.com> (raw)
In-Reply-To: <0f0805c9d18137c555b446d6b6e7dd2c68d6e770.1486930542.git.baruch@tkos.co.il>

On Sun, Feb 12, 2017 at 9:15 PM, Baruch Siach <baruch@tkos.co.il> wrote:
> Don't special case $(XZCAT) when constructing DL_TOOLS_DEPENDENCIES. The next
> commit will introduce another extractor that automatically builds when not
> installed. Introduce EXTRACTOR_DEPENDENCY_PRECHECKED_EXTENSIONS that lists
> archive extensions for which the extractor is already checked in
> support/dependencies/check-host-foo.mk. Use this in the newly introduced
> extractor-dependency to populate DL_TOOLS_DEPENDENCIES.
>
> Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> v3: new patch; split from the next as preparatory cleanup (Thomas DS)
> ---
>  package/pkg-generic.mk                   | 8 +-------
>  package/pkg-utils.mk                     | 7 +++++++
>  support/dependencies/check-host-xzcat.mk | 1 +
>  3 files changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 3ca71b03b9df..e8a8021e3c37 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -926,13 +926,7 @@ else ifeq ($$($(2)_SITE_METHOD),cvs)
>  DL_TOOLS_DEPENDENCIES += cvs
>  endif # SITE_METHOD
>
> -# $(firstword) is used here because the extractor can have arguments, like
> -# ZCAT="gzip -d -c", and to check for the dependency we only want 'gzip'.
> -# Do not add xzcat to the list of required dependencies, as it gets built
> -# automatically if it isn't found.
> -ifneq ($$(call suitable-extractor,$$($(2)_SOURCE)),$$(XZCAT))
> -DL_TOOLS_DEPENDENCIES += $$(firstword $$(call suitable-extractor,$$($(2)_SOURCE)))
> -endif
> +DL_TOOLS_DEPENDENCIES += $$(call extractor-dependency,$$($(2)_SOURCE))
>
>  # Ensure all virtual targets are PHONY. Listed alphabetically.
>  .PHONY:        $(1) \
> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> index c5d4080c72f4..4821456da5b0 100644
> --- a/package/pkg-utils.mk
> +++ b/package/pkg-utils.mk
> @@ -45,6 +45,13 @@ INFLATE.tar  = cat
>  # suitable-extractor(filename): returns extractor based on suffix
>  suitable-extractor = $(INFLATE$(suffix $(1)))
>
> +# extractor-dependency(filename): returns extractor for 'filename' if the
> +# extractor is a dependency. If we build the extractor return nothing.
> +# $(firstword) is used here because the extractor can have arguments, like
> +# ZCAT="gzip -d -c", and to check for the dependency we only want 'gzip'.
> +extractor-dependency = $(firstword$(INFLATE$(filter-out \

There needs to be a space after 'firstword', otherwise this gets
expanded to $(firstword.gz) for example, which is empty.

With that fixed:

Reviewed-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>

  parent reply	other threads:[~2017-02-14 13:42 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-12 20:15 [Buildroot] [PATCH v3 1/5] package: refactor listing of extractor dependencies Baruch Siach
2017-02-12 20:15 ` [Buildroot] [PATCH v3 2/5] package: add generic support for lz archives Baruch Siach
2017-02-14 13:43   ` Thomas De Schampheleire
2017-02-15 21:15   ` Thomas Petazzoni
2017-02-15 22:48     ` Arnout Vandecappelle
2017-02-16  7:32       ` Thomas Petazzoni
2017-02-16  8:25         ` Arnout Vandecappelle
2017-02-16  8:34           ` Thomas Petazzoni
2017-02-16 17:24             ` Arnout Vandecappelle
2017-02-16 17:41       ` Yann E. MORIN
2017-02-16 22:03         ` Peter Korsgaard
2017-02-16 22:11           ` Yann E. MORIN
2017-02-17  7:43             ` Arnout Vandecappelle
2017-02-17 17:07               ` Yann E. MORIN
2017-02-16 22:08       ` Peter Korsgaard
2017-02-16  8:36     ` Thomas De Schampheleire
2017-02-16  8:40       ` Thomas Petazzoni
2017-02-16 10:24         ` Thomas De Schampheleire
2017-02-21 21:55   ` [Buildroot] Bug in "package: add generic support for lz archives" ? Thomas Petazzoni
2017-02-22  5:32     ` Baruch Siach
2017-02-22  8:03       ` Thomas Petazzoni
2017-02-12 20:15 ` [Buildroot] [PATCH v3 3/5] ed: use generic extract command Baruch Siach
2017-02-12 20:15 ` [Buildroot] [PATCH v3 4/5] ddrescue: " Baruch Siach
2017-02-12 20:15 ` [Buildroot] [PATCH v3 5/5] ocrad: " Baruch Siach
2017-02-14 13:42 ` Thomas De Schampheleire [this message]
2017-02-14 21:39 ` [Buildroot] [PATCH v3 1/5] package: refactor listing of extractor dependencies Thomas Petazzoni
2017-02-15  7:04   ` Baruch Siach
2017-02-15 21:13 ` Thomas Petazzoni

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='CAAXf6LXFZbgxn_hBHRwL_ciDxnd=F+ZizLyCqBYgGqdK+=WgiQ@mail.gmail.com' \
    --to=patrickdepinguin@gmail.com \
    --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 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.