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-12 16:47:23 +0000 |
commit | c41386b78aa53e0bf081cd973c950b88126670a7 (patch) | |
tree | efd4473e6c368d4d39430880c68823db869ecacc | |
parent | 5cbf6d95fc1009e78e7d0745a49e0bf418b37abb (diff) | |
download | bitbake-c41386b78aa53e0bf081cd973c950b88126670a7.tar.gz |
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]
Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/providers.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bb/providers.py b/lib/bb/providers.py index 09e5701f2..95152323e 100644 --- a/lib/bb/providers.py +++ b/lib/bb/providers.py @@ -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]) |