Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] Package overriding
Date: Fri, 22 Mar 2013 18:26:58 +0100	[thread overview]
Message-ID: <514C9462.9000404@mind.be> (raw)
In-Reply-To: <CAE21AQraBRp3_94Td_Gw+D9NML+-X0e+2U=cwR979ww99_aJ=w@mail.gmail.com>

On 18/03/13 03:33, Charles Manning wrote:
[snip]
> For example, I recently needed to add two more configuration lines to
> building bluez_utils.
>
> Instead of:
>
> BLUEZ_UTILS_CONF_OPT = --enable-test --enable-tools
> I wanted
> BLUEZ_UTILS_CONF_OPT = --enable-test --enable-tools --enable-bccmd --enable-dund
>
>
> A logical way I can see to do this would be to have a mechanism
> similar to Package Override but that is applied after the packages are
> parsed.
>
> --- Makefile	(revision 20385)
> +++ Makefile	(working copy)
> @@ -319,11 +319,20 @@
>   -include $(PACKAGE_OVERRIDE_FILE)
>   endif
>
>   include package/*/*.mk
>   include hj/package/*/*.mk
>   include boot/common.mk
>   include linux/linux.mk
>
> +POST_PACKAGE_OVERRIDE_FILE=$(call qstrip,$(BR2_POST_PACKAGE_OVERRIDE_FILE))
> +ifneq ($(POST_PACKAGE_OVERRIDE_FILE),)
> +-include $(POST_PACKAGE_OVERRIDE_FILE)
> +endif
> +
> +
>
> Then have POST_PACKAGE_OVERRIDE_FILE point to a file which has
>
> # Add bluez_utils options we need
> BLUEZ_UTILS_CONF_OPT +=  --enable-bccmd --enable-dund
>
> Does that sound useful?

  The problem with this approach is that it is not reliable. It _happens_ 
to work fine for _CONF_OPT. But it would not work for _DEPENDENCIES, for 
example, because the rule that consumes that variable comes before it. 
And probably there are some variables where it doesn't work at all 
because of some weird double-dollar stuff.

  That's why we just don't want to deal with this kind of changes. The 
override file is meant to be a development tool that allows you to hack 
the source code for a package. For other stuff, you should modify the 
package's .mk file directly.


> Is there a better way?

  In this particular case, the better way is to create new Config.in 
options for bccmd and dund. And send us the patch, of course.


  Regards,
  Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

      parent reply	other threads:[~2013-03-22 17:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18  2:33 [Buildroot] Package overriding Charles Manning
2013-03-18  9:08 ` Thomas Petazzoni
2013-03-18 20:28   ` Charles Manning
2013-03-22 17:26 ` Arnout Vandecappelle [this message]

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=514C9462.9000404@mind.be \
    --to=arnout@mind.be \
    --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