]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
cooker: rework LAYERDEPENDS versioning so that it is actually useful
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 10 Feb 2015 18:13:25 +0000 (18:13 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Feb 2015 09:10:30 +0000 (09:10 +0000)
commit408be9cdf2b1e32e64ea488d8051a546fb54c144
tree535b56ec26cd6bc06212b09f1d04225e4780e44c
parent3a9eefe27f29a4593d6298f0427ac5f3e9183377
cooker: rework LAYERDEPENDS versioning so that it is actually useful

We've had versioned dependency support in LAYERDEPENDS for quite a long
time, but I can say with pretty good certainty that almost nobody has
used it up to now because it was too strict - the specified version had
to exactly match the version in your configuration or you would get an
error; there was no "greater than or equal" option, which is usually
what you will want given that LAYERVERSION does get bumped from time to
time.

However, users mismatching layer branches and then having their builds
fail later on with some incomprehensible error is still a pretty common
problem. We can't simply use the git branch because not everyone is
always on a branch and the branch names don't always match up (and
that's not an issue). To provide a practical means to address branch
mismatching, I have reworked LAYERDEPENDS version specifications to use
the more familiar "dependency (>= version)" syntax as used with package
dependencies, support non-integer versions, and clarified the error
message a little. If we then take care to bump the version on every
breaking change, it is at least possible to have layers depend on these
changes when they update to match; we can now even support a major.minor
scheme to allow retrospectively adding a version limiter to old branches
when a new branch is created and yet still allow the old branch minor
version to be bumped if needed.

Fixes [YOCTO #5991].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cooker.py
lib/bb/tests/utils.py
lib/bb/utils.py