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:43 +0000 |
commit | 59e15f671222077db57d394b1f022549fa3509ff (patch) | |
tree | 8f3825c5def618387b023b7af77b78f3e87cf388 /meta/classes/update-alternatives.bbclass | |
parent | 3df0d2390de37c80b37041b5f02b352b77c11209 (diff) | |
download | poky-59e15f671222077db57d394b1f022549fa3509ff.tar.gz |
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]
(From OE-Core rev: 56a59ef12936dcc6464cf1d43dda6957a5aa8c65)
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): | |||
167 | continue | 167 | continue |
168 | d.appendVar('%s_VARDEPS_%s' % (v,p), ' %s:%s' % (flag, d.getVarFlag('%s_%s' % (v,p), flag, False))) | 168 | d.appendVar('%s_VARDEPS_%s' % (v,p), ' %s:%s' % (flag, d.getVarFlag('%s_%s' % (v,p), flag, False))) |
169 | 169 | ||
170 | def ua_extend_depends(d): | ||
171 | if not 'virtual/update-alternatives' in d.getVar('PROVIDES', True): | ||
172 | d.appendVar('DEPENDS', ' virtual/update-alternatives') | ||
173 | |||
170 | python __anonymous() { | 174 | python __anonymous() { |
175 | # Update Alternatives only works on target packages... | ||
176 | if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or \ | ||
177 | bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or \ | ||
178 | bb.data.inherits_class('cross-canadian', d): | ||
179 | return | ||
180 | |||
171 | # deprecated stuff... | 181 | # deprecated stuff... |
172 | update_alternatives_after_parse(d) | 182 | update_alternatives_after_parse(d) |
173 | 183 | ||
174 | # compute special vardeps | 184 | # compute special vardeps |
175 | gen_updatealternativesvardeps(d) | 185 | gen_updatealternativesvardeps(d) |
186 | |||
187 | # extend the depends to include virtual/update-alternatives | ||
188 | ua_extend_depends(d) | ||
176 | } | 189 | } |
177 | 190 | ||
178 | def gen_updatealternativesvars(d): | 191 | def gen_updatealternativesvars(d): |