diff options
| author | Joshua Watt <JPEWhacker@gmail.com> | 2025-02-11 13:49:18 +0000 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-02-15 06:04:44 -0800 |
| commit | 2492bf8803632ad15856408e34283dcc683a8415 (patch) | |
| tree | 28be3fee84398485c9238c2086464a3913018054 | |
| parent | 6f26093d1445a1d15730461b806d7e114e0760ba (diff) | |
| download | poky-2492bf8803632ad15856408e34283dcc683a8415.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)
(From OE-Core rev: 0ff31972b60dda5d8bada2ffb428cc54bb49e8cf)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
| -rw-r--r-- | meta/classes/insane.bbclass | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index dfda70bad6..f4b4c05e3d 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
| @@ -761,13 +761,7 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d): | |||
| 761 | if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps: | 761 | if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps: |
| 762 | continue | 762 | continue |
| 763 | if not rdep_data or not 'PN' in rdep_data: | 763 | if not rdep_data or not 'PN' in rdep_data: |
| 764 | pkgdata_dir = d.getVar("PKGDATA_DIR") | 764 | for _, rdep_data in oe.packagedata.foreach_runtime_provider_pkgdata(d, rdepend): |
| 765 | try: | ||
| 766 | possibles = os.listdir("%s/runtime-rprovides/%s/" % (pkgdata_dir, rdepend)) | ||
| 767 | except OSError: | ||
| 768 | possibles = [] | ||
| 769 | for p in possibles: | ||
| 770 | rdep_data = oe.packagedata.read_subpkgdata(p, d) | ||
| 771 | if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps: | 765 | if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps: |
| 772 | break | 766 | break |
| 773 | if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps: | 767 | if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps: |
| @@ -811,17 +805,17 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d): | |||
| 811 | # perl | 805 | # perl |
| 812 | filerdepends.pop(rdep,None) | 806 | filerdepends.pop(rdep,None) |
| 813 | 807 | ||
| 814 | # For Saving the FILERPROVIDES, RPROVIDES and FILES_INFO | 808 | for _, rdep_data in oe.packagedata.foreach_runtime_provider_pkgdata(d, rdep, True): |
| 815 | rdep_data = oe.packagedata.read_subpkgdata(rdep, d) | 809 | for key in rdep_data: |
| 816 | for key in rdep_data: | 810 | if key.startswith("FILERPROVIDES:") or key.startswith("RPROVIDES:"): |
| 817 | if key.startswith("FILERPROVIDES:") or key.startswith("RPROVIDES:"): | 811 | for subkey in bb.utils.explode_deps(rdep_data[key]): |
| 818 | for subkey in bb.utils.explode_deps(rdep_data[key]): | 812 | filerdepends.pop(subkey,None) |
| 819 | filerdepends.pop(subkey,None) | 813 | # Add the files list to the rprovides |
| 820 | # Add the files list to the rprovides | 814 | if key.startswith("FILES_INFO:"): |
| 821 | if key.startswith("FILES_INFO:"): | 815 | # Use eval() to make it as a dict |
| 822 | # Use eval() to make it as a dict | 816 | for subkey in eval(rdep_data[key]): |
| 823 | for subkey in eval(rdep_data[key]): | 817 | filerdepends.pop(subkey,None) |
| 824 | filerdepends.pop(subkey,None) | 818 | |
| 825 | if not filerdepends: | 819 | if not filerdepends: |
| 826 | # Break if all the file rdepends are met | 820 | # Break if all the file rdepends are met |
| 827 | break | 821 | break |
