summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2013-01-18 17:13:38 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-20 13:06:43 +0000
commit59e15f671222077db57d394b1f022549fa3509ff (patch)
tree8f3825c5def618387b023b7af77b78f3e87cf388 /meta
parent3df0d2390de37c80b37041b5f02b352b77c11209 (diff)
downloadpoky-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')
-rw-r--r--meta/classes/update-alternatives.bbclass13
-rw-r--r--meta/conf/distro/include/default-providers.inc2
2 files changed, 14 insertions, 1 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
170def ua_extend_depends(d):
171 if not 'virtual/update-alternatives' in d.getVar('PROVIDES', True):
172 d.appendVar('DEPENDS', ' virtual/update-alternatives')
173
170python __anonymous() { 174python __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
178def gen_updatealternativesvars(d): 191def gen_updatealternativesvars(d):
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index 12a581d080..444176c60a 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -8,7 +8,7 @@ PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg"
8PREFERRED_PROVIDER_virtual/libgl ?= "mesa-dri" 8PREFERRED_PROVIDER_virtual/libgl ?= "mesa-dri"
9PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa-dri" 9PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa-dri"
10PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa-dri" 10PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa-dri"
11PREFERRED_PROVIDER_virtual/update-alternatives ?= "update-alternatives-cworth" 11PREFERRED_PROVIDER_virtual/update-alternatives ?= "opkg"
12PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "opkg-native" 12PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "opkg-native"
13PREFERRED_PROVIDER_virtual/libx11 ?= "libx11" 13PREFERRED_PROVIDER_virtual/libx11 ?= "libx11"
14PREFERRED_PROVIDER_xf86-video-intel ?= "xf86-video-intel" 14PREFERRED_PROVIDER_xf86-video-intel ?= "xf86-video-intel"