[OE-core] Configurable host name

Phil Blundell philb at gnu.org
Wed Aug 8 09:30:35 UTC 2012


On Wed, 2012-08-08 at 09:13 +0100, Burton, Ross wrote:
> My proposal would be to add something like HOSTNAME ?= "$MACHINE" to
> default-distrovars.inc, and changing base-files to write the hostname
> file in a new task using something like addtask hostname after
> do_rootfs.

Adding a new global variable does have a certain cost associated with
it, since this ends up in the metadata for every single recipe.  Ideally
we want to try to avoid doing that for things that are only really used
in one place.

I suspect that most distros are probably going to want to do at least
some customisation of base-files anyway (if they use the recipe from
oe-core at all) so this doesn't seem like it ought to be a big deal for
them. 

And, any distros that do use base-files from oe-core and don't (want to)
have a .bbappend for it can already override the hostname fairly
trivially by putting:

hostname_pn-base-files = "my-distro-rocks"

in their config files.  So it doesn't seem to me that there is any real
problem to be solved here.

p.






More information about the Openembedded-core mailing list