[yocto] Alternative to _git.bb convention for unstable versions?

Martin Jansa martin.jansa at gmail.com
Fri Sep 13 08:35:34 PDT 2019


You can easily add .inc file which will set all the PREFERRED_VERSIONs for
all components you need and then the users will just add an "require" of
this .inc files to their local.conf.

"somepackage-unstable.bb" or "somepackage-devel.bb" this will make it 2
different components - not 2 different versions of the same component -
which makes this much more complicated, you'll need PREFERRED_PROVIDERs for
every dependency and in the end you will need to make sure that whole build
is using the same set of providers, because if

A depends on somepackage-unstable
B depends on A and somepackage-devel

then building B will fail in prepare-recipe-sysrooot, because A will pull
somepackage-unstable which will probably conflict with somepackage-devel by
providing the same files (in just different version). You can see how
openssl10 and openssl "worked" if you build didn't use the same one for all
the recipes.

Cheers,

On Fri, Sep 13, 2019 at 5:27 PM keith.derrick <keith.derrick at lge.com> wrote:

> I am currently creating a new layer (which will eventually be made
> generally available). I need to provide both a versioned recipe, and an
> "unstable"  one.
>
>
> Currently I have somepackage_1.0.bb and somepackage_git.bb which are
> working fine.
>
>
> However, using the "_git" approach (with DEFAULT_PREFERENCE = "-1")
> requires the use of PREFERRED_VERSION in either local.conf or
> a distro.conf. I've tried putting it in the image files, and that doesn't
> work.
>
>
> If you are not creating your own DISTRO, and instead just adding the layer
> to a straight poky/meta build, you seem to be pretty much stuck with adding
> 3 PREFERRED_VERSION statements (target, -native, and nativesdk- variants)
> to local.conf. I'd rather not require that of users of the layer.
>
>
> I'm considering instead using either "somepackage-unstable.bb" or "
> somepackage-devel.bb" instead of "sompackage_git.bb". This allows a
> simple selection of either  RDEPENDS = "somepackage" or RDEPENDS =
> "somepackage-devel" to add the desired one to an image.
>
>
> However, neither "-devel" or "-unstable" have the right feel for the
> suffix. If, for example, you are picking up an older commit (between
> versions  say) it might well be completely stable.
>
>
> Does the community have a naming convention for this type of recipe?
> Failing that, is there somewhere else in the met-data the PREFERRED_VERSION
> statement can go other than a configuration file?
>
>
> Thanks
>
> Keith Derrick
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190913/6d2f479c/attachment.html>


More information about the yocto mailing list