Bug 10173 - Suggested clarification of the OVERRIDES glossary entry
Summary: Suggested clarification of the OVERRIDES 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:17 UTC by ulfalizer
Modified: 2016-09-01 18:08 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:17:06 UTC
Hello again,

OVERRIDES (and overrides in general) is a bit tersely documented at the moment. Here's a suggestion for a new version that includes some examples, mentions standard override-related variables, and explains the _pn-${PN} override:

  OVERRIDES:
    A colon-separated list of overrides that currently apply. Overrides are a
    BitBake mechanism that allows variables to be selectively overridden at the
    end of parsing. The set of overrides in OVERRIDES is meant to represent
    the "state" during building, including the current recipe being built, the
    machine it is being built for, etc.
    
    As an example, if the string "an-override" appears as an element in the
    colon-separated list in OVERRIDES, then the following assignment will
    override FOO with the value "overridden" at the end of parsing:
  
      FOO_an-override = "overridden"
  
    See the "Conditional Syntax (Overrides)" section of the BitBake User Manual
    for more information on the overrides mechanism.
  
    The default value of OVERRIDES includes the values of the [CLASSOVERRIDE],
    [MACHINEOVERRIDES], and [DISTROOVERRIDES] variables. Another important
    override included by default is pn-${PN}. This override allows variables
    to be set for a single recipe within configuration (.conf) files, like in
    the following example:
  
      FOO_pn-myrecipe = "myrecipe-specific value"
  
    An easy way to see what overrides apply is to search for OVERRIDES in the
    output of
    [bitbake -e](http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#usingpoky-debugging-viewing-variable-values).


In addition, the following note could be added to the end of the PREFERRED_VERSION glossary entry:

  Note {
  The _forcevariable override is not handled specially. It only works because
  the default value of [OVERRIDES] includes "forcevariable".
  }


Cheers,
Ulf
Comment 1 Scott Rifenbark 2016-09-01 17:58:45 UTC
Ulf, 

See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-OVERRIDES for updated OVERRIDES description in the glossary.

Also, see http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-PREFERRED_VERSION for the new note suggested.

Thanks, 
Scott
Comment 2 ulfalizer 2016-09-01 18:03:00 UTC
Hello,

I think there's a missing "it" here:

  The set of overrides in OVERRIDES represents the "state" during building,
  which includes the current recipe being built, the machine for which <it> is
  being built, and so forth.

Looks fine other than that.

Thanks,
Ulf
Comment 3 Scott Rifenbark 2016-09-01 18:08:26 UTC
Arghh.. I seem to be dropping words... sorry.

Fixed - see http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-OVERRIDES

Setting to RESOLVED and putting the doc flag to "done."

Scott