[yocto] [PATCHv4 6/8] mesa-dri.bbappend: avoid conflict with emgd-driver-bin

Kamble, Nitin A nitin.a.kamble at intel.com
Tue Oct 16 17:00:53 PDT 2012


> >>>
> >>> diff --git a/common/recipes-graphics/mesa/mesa-dri_8.0.4.bbappend
> >>> b/common/recipes-graphics/mesa/mesa-dri_8.0.4.bbappend
> >>> new file mode 100644
> >>> index 0000000..6bfa968
> >>> --- /dev/null
> >>> +++ b/common/recipes-graphics/mesa/mesa-dri_8.0.4.bbappend
> >>> @@ -0,0 +1,24 @@
> >>> +
> >>> +# The emgd binary driver also provides egl, gles1, gles2 library &
> headers.
> >>> +# To avoid conflict disable egl, gles1, gles2 from meta-dri if the
> >>> +BSP image # is bundling the emgd driver.
> >>> +
> >>> +python __anonymous () {
> >>> +    import re
> >>> +    xserver = d.getVar('XSERVER', True)
> >>> +    if 'emgd-driver-bin' in xserver.split(' '):
> >>> +        extra_oeconf = d.getVar('EXTRA_OECONF', True).split()
> >>> +	take_out = ["--enable-egl", "--enable-gles1", "--enable-gles2"]
> >>> +	put_in = ["--disable-egl", "--disable-gles1", "--disable-gles2"]
> >>> +        pattern = re.compile("--with-egl-platforms")
> >>> +        new_extra_oeconf = [ ]
> >>> +	for i in extra_oeconf:
> >>> +            if ( i not in take_out ) and ( not pattern.match(i)):
> >>> +                new_extra_oeconf.append(i)
> >>> +        for i in put_in:
> >>> +            new_extra_oeconf.append(i)
> >>> +
> >>> +        d.setVar('EXTRA_OECONF', ' '.join(new_extra_oeconf))
> >>> +        depends = d.getVar('DEPENDS', True)
> >>> +        d.setVar('DEPENDS', depends + " emgd-driver-bin")
> >>
> >> Odd mix of whitespace and tabs above.
> >>
> >> Also, I have to agree with Ross. This places very specific knowledge
> >> of an external package in the general purpose recipe. This is
> >> opposite of how these things should be built up.
> >>
> >
> > Whitespace issues can be solved easily. But if this solution is not
> acceptable, then I am not sure how to solve the issue. Do we push the issue
> to 1.4?
> 
> Can you define a variable that EXTRA_OECONF includes which can be
> manipulated in a bbappend in the meta-intel? This would keep this complex
> logic out of the core recipe and move into the place that actually needs it.

If we can modify the recipe in poky, then this method is not needed to achieve same thing. But because of release we may not be able to do it.

Nitin


> 
> --
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Linux Kernel



More information about the yocto mailing list