[OE-core] should a "*git.bb" recipe lock that recipe to a fixed version?
Robert P. J. Day
rpjday at crashcourse.ca
Sun Oct 30 17:35:44 UTC 2016
On Sun, 30 Oct 2016, Christopher Larson wrote:
> On Sun, Oct 30, 2016 at 5:25 AM, Robert P. J. Day <rpjday at crashcourse.ca> wrote:
>
> not sure if i should have noticed this before, but i was building a
> number of python modules, and my collection of layers gave me two
> possibilities for python-django:
>
> * python-django_git.bb (meta-openstack)
> * python-django_1.9.7.bb (meta-python)
>
> i simply assumed that any "git"-versioned recipe would typically
> take precedence over a fixed version recipe, so i was surprised to see
> that what was built was python-django-1.8.6. huh?
>
> then i looked at the recipe from meta-openstack, and it contained
> the lines:
>
> PV = "1.8.6"
> SRCREV = "80b7e9d09f2d23209b591288f9b2cf3eb3d927c8"
>
> SRC_URI = " \
> git://github.com/django/django.git;branch=stable/1.8.x \
> "
>
> am i right in being a bit confused by that? i checked out the github
> repo, and it has branches "stable/1.8.x", and also "stable/1.9.x" and
> "stable/1.10.x". so what is that supposed to mean?
>
> am i right in assuming that a "git" recipe will (in the absence of
> any PREFERRED_VERSION settings or other overriding settings) always be
> considered before a fixed version recipe? and is that why i got this
> (for me) unexpected result?
>
>
> Bitbake selects default versions via DEFAULT_VERSION,
> PREFERRED_VERSION, and lacking both, a naïve version comparison.
> There’s nothing magic to select or not select an _git recipe.
>
> It’s been a very common pattern for the _git recipe to be the
> development version / branch HEAD, to be used only when explicitly
> selected, whereas the versioned recipes are stable and versioned, so
> are appropriate defaults. That said, there are also _git recipes
> that set specific versions, and version recipes that use git to
> fetch that version. There’s a lack of consistency in that regard,
> but what you were surprised by has basically been the expected,
> default convention in the past, not the exception.
fair enough ... i'm embarrassed to admit i didn't really understand
the versioning selection so i'm going to examine it way more carefully
now. i wonder how many recipes in oe-core are "_git" recipes that, in
the end, just lock down to a specific version. as you say, i was a bit
surprised.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
More information about the Openembedded-core
mailing list