Bug 10174 - Suggested rewriting of the CLASSOVERRIDE glossary entry
Summary: Suggested rewriting of the CLASSOVERRIDE glossary entry
Status: RESOLVED FIXED
Alias: None
Product: Reference
Classification: Documentation
Component: handbook (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2 M4
Assignee: Scott Rifenbark
QA Contact:
URL:
Whiteboard: 01 Sept 2016: RESOLVED
Depends on:
Blocks:
 
Reported: 2016-08-23 13:22 UTC by ulfalizer
Modified: 2016-09-01 19:27 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Done (doc changes complete)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ulfalizer 2016-08-23 13:22:44 UTC
...to include another example, explain where CLASSOVERRIDE is set, add some notes, and link back to OVERRIDES:

  CLASSOVERRIDE:
    An internal variable specifying the special class override
    that should currently apply (e.g. "class-target", "class-native", and so
    forth). The classes that use this variable (e.g. [native.bbclass],
    [nativesdk.bbclass], and so forth) set it to appropriate values.
  
    Note {
    CLASSOVERRIDE gets its default "class-target" value from bitbake.conf.
    }
  
    As an example, the following override allows you to install extra files,
    but only when building for the target:
  
      do_install_append_class-target() {
          install my-extra-file ${D}${sysconfdir}
      }
  
    Here is an example where "python-native" is added to DEPENDS, but only when
    building for the build host:
  
      DEPENDS_append_class-native = " python-native"
  
    The underlying mechanism behind CLASSOVERRIDE is simply that is it included
    in the default value of [OVERRIDES].


Cheers,
Ulf
Comment 1 Scott Rifenbark 2016-09-01 18:36:28 UTC
Ulf, 

See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-CLASSOVERRIDE

Thanks,
Scott
Comment 2 ulfalizer 2016-09-01 18:51:21 UTC
Looks good to me.

Thanks,
Ulf
Comment 3 ulfalizer 2016-09-01 18:58:39 UTC
Hmz... on a second thought, maybe it would be better if there was an example that did a straight assignment instead of using _append.

Could the second example (the DEPENDS one) be replaced with the following?

  Here is an example where FOO is set to "native" when building for the
  build host, and to "other" otherwise:

   FOO_class-native = "native"
   FOO = "other"


Cheers,
Ulf
Comment 4 ulfalizer 2016-09-01 18:59:18 UTC
(You could close right away if you're fine with that change btw. :)
Comment 5 Scott Rifenbark 2016-09-01 19:27:40 UTC
Ulf, 

I put it in but not verbatim.  Look at the sentence right before the new example.  I hope you are okay with that.  http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-CLASSOVERRIDE

Thanks,
Scott

<setting to RESOLVED and clearing the doc flag.  If you don't like my re-wording just send me another comment on here.>