summaryrefslogtreecommitdiff
path: root/classes/package.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2008-02-19 12:33:09 +0000
committerRichard Purdie <rpurdie@rpsys.net>2008-02-19 12:33:09 +0000
commit7406b7866936a6e4744ee130d95441442eb2efa8 (patch)
tree16571c448941aec60e01eebe3fb13a624d55a749 /classes/package.bbclass
parent06943f4e268cd80b0ac1601e7da7d3cb0a173917 (diff)
package.bbclass: Add various depchains improvements/fixes from poky. This whole functionality ideally needs rewriting but this fixes various important issues with SDK generation
Diffstat (limited to 'classes/package.bbclass')
-rw-r--r--classes/package.bbclass35
1 files changed, 33 insertions, 2 deletions
diff --git a/classes/package.bbclass b/classes/package.bbclass
index 0b3a28926b..3137b6a041 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -793,14 +793,39 @@ 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
+ if depend.endswith('-dev'):
+ depend = depend.replace('-dev', '')
+ if depend.endswith('-dbg'):
+ depend = depend.replace('-dbg', '')
+ 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:
+ if depend.endswith('-dev'):
+ depend = depend.replace('-dev', '')
+ if depend.endswith('-dbg'):
+ depend = depend.replace('-dbg', '')
pkgname = getname(depend, suffix)
- if not pkgname in rreclist and packaged(pkgname, d):
+ if not pkgname in rreclist:
rreclist.append(pkgname)
#bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist)))
@@ -811,6 +836,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)
@@ -843,6 +872,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: