diff options
author | Koen Kooi <koen@openembedded.org> | 2006-10-28 08:56:37 +0000 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2006-10-28 08:56:37 +0000 |
commit | 4c49cec0f00a58693f324b06363744dbcf856329 (patch) | |
tree | 01c14b57b0638c487bb66f69d38d2c65a649d6d3 | |
parent | 25c49309c461b41d718f850f5a900ee8232bbec8 (diff) |
base.bbclass, package.bbclass: don destrucively set RDEPENDS and RRECOMMENDS, from Poky
* poky rev 823: 'package.bbclass: depchains: don't -destructively- set the pkg's RRECOMMENDS.'
* poky rev 824: 'base.bbclass: depchains: don't -destructively- set the pkg's RRECOMMENDS.'
-rw-r--r-- | classes/base.bbclass | 4 | ||||
-rw-r--r-- | classes/package.bbclass | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index eda1b23b04..f4a0076f19 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -616,6 +616,10 @@ def explode_deps(s): r.append(i) return r +def packaged(pkg, d): + import os, bb + return os.access(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), os.R_OK) + def read_pkgdatafile(fn): pkgdata = {} diff --git a/classes/package.bbclass b/classes/package.bbclass index 652b60e226..4909fc61df 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -808,7 +808,7 @@ python package_depchains() { def pkg_addrrecs(pkg, base, func, d): rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + base, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or "") # bb.note('rdepends for %s is %s' % (base, rdepends)) - rreclist = [] + rreclist = explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "") for depend in rdepends: split_depend = depend.split(' (') @@ -824,8 +824,9 @@ python package_depchains() { for postfix in postfixes: def func(list, name): pkg = '%s%s' % (name, postfix) - if packaged(pkg, d): - list.append(pkg) + if not pkg in list: + if packaged(pkg, d): + list.append(pkg) base = pkg[:-len(postfix)] if pkg.endswith(postfix): @@ -835,8 +836,9 @@ python package_depchains() { for prefix in prefixes: def func(list, name): pkg = '%s%s' % (prefix, name) - if packaged(pkg, d): - list.append(pkg) + if not pkg in list: + if packaged(pkg, d): + list.append(pkg) base = pkg[len(prefix):] if pkg.startswith(prefix): |