diff options
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 4d9553d693..7a8ebf4716 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -484,6 +484,7 @@ python emit_pkgdata() { | |||
484 | for pkg in packages.split(): | 484 | for pkg in packages.split(): |
485 | subdata_file = bb.data.expand("${PKGDATA_DIR}/runtime/%s" % pkg, d) | 485 | subdata_file = bb.data.expand("${PKGDATA_DIR}/runtime/%s" % pkg, d) |
486 | sf = open(subdata_file, 'w') | 486 | sf = open(subdata_file, 'w') |
487 | write_if_exists(sf, pkg, 'PN') | ||
487 | write_if_exists(sf, pkg, 'DESCRIPTION') | 488 | write_if_exists(sf, pkg, 'DESCRIPTION') |
488 | write_if_exists(sf, pkg, 'RDEPENDS') | 489 | write_if_exists(sf, pkg, 'RDEPENDS') |
489 | write_if_exists(sf, pkg, 'RPROVIDES') | 490 | write_if_exists(sf, pkg, 'RPROVIDES') |
@@ -803,9 +804,26 @@ python package_depchains() { | |||
803 | postfixes = (bb.data.getVar('DEPCHAIN_POST', d, 1) or '').split() | 804 | postfixes = (bb.data.getVar('DEPCHAIN_POST', d, 1) or '').split() |
804 | prefixes = (bb.data.getVar('DEPCHAIN_PRE', d, 1) or '').split() | 805 | prefixes = (bb.data.getVar('DEPCHAIN_PRE', d, 1) or '').split() |
805 | 806 | ||
807 | def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d): | ||
808 | |||
809 | #bb.note('depends for %s is %s' % (base, depends)) | ||
810 | rreclist = explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "") | ||
811 | |||
812 | for depend in depends: | ||
813 | if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'): | ||
814 | #bb.note("Skipping %s" % depend) | ||
815 | continue | ||
816 | pkgname = getname(depend, suffix) | ||
817 | #bb.note("Adding %s for %s" % (pkgname, depend)) | ||
818 | if not pkgname in rreclist: | ||
819 | rreclist.append(pkgname) | ||
820 | |||
821 | #bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist))) | ||
822 | bb.data.setVar('RRECOMMENDS_%s' % pkg, ' '.join(rreclist), d) | ||
823 | |||
806 | def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d): | 824 | def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d): |
807 | #bb.note('rdepends for %s is %s' % (base, rdepends)) | ||
808 | 825 | ||
826 | #bb.note('rdepends for %s is %s' % (base, rdepends)) | ||
809 | rreclist = explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "") | 827 | rreclist = explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "") |
810 | 828 | ||
811 | for depend in rdepends: | 829 | for depend in rdepends: |
@@ -821,6 +839,10 @@ python package_depchains() { | |||
821 | if dep not in list: | 839 | if dep not in list: |
822 | list.append(dep) | 840 | list.append(dep) |
823 | 841 | ||
842 | depends = [] | ||
843 | for dep in explode_deps(bb.data.getVar('DEPENDS', d, 1) or ""): | ||
844 | add_dep(depends, dep) | ||
845 | |||
824 | rdepends = [] | 846 | rdepends = [] |
825 | for dep in explode_deps(bb.data.getVar('RDEPENDS', d, 1) or ""): | 847 | for dep in explode_deps(bb.data.getVar('RDEPENDS', d, 1) or ""): |
826 | add_dep(rdepends, dep) | 848 | add_dep(rdepends, dep) |
@@ -853,6 +875,8 @@ python package_depchains() { | |||
853 | for suffix in pkgs: | 875 | for suffix in pkgs: |
854 | for pkg in pkgs[suffix]: | 876 | for pkg in pkgs[suffix]: |
855 | (base, func) = pkgs[suffix][pkg] | 877 | (base, func) = pkgs[suffix][pkg] |
878 | if suffix == "-dev": | ||
879 | pkg_adddeprrecs(pkg, base, suffix, func, depends, d) | ||
856 | if len(pkgs[suffix]) == 1: | 880 | if len(pkgs[suffix]) == 1: |
857 | pkg_addrrecs(pkg, base, suffix, func, rdepends, d) | 881 | pkg_addrrecs(pkg, base, suffix, func, rdepends, d) |
858 | else: | 882 | else: |