summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/insane.bbclass72
1 files changed, 71 insertions, 1 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 3dd2e7fb6a..c6dea22618 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -29,7 +29,7 @@ QA_SANE = "True"
29WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \ 29WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
30 textrel already-stripped incompatible-license files-invalid \ 30 textrel already-stripped incompatible-license files-invalid \
31 installed-vs-shipped compile-host-path install-host-path \ 31 installed-vs-shipped compile-host-path install-host-path \
32 pn-overrides infodir build-deps \ 32 pn-overrides infodir build-deps file-rdeps \
33 " 33 "
34ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ 34ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
35 perms dep-cmp pkgvarcheck perm-config perm-line perm-link \ 35 perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -797,6 +797,76 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
797 error_msg = "%s rdepends on %s, but it isn't a build dependency?" % (pkg, rdepend) 797 error_msg = "%s rdepends on %s, but it isn't a build dependency?" % (pkg, rdepend)
798 sane = package_qa_handle_error("build-deps", error_msg, d) 798 sane = package_qa_handle_error("build-deps", error_msg, d)
799 799
800 if "file-rdeps" not in skip:
801 ignored_file_rdeps = set(['/bin/sh', '/usr/bin/env', 'rtld(GNU_HASH)'])
802 if bb.data.inherits_class('nativesdk', d):
803 ignored_file_rdeps |= set(['/bin/bash', '/usr/bin/perl'])
804 # For Saving the FILERDEPENDS
805 filerdepends = set()
806 rdep_data = oe.packagedata.read_subpkgdata(pkg, d)
807 for key in rdep_data:
808 if key.startswith("FILERDEPENDS_"):
809 for subkey in rdep_data[key].split():
810 filerdepends.add(subkey)
811 filerdepends -= ignored_file_rdeps
812
813 if filerdepends:
814 next = rdepends
815 done = rdepends[:]
816 # Find all the rdepends on the dependency chain
817 while next:
818 new = []
819 for rdep in next:
820 rdep_data = oe.packagedata.read_subpkgdata(rdep, d)
821 sub_rdeps = rdep_data.get("RDEPENDS_" + rdep)
822 if not sub_rdeps:
823 continue
824 for sub_rdep in sub_rdeps.split():
825 if sub_rdep in done:
826 continue
827 if not sub_rdep.startswith('(') and \
828 oe.packagedata.has_subpkgdata(sub_rdep, d):
829 # It's a new rdep
830 done.append(sub_rdep)
831 new.append(sub_rdep)
832 next = new
833
834 # Add the rprovides of itself
835 if pkg not in done:
836 done.insert(0, pkg)
837
838 # The python is not a package, but python-core provides it, so
839 # skip checking /usr/bin/python if python is in the rdeps, in
840 # case there is a RDEPENDS_pkg = "python" in the recipe.
841 for py in [ d.getVar('MLPREFIX', True) + "python", "python" ]:
842 if py in done:
843 filerdepends.discard("/usr/bin/python")
844 done.remove(py)
845 for rdep in done:
846 # For Saving the FILERPROVIDES, RPROVIDES and FILES_INFO
847 rdep_rprovides = set()
848 rdep_data = oe.packagedata.read_subpkgdata(rdep, d)
849 for key in rdep_data:
850 if key.startswith("FILERPROVIDES_") or key.startswith("RPROVIDES_"):
851 for subkey in rdep_data[key].split():
852 rdep_rprovides.add(subkey)
853 # Add the files list to the rprovides
854 if key == "FILES_INFO":
855 # Use eval() to make it as a dict
856 for subkey in eval(rdep_data[key]):
857 rdep_rprovides.add(subkey)
858 filerdepends -= rdep_rprovides
859 if not filerdepends:
860 # Break if all the file rdepends are met
861 break
862 else:
863 # Clear it for the next loop
864 rdep_rprovides.clear()
865 if filerdepends:
866 error_msg = "%s requires %s, but no providers in its RDEPENDS" % \
867 (pkg, ', '.join(str(e) for e in filerdepends))
868 sane = package_qa_handle_error("file-rdeps", error_msg, d)
869
800 return sane 870 return sane
801 871
802def package_qa_check_deps(pkg, pkgdest, skip, d): 872def package_qa_check_deps(pkg, pkgdest, skip, d):