diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2013-01-18 17:13:38 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-20 13:06:05 +0000 |
commit | 56a59ef12936dcc6464cf1d43dda6957a5aa8c65 (patch) | |
tree | 2f08c6493700bc0d8b43a135e40bca72c2b1b27f /meta/classes/update-alternatives.bbclass | |
parent | 1edd44bed9e9829f7c2466928bc3f45be102b84b (diff) | |
download | openembedded-core-56a59ef12936dcc6464cf1d43dda6957a5aa8c65.tar.gz openembedded-core-56a59ef12936dcc6464cf1d43dda6957a5aa8c65.tar.bz2 openembedded-core-56a59ef12936dcc6464cf1d43dda6957a5aa8c65.zip |
update-alternatives: Add a build-time dependency
We need to add a build time dependency on virtual/update-alternatives,
however we can't just do DEPENDS +=, or we end up with various problems. To
work around this, in the anonymous python space we ensure we only do the
addition when the package does not provide virtual/update-alternatives and
it is a target package.
Also the system wide PREFERRED_PROVIDER was incorrect. It references a
runtime package, and not the recipe it should have. This has been corrected.
[YOCTO #3691]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Tested-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/update-alternatives.bbclass')
-rw-r--r-- | meta/classes/update-alternatives.bbclass | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass index 556ee7cbae..a75e282a3c 100644 --- a/meta/classes/update-alternatives.bbclass +++ b/meta/classes/update-alternatives.bbclass @@ -167,12 +167,25 @@ def gen_updatealternativesvardeps(d): continue d.appendVar('%s_VARDEPS_%s' % (v,p), ' %s:%s' % (flag, d.getVarFlag('%s_%s' % (v,p), flag, False))) +def ua_extend_depends(d): + if not 'virtual/update-alternatives' in d.getVar('PROVIDES', True): + d.appendVar('DEPENDS', ' virtual/update-alternatives') + python __anonymous() { + # Update Alternatives only works on target packages... + if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or \ + bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or \ + bb.data.inherits_class('cross-canadian', d): + return + # deprecated stuff... update_alternatives_after_parse(d) # compute special vardeps gen_updatealternativesvardeps(d) + + # extend the depends to include virtual/update-alternatives + ua_extend_depends(d) } def gen_updatealternativesvars(d): |