summaryrefslogtreecommitdiffstats
path: root/meta/classes-global
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2023-12-20 11:02:35 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-24 10:39:07 +0000
commitcd125f1703fcf06c995cc6c74990a6a70fdc9536 (patch)
treefd00725f11295152c5dc56491d68578a99addd5b /meta/classes-global
parentdd5475d8e38fe28314ceccd184fb1d5b31d2107d (diff)
downloadpoky-cd125f1703fcf06c995cc6c74990a6a70fdc9536.tar.gz
classes-global/insane: Look up all runtime providers for file-rdeps
Uses the new foreach_runtime_provider_pkgdata() API to look up all possible runtime providers of a given dependency when resolving file-rdeps. This allows the check to correctly handle RPROVIDES for non-virtual dependencies (From OE-Core rev: 018fa1b7cb5e6a362ebb45b93e52b0909a782ac9) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global')
-rw-r--r--meta/classes-global/insane.bbclass30
1 files changed, 12 insertions, 18 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index 72fcf6b254..d625fd82f7 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -904,13 +904,7 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
904 if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps: 904 if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps:
905 continue 905 continue
906 if not rdep_data or not 'PN' in rdep_data: 906 if not rdep_data or not 'PN' in rdep_data:
907 pkgdata_dir = d.getVar("PKGDATA_DIR") 907 for _, rdep_data in oe.packagedata.foreach_runtime_provider_pkgdata(d, rdepend):
908 try:
909 possibles = os.listdir("%s/runtime-rprovides/%s/" % (pkgdata_dir, rdepend))
910 except OSError:
911 possibles = []
912 for p in possibles:
913 rdep_data = oe.packagedata.read_subpkgdata(p, d)
914 if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps: 908 if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps:
915 break 909 break
916 if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps: 910 if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps:
@@ -958,17 +952,17 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
958 # perl 952 # perl
959 filerdepends.pop(rdep,None) 953 filerdepends.pop(rdep,None)
960 954
961 # For Saving the FILERPROVIDES, RPROVIDES and FILES_INFO 955 for _, rdep_data in oe.packagedata.foreach_runtime_provider_pkgdata(d, rdep, True):
962 rdep_data = oe.packagedata.read_subpkgdata(rdep, d) 956 for key in rdep_data:
963 for key in rdep_data: 957 if key.startswith("FILERPROVIDES:") or key.startswith("RPROVIDES:"):
964 if key.startswith("FILERPROVIDES:") or key.startswith("RPROVIDES:"): 958 for subkey in bb.utils.explode_deps(rdep_data[key]):
965 for subkey in bb.utils.explode_deps(rdep_data[key]): 959 filerdepends.pop(subkey,None)
966 filerdepends.pop(subkey,None) 960 # Add the files list to the rprovides
967 # Add the files list to the rprovides 961 if key.startswith("FILES_INFO:"):
968 if key.startswith("FILES_INFO:"): 962 # Use eval() to make it as a dict
969 # Use eval() to make it as a dict 963 for subkey in eval(rdep_data[key]):
970 for subkey in eval(rdep_data[key]): 964 filerdepends.pop(subkey,None)
971 filerdepends.pop(subkey,None) 965
972 if not filerdepends: 966 if not filerdepends:
973 # Break if all the file rdepends are met 967 # Break if all the file rdepends are met
974 break 968 break