Bug 6912

Summary: icecc INHERIT_DISTRO doesn't work
Product: [Documentation] Reference Reporter: Peter Bergin <petan679>
Component: handbookAssignee: Scott Rifenbark <srifenbark>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Low CC: bluelightning, poky.doc.watcher, poky.watcher
Version: 1.6.1   
Target Milestone: 1.8   
Hardware: All   
OS: Multiple   
Whiteboard: 30 January 2015: RESOLVED
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description Peter Bergin 2014-10-29 22:17:24 UTC
I follow the instructions for icecc.bbclass in chapter 7.45 and I can not get it working.

The manual states that I on a distribution level can add the following:

    INHERIT_DISTRO += "icecc"
    ICECC_DISABLED ??= "1"

This will make sure my builders use the same sstate signatures regardless if they use icecc or not. The way I did it to test was to create my own distro layer, called mydist, that inherits from Poky.

    $ cat ../meta-mydist/conf/distro/mydist.conf

    require conf/distro/poky.conf

    DISTRO = "mydist"
    DISTRO_NAME = "MyDist"

    INHERIT_DISTRO += "icecc"
    ICECC_DISABLED ??= "1"

In my bblayers.conf I added this layer directly after the meta-yocto layer. But with this addition my build environment will not work anymore. What happens is that the variable INHERIT_DISTRO is overwritten because my layer is picked before the poky/meta/conf/distro/defaultsetup.conf. I get the same behaviour if i edit the poky.conf and not use my own distro.

    $ bitbake core-image-base -e

    ...

    #
    # $INHERIT_DISTRO [3 operations]
    #   append /work/yocto/course/meta-mydist/conf/distro/mydist.conf:6
    #     "icecc"
    #   set? /work/yocto/course/poky/meta/conf/distro/defaultsetup.conf:22
    #     "debian devshell sstate license"
    #   set /work/yocto/course/poky/meta/conf/documentation.conf:226
    #     [doc] "Lists classes that will be inherited at the distribution level. It is unlikely that you want to edit this variable."
    # computed:
    #   " icecc"
    INHERIT_DISTRO=" icecc"
    #

    ...

I would like some clarification about how to add the icecc on distro level and make it working.
Comment 1 Paul Eggleton 2014-10-30 15:19:13 UTC
Martin would you be able to help advise on how we should adjust the documentation here?
Comment 2 Martin Jansa 2015-01-21 12:20:58 UTC
(In reply to comment #1)
> Martin would you be able to help advise on how we should adjust the
> documentation here?

setting INHERIT_DISTRO value isn't specific to icecc

INHERIT_DISTRO_append = " icecc"

should work if you're setting it in config file parsed before defaultsetup.conf (immediate append '+=' just prevents '?=' from defaultsetup.conf to be applied)
Comment 3 Scott Rifenbark 2015-01-30 19:37:11 UTC
Hi Peter, 

I have implemented the change suggested by Martin to three manual development branches (1.6.x, 1.7.x and 1.8).  You can see the fix at http://www.yoctoproject.org/docs/1.6.2/ref-manual/ref-manual.html#ref-classes-icecc.

Marking the bug as RESOLVED and setting the documentation flag to "done."

Thanks,
Scott