All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] pkg-generic: error out with 'local' site method and no _SITE
Date: Wed, 23 May 2018 10:22:31 +0200	[thread overview]
Message-ID: <20180523102231.59ec69df@windsurf> (raw)
In-Reply-To: <20180523063138.11717-1-arnout@mind.be>

Hello,

On Wed, 23 May 2018 08:31:38 +0200, Arnout Vandecappelle
(Essensium/Mind) wrote:
> The 'local' site method is easily confused with the 'file' site method,
> making people create packages like this:
> 
>     FOO_SITE_METHOD = local
>     FOO_SOURCE = foo.tar.gz
> 
>     $(eval $(generic-package))
> 
> Due to the intricacies of the generic package infra, this does not
> cause an error; instead, the foo.tar.gz tarball that happens to be
> present in the download directory will be used. This behaviour differs
> greatly from what is specified in the manual.
> 
> Instead, error out immediately if a package specifies the 'local' site
> method but does not specify a _SITE.
> 
> We check for _OVERRIDE_SRCDIR rather than checking for _SITE, just
> after _OVERRIDE_SRCDIR has been set to _SITE. Indeed, a package that
> sets _OVERRIDE_SRCDIR but not _SITE currently works correctly. There is
> no reason to make it fail.
> 
> See also
> https://stackoverflow.com/questions/50364655/including-patches-to-build-root
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
> v2: explain in commit message why we check for _OVERRIDE_SRCDIR
> ---
>  package/pkg-generic.mk | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 8a3b5f90a9..988f2d34e3 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -520,6 +520,9 @@ ifeq ($$($(2)_SITE_METHOD),local)
>  ifeq ($$($(2)_OVERRIDE_SRCDIR),)
>  $(2)_OVERRIDE_SRCDIR = $$($(2)_SITE)
>  endif
> +ifeq ($$($(2)_OVERRIDE_SRCDIR),)
> +$$(error $(1) has local site method, but `$(2)_SITE_METHOD` is not defined)

I still don't understand the error message, and it doesn't match your
commit log. The commit log says:

""
Instead, error out immediately if a package specifies the 'local' site
method but does not specify a _SITE.
""

but your error message says "$(2)_SITE_METHOD" is not defined.

I believe the message should be:

$$(error $(1) has local site method, but `$(2)_SITE` is not defined)

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-05-23  8:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23  6:31 [Buildroot] [PATCH v2] pkg-generic: error out with 'local' site method and no _SITE Arnout Vandecappelle
2018-05-23  8:22 ` Thomas Petazzoni [this message]
2018-05-23  9:00   ` 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=20180523102231.59ec69df@windsurf \
    --to=thomas.petazzoni@bootlin.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.