diff options
author | Charlie Davies <charles.davies@whitetree.xyz> | 2021-02-18 20:52:18 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-03-15 14:36:51 +0000 |
commit | 78fcf6831a3f12e5dd1aa0679fd972b040ea3d0d (patch) | |
tree | 707221c2e33d192b438221e46d27ccd06574966b /bitbake/lib/bb/providers.py | |
parent | 3752782cb77749ef11d947a26cfa7e4905662339 (diff) | |
download | poky-78fcf6831a3f12e5dd1aa0679fd972b040ea3d0d.tar.gz |
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>
Diffstat (limited to 'bitbake/lib/bb/providers.py')
-rw-r--r-- | bitbake/lib/bb/providers.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py index 09e5701f2e..95152323ef 100644 --- a/bitbake/lib/bb/providers.py +++ b/bitbake/lib/bb/providers.py | |||
@@ -256,10 +256,13 @@ def _filterProviders(providers, item, cfgData, dataCache): | |||
256 | 256 | ||
257 | logger.debug("providers for %s are: %s", item, list(sorted(pkg_pn.keys()))) | 257 | logger.debug("providers for %s are: %s", item, list(sorted(pkg_pn.keys()))) |
258 | 258 | ||
259 | # First add PREFERRED_VERSIONS | 259 | # First add REQUIRED_VERSIONS or PREFERRED_VERSIONS |
260 | for pn in sorted(pkg_pn): | 260 | for pn in sorted(pkg_pn): |
261 | sortpkg_pn[pn] = sortPriorities(pn, dataCache, pkg_pn) | 261 | sortpkg_pn[pn] = sortPriorities(pn, dataCache, pkg_pn) |
262 | preferred_versions[pn] = findPreferredProvider(pn, cfgData, dataCache, sortpkg_pn[pn], item) | 262 | preferred_ver, preferred_file, required = findPreferredProvider(pn, cfgData, dataCache, sortpkg_pn[pn], item) |
263 | if required and preferred_file is None: | ||
264 | return eligible | ||
265 | preferred_versions[pn] = (preferred_ver, preferred_file) | ||
263 | if preferred_versions[pn][1]: | 266 | if preferred_versions[pn][1]: |
264 | eligible.append(preferred_versions[pn][1]) | 267 | eligible.append(preferred_versions[pn][1]) |
265 | 268 | ||