diff options
author | Richard Purdie <richard@openedhand.com> | 2008-01-09 13:50:38 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-01-09 13:50:38 +0000 |
commit | 0f1ddc5c32e59065c1b21e04743c6771b2f8ea33 (patch) | |
tree | f047af70529dace8cd4c49a011a4f37cc688c52f | |
parent | b1975f9168a195bebda9db170f4350c98e973634 (diff) | |
download | openembedded-core-0f1ddc5c32e59065c1b21e04743c6771b2f8ea33.tar.gz openembedded-core-0f1ddc5c32e59065c1b21e04743c6771b2f8ea33.tar.bz2 openembedded-core-0f1ddc5c32e59065c1b21e04743c6771b2f8ea33.zip |
package.bbclass: Account for DEPENDS in -dev packages
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3439 311d38ba-8fff-0310-9ca6-ca027cbcb966
-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() { for pkg in packages.split(): subdata_file = bb.data.expand("${PKGDATA_DIR}/runtime/%s" % pkg, d) sf = open(subdata_file, 'w') + write_if_exists(sf, pkg, 'PN') write_if_exists(sf, pkg, 'DESCRIPTION') write_if_exists(sf, pkg, 'RDEPENDS') write_if_exists(sf, pkg, 'RPROVIDES') @@ -803,9 +804,26 @@ python package_depchains() { postfixes = (bb.data.getVar('DEPCHAIN_POST', d, 1) or '').split() prefixes = (bb.data.getVar('DEPCHAIN_PRE', d, 1) or '').split() + def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d): + + #bb.note('depends for %s is %s' % (base, depends)) + rreclist = explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "") + + for depend in depends: + if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'): + #bb.note("Skipping %s" % depend) + continue + pkgname = getname(depend, suffix) + #bb.note("Adding %s for %s" % (pkgname, depend)) + if not pkgname in rreclist: + rreclist.append(pkgname) + + #bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist))) + bb.data.setVar('RRECOMMENDS_%s' % pkg, ' '.join(rreclist), d) + def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d): - #bb.note('rdepends for %s is %s' % (base, rdepends)) + #bb.note('rdepends for %s is %s' % (base, rdepends)) rreclist = explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "") for depend in rdepends: @@ -821,6 +839,10 @@ python package_depchains() { if dep not in list: list.append(dep) + depends = [] + for dep in explode_deps(bb.data.getVar('DEPENDS', d, 1) or ""): + add_dep(depends, dep) + rdepends = [] for dep in explode_deps(bb.data.getVar('RDEPENDS', d, 1) or ""): add_dep(rdepends, dep) @@ -853,6 +875,8 @@ python package_depchains() { for suffix in pkgs: for pkg in pkgs[suffix]: (base, func) = pkgs[suffix][pkg] + if suffix == "-dev": + pkg_adddeprrecs(pkg, base, suffix, func, depends, d) if len(pkgs[suffix]) == 1: pkg_addrrecs(pkg, base, suffix, func, rdepends, d) else: |