Openembedded Core Discussions
 help / color / mirror / Atom feed
* purpose of variables like "base_bindir_native"?
@ 2016-11-30 11:34 Robert P. J. Day
  2016-12-01  3:51 ` Khem Raj
  2016-12-01 10:24 ` Richard Purdie
  0 siblings, 2 replies; 3+ messages in thread
From: Robert P. J. Day @ 2016-11-30 11:34 UTC (permalink / raw)
  To: OE Core mailing list


  i'm putting together a tutorial on the structure of the native
sysroot and how it's built and variables involved, and was poking
around in both bitbake.conf and native.bbclass, and i'm curious about
one or two things.

  i could be totally wrong but it *seems* like there's native-related
content in bitbake.conf that could be moved over to native.bbclass to
reduce a little of the clutter. i'm perusing bitbake.conf and it's
hard to keep track of some of the variables just because there's both
native- and target- related settings in there. but i'll admit i
haven't finished my inspection.

  on a more specific note, in the entire oe-core layer, there are two
references to the variable "base_bindir_native" (formatted for
aesthetics):

$ grep -rw base_bindir_native *
meta/conf/bitbake.conf:base_bindir_native = "/bin"
meta/conf/bitbake.conf:PATH_prepend =
 "${COREBASE}/scripts:i
 ${STAGING_BINDIR_TOOLCHAIN}:
 ${STAGING_BINDIR_CROSS}:
 ${STAGING_DIR_NATIVE}${sbindir_native}:
 ${STAGING_BINDIR_NATIVE}:
 ${STAGING_DIR_NATIVE}${base_sbindir_native}:
 ${STAGING_DIR_NATIVE}${base_bindir_native}:"      <----- there

  so, given that that variable is set in bitbake.conf, and is only
referenced in that same file, what's the point of making it a
variable? doesn't hurt, of course, but when i see a variable, i
normally assume it's because it might be modified later somewhere, but
i don't see that happening here. is there a reason for it? same thing
could be said for "base_sbindir_native" as well.

  thoughts?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================




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

* Re: purpose of variables like "base_bindir_native"?
  2016-11-30 11:34 purpose of variables like "base_bindir_native"? Robert P. J. Day
@ 2016-12-01  3:51 ` Khem Raj
  2016-12-01 10:24 ` Richard Purdie
  1 sibling, 0 replies; 3+ messages in thread
From: Khem Raj @ 2016-12-01  3:51 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list


> On Nov 30, 2016, at 3:34 AM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> 
> 
>  i'm putting together a tutorial on the structure of the native
> sysroot and how it's built and variables involved, and was poking
> around in both bitbake.conf and native.bbclass, and i'm curious about
> one or two things.
> 
>  i could be totally wrong but it *seems* like there's native-related
> content in bitbake.conf that could be moved over to native.bbclass to
> reduce a little of the clutter. i'm perusing bitbake.conf and it's
> hard to keep track of some of the variables just because there's both
> native- and target- related settings in there. but i'll admit i
> haven't finished my inspection.
> 
>  on a more specific note, in the entire oe-core layer, there are two
> references to the variable "base_bindir_native" (formatted for
> aesthetics):
> 
> $ grep -rw base_bindir_native *
> meta/conf/bitbake.conf:base_bindir_native = "/bin"
> meta/conf/bitbake.conf:PATH_prepend =
> "${COREBASE}/scripts:i
> ${STAGING_BINDIR_TOOLCHAIN}:
> ${STAGING_BINDIR_CROSS}:
> ${STAGING_DIR_NATIVE}${sbindir_native}:
> ${STAGING_BINDIR_NATIVE}:
> ${STAGING_DIR_NATIVE}${base_sbindir_native}:
> ${STAGING_DIR_NATIVE}${base_bindir_native}:"      <----- there
> 
>  so, given that that variable is set in bitbake.conf, and is only
> referenced in that same file, what's the point of making it a
> variable? doesn't hurt, of course, but when i see a variable, i
> normally assume it's because it might be modified later somewhere, but
> i don't see that happening here. is there a reason for it? same thing
> could be said for "base_sbindir_native" as well.
> 
>  thoughts?

you could modify it if you wished to then you just change one var in local
metadata

> 
> rday
> 
> -- 
> 
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                        http://crashcourse.ca
> 
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
> 
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



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

* Re: purpose of variables like "base_bindir_native"?
  2016-11-30 11:34 purpose of variables like "base_bindir_native"? Robert P. J. Day
  2016-12-01  3:51 ` Khem Raj
@ 2016-12-01 10:24 ` Richard Purdie
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2016-12-01 10:24 UTC (permalink / raw)
  To: Robert P. J. Day, OE Core mailing list

On Wed, 2016-11-30 at 06:34 -0500, Robert P. J. Day wrote:
>   i'm putting together a tutorial on the structure of the native
> sysroot and how it's built and variables involved, and was poking
> around in both bitbake.conf and native.bbclass, and i'm curious about
> one or two things.
> 
>   i could be totally wrong but it *seems* like there's native-related
> content in bitbake.conf that could be moved over to native.bbclass to
> reduce a little of the clutter. i'm perusing bitbake.conf and it's
> hard to keep track of some of the variables just because there's both
> native- and target- related settings in there. but i'll admit i
> haven't finished my inspection.
> 
>   on a more specific note, in the entire oe-core layer, there are two
> references to the variable "base_bindir_native" (formatted for
> aesthetics):
> 
> $ grep -rw base_bindir_native *
> meta/conf/bitbake.conf:base_bindir_native = "/bin"
> meta/conf/bitbake.conf:PATH_prepend =
>  "${COREBASE}/scripts:i
>  ${STAGING_BINDIR_TOOLCHAIN}:
>  ${STAGING_BINDIR_CROSS}:
>  ${STAGING_DIR_NATIVE}${sbindir_native}:
>  ${STAGING_BINDIR_NATIVE}:
>  ${STAGING_DIR_NATIVE}${base_sbindir_native}:
>  ${STAGING_DIR_NATIVE}${base_bindir_native}:"      <----- there
> 
>   so, given that that variable is set in bitbake.conf, and is only
> referenced in that same file, what's the point of making it a
> variable? doesn't hurt, of course, but when i see a variable, i
> normally assume it's because it might be modified later somewhere,
> but
> i don't see that happening here. is there a reason for it? same thing
> could be said for "base_sbindir_native" as well.
> 
>   thoughts?

Its really for consistency. We don't hardcode the other path
relationships and whilst that one is a minority, we've clearly decided
not to hardcode it either. The fact its not widely used compared to
some of its relatives is not really the point.

If we did hardcode it, I can imagine the question about why it wasn't
parametrised ;-).

Cheers,

Richard


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

end of thread, other threads:[~2016-12-01 10:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-30 11:34 purpose of variables like "base_bindir_native"? Robert P. J. Day
2016-12-01  3:51 ` Khem Raj
2016-12-01 10:24 ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox