All of lore.kernel.org
 help / color / mirror / Atom feed
* Configurable host name
@ 2012-08-08  8:13 Burton, Ross
  2012-08-08  9:30 ` Phil Blundell
  0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2012-08-08  8:13 UTC (permalink / raw)
  To: OE-core

Hi,

I think that the current hostname setting of $MACHINE (unless you
override base-files and change $hostname there) is too restrictive.
Distributions should be able to override it easily (i.e. adding a
distro-specific prefix) and individuals should also be able to change
it in local.conf (i.e. assigning a real-world name, i.e. beagle or
zbox).

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.

This is entirely untested but opinions (especially "you're wrong" or
"there's a better way") welcome.

Ross



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Configurable host name
  2012-08-08  8:13 Configurable host name Burton, Ross
@ 2012-08-08  9:30 ` Phil Blundell
  2012-08-08 12:09   ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Phil Blundell @ 2012-08-08  9:30 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Configurable host name
  2012-08-08  9:30 ` Phil Blundell
@ 2012-08-08 12:09   ` Burton, Ross
  2012-08-08 13:36     ` Chris Larson
  0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2012-08-08 12:09 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 8 August 2012 10:30, Phil Blundell <philb@gnu.org> wrote:
> hostname_pn-base-files = "my-distro-rocks"

Aha.  I was looking at the hostname variable in there and wondering if
it could be overridden.  That satisfies my itch for now, considering
the drawback of causing everything to rebuild if a global variable
were changed.

Thanks,
Ross



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Configurable host name
  2012-08-08 12:09   ` Burton, Ross
@ 2012-08-08 13:36     ` Chris Larson
  2012-08-08 13:50       ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Larson @ 2012-08-08 13:36 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, Aug 8, 2012 at 5:09 AM, Burton, Ross <ross.burton@intel.com> wrote:
> On 8 August 2012 10:30, Phil Blundell <philb@gnu.org> wrote:
>> hostname_pn-base-files = "my-distro-rocks"
>
> Aha.  I was looking at the hostname variable in there and wondering if
> it could be overridden.  That satisfies my itch for now, considering
> the drawback of causing everything to rebuild if a global variable
> were changed.

To clarify, changing a global variable doesn't cause everything to
rebuild. As was pointed out, it ends up in all the metadata for all
the recipes, but that doesn't mean it ends up in the task checksums.
The metadata checksumming tracks variable dependencies, and will only
rebuild the tasks which use the variable, directly or indirectly. Now,
*exported* variables are a rather different beast, but that's not what
we're talking about here.

Note that I'm not arguing in favor of adding another global variable,
but I did want to make sure you understand the actual behavior of the
system in this regard.
-- 
Christopher Larson



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Configurable host name
  2012-08-08 13:36     ` Chris Larson
@ 2012-08-08 13:50       ` Burton, Ross
  0 siblings, 0 replies; 5+ messages in thread
From: Burton, Ross @ 2012-08-08 13:50 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 8 August 2012 14:36, Chris Larson <clarson@kergoth.com> wrote:
> To clarify, changing a global variable doesn't cause everything to
> rebuild. As was pointed out, it ends up in all the metadata for all
> the recipes, but that doesn't mean it ends up in the task checksums.
> The metadata checksumming tracks variable dependencies, and will only
> rebuild the tasks which use the variable, directly or indirectly. Now,
> *exported* variables are a rather different beast, but that's not what
> we're talking about here.

Ah, the checksuming isn't as aggressive as I suspected.  Thanks.

Ross



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-08 14:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-08  8:13 Configurable host name Burton, Ross
2012-08-08  9:30 ` Phil Blundell
2012-08-08 12:09   ` Burton, Ross
2012-08-08 13:36     ` Chris Larson
2012-08-08 13:50       ` Burton, Ross

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.