mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
bitbake: bitbake: providers: check for REQUIRED_VERSION in _filterProviders
Before the REQUIRED_VERSION variable was introduced the PREFERRED_VERSION variable allowed for a fallback to the next most suitable version. Since REQUIRED_VERSION does not allow a fallback to a different version implement a check in the _filterProviders function to make sure that if a requested REQUIRED_VERSION is not found then the function returns no eligible providers have been found. Fixes [YOCTO #10096] (Bitbake rev: c41386b78aa53e0bf081cd973c950b88126670a7) Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
3752782cb7
commit
78fcf6831a
@@ -256,10 +256,13 @@ def _filterProviders(providers, item, cfgData, dataCache):
|
||||
|
||||
logger.debug("providers for %s are: %s", item, list(sorted(pkg_pn.keys())))
|
||||
|
||||
# First add PREFERRED_VERSIONS
|
||||
# First add REQUIRED_VERSIONS or PREFERRED_VERSIONS
|
||||
for pn in sorted(pkg_pn):
|
||||
sortpkg_pn[pn] = sortPriorities(pn, dataCache, pkg_pn)
|
||||
preferred_versions[pn] = findPreferredProvider(pn, cfgData, dataCache, sortpkg_pn[pn], item)
|
||||
preferred_ver, preferred_file, required = findPreferredProvider(pn, cfgData, dataCache, sortpkg_pn[pn], item)
|
||||
if required and preferred_file is None:
|
||||
return eligible
|
||||
preferred_versions[pn] = (preferred_ver, preferred_file)
|
||||
if preferred_versions[pn][1]:
|
||||
eligible.append(preferred_versions[pn][1])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user