| Summary: | populate_sdk fails when I have another version of gcc in my own layer | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Maksim E. Kozlov <maksim.e.kozlov> |
| Component: | configuration | Assignee: | Richard Purdie <richard.purdie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | maksim.e.kozlov |
| Version: | unspecified | ||
| Target Milestone: | 2.1 M4 | ||
| Hardware: | x86 | ||
| OS: | x86_64 | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Maksim E. Kozlov
2016-02-01 13:53:06 UTC
Which version of the base metadata are you using? We did used to see problems with the PREFERRED_VERSION settings for gcc-crosssdk not working. This was one of the issues which the datastore reimplementation allowed us to fix but that wouldn't fix older branches. The settings come from: http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/conf/distro/include/tcmode-default.inc PREFERRED_VERSION_gcc-crosssdk-${SDK_ARCH} ?= "${SDKGCCVERSION}" PREFERRED_VERSION_gcc-crosssdk-initial-${SDK_ARCH} ?= "${SDKGCCVERSION}" however you could try setting these manually and seeing if that helps you work around the issue? PREFERRED_VERSION_gcc-crosssdk-i686 ?= "${SDKGCCVERSION}" PREFERRED_VERSION_gcc-crosssdk-initial-i686 ?= "${SDKGCCVERSION}" PREFERRED_VERSION_gcc-crosssdk-x86_64 ?= "${SDKGCCVERSION}" PREFERRED_VERSION_gcc-crosssdk-initial-x86_64 ?= "${SDKGCCVERSION}" should do it. (In reply to comment #1) > Which version of the base metadata are you using? I'm using master branch from git://git.openembedded.org/openembedded-core repository, but I did this on the jethro branch as well... the same effect > > We did used to see problems with the PREFERRED_VERSION settings for > gcc-crosssdk not working. This was one of the issues which the datastore > reimplementation allowed us to fix but that wouldn't fix older branches. > > The settings come from: > > http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/conf/distro/include/ > tcmode-default.inc > > PREFERRED_VERSION_gcc-crosssdk-${SDK_ARCH} ?= "${SDKGCCVERSION}" > PREFERRED_VERSION_gcc-crosssdk-initial-${SDK_ARCH} ?= "${SDKGCCVERSION}" > > however you could try setting these manually and seeing if that helps you > work around the issue? > > PREFERRED_VERSION_gcc-crosssdk-i686 ?= "${SDKGCCVERSION}" > PREFERRED_VERSION_gcc-crosssdk-initial-i686 ?= "${SDKGCCVERSION}" > PREFERRED_VERSION_gcc-crosssdk-x86_64 ?= "${SDKGCCVERSION}" > PREFERRED_VERSION_gcc-crosssdk-initial-x86_64 ?= "${SDKGCCVERSION}" > > should do it. I tried to set these variables explicitly but with no effect Since I'm using git://git.openembedded.org/openembedded-core repository, I tried to check how it works on the master branch from git://git.yoctoproject.org/poky.git repo - the same wrong behavior But when I switched to the jethro branch and tried again, I found that it works correctly So this bug appears in 'master' branches of both repositories and in the jethro branch from git://git.openembedded.org/openembedded-core repo, but doesn't appear in the jethro branch from git://git.yoctoproject.org/poky.git I think I tracked down the issue illustrated by the following patch:
diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py
index 68c8d59..ffa532c 100644
--- a/bitbake/lib/bb/providers.py
+++ b/bitbake/lib/bb/providers.py
@@ -121,11 +121,14 @@ def findPreferredProvider(pn, cfgData, dataCache, pkg_pn = None, item = None):
preferred_file = None
preferred_ver = None
- localdata = data.createCopy(cfgData)
- localdata.setVar('OVERRIDES', "%s:pn-%s:%s" % (data.getVar('OVERRIDES', localdata), pn, pn))
- bb.data.update_data(localdata)
+ # pn can contain '_', e.g. gcc-cross-x86_64 and an override cannot
+ # hence we do this manually rather than use OVERRIDES
+ preferred_v = cfgData.getVar("PREFERRED_VERSION_pn-%s" % pn, True)
+ if not preferred_v:
+ preferred_v = cfgData.getVar("PREFERRED_VERSION_%s" % pn, True)
+ if not preferred_v:
+ preferred_v = cfgData.getVar("PREFERRED_VERSION", True)
- preferred_v = localdata.getVar('PREFERRED_VERSION', True)
if preferred_v:
m = re.match('(\d+:)*(.*)(_.*)*', preferred_v)
if m:
It seems working. Thanks |