diff options
author | Richard Purdie <richard@ted.(none)> | 2009-01-25 17:20:05 +0000 |
---|---|---|
committer | Richard Purdie <richard@ted.(none)> | 2009-02-05 23:54:11 +0000 |
commit | be10b46b7325a0df84a0133350eba4d1c4874de9 (patch) | |
tree | 5e848f8e492eed61b66c54b49b68a0cd0303702d /meta | |
parent | c2c16bced84f488622467ae31e60aa07253b24cf (diff) | |
download | openembedded-core-be10b46b7325a0df84a0133350eba4d1c4874de9.tar.gz openembedded-core-be10b46b7325a0df84a0133350eba4d1c4874de9.tar.bz2 openembedded-core-be10b46b7325a0df84a0133350eba4d1c4874de9.zip |
base.bbclass: Use explode_deps from bb.utils and remove the obsolete base.bbclass version
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/base.bbclass | 20 | ||||
-rw-r--r-- | meta/classes/insane.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/package.bbclass | 18 | ||||
-rw-r--r-- | meta/classes/package_deb.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/package_ipk.bbclass | 4 |
5 files changed, 14 insertions, 34 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 0a5facf6e3..1f280a0dc5 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -935,26 +935,6 @@ addtask build after do_populate_staging do_build = "" do_build[func] = "1" -# Functions that update metadata based on files outputted -# during the build process. - -def explode_deps(s): - r = [] - l = s.split() - flag = False - for i in l: - if i[0] == '(': - flag = True - j = [] - if flag: - j.append(i) - if i.endswith(')'): - flag = False - r[-1] += ' ' + ' '.join(j) - else: - r.append(i) - return r - # Make sure MACHINE isn't exported # (breaks binutils at least) MACHINE[unexport] = "1" diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 1f136d78ce..2b0c284775 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -439,7 +439,7 @@ def package_qa_check_rdepends(pkg, workdir, d): bb.data.update_data(localdata) # Now check the RDEPENDS - rdepends = explode_deps(bb.data.getVar('RDEPENDS', localdata, True) or "") + rdepends = bb.utils.explode_deps(bb.data.getVar('RDEPENDS', localdata, True) or "") # Now do the sanity check!!! diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 3edec82e4a..fa53b1358c 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -210,7 +210,7 @@ def runtime_mapping_rename (varname, d): #bb.note("%s before: %s" % (varname, bb.data.getVar(varname, d, 1))) new_depends = [] - for depend in explode_deps(bb.data.getVar(varname, d, 1) or ""): + for depend in bb.utils.explode_deps(bb.data.getVar(varname, d, 1) or ""): # Have to be careful with any version component of the depend split_depend = depend.split(' (') new_depend = get_package_mapping(split_depend[0].strip(), d) @@ -440,7 +440,7 @@ python populate_packages () { dangling_links[pkg].append(os.path.normpath(target)) for pkg in package_list: - rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or "") + rdepends = bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or "") for l in dangling_links[pkg]: found = False bb.debug(1, "%s contains dangling link %s" % (pkg, l)) @@ -870,7 +870,7 @@ python package_do_pkgconfig () { python read_shlibdeps () { packages = bb.data.getVar('PACKAGES', d, 1).split() for pkg in packages: - rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "") + rdepends = bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "") for extension in ".shlibdeps", ".pcdeps", ".clilibdeps": depsfile = bb.data.expand("${PKGDEST}/" + pkg + extension, d) if os.access(depsfile, os.R_OK): @@ -903,7 +903,7 @@ python package_depchains() { 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 "") + rreclist = bb.utils.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/'): @@ -924,7 +924,7 @@ python package_depchains() { def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d): #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 "") + rreclist = bb.utils.explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "") for depend in rdepends: if depend.find('virtual-locale-') != -1: @@ -948,15 +948,15 @@ python package_depchains() { list.append(dep) depends = [] - for dep in explode_deps(bb.data.getVar('DEPENDS', d, 1) or ""): + for dep in bb.utils.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 ""): + for dep in bb.utils.explode_deps(bb.data.getVar('RDEPENDS', d, 1) or ""): add_dep(rdepends, dep) for pkg in packages.split(): - for dep in explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 1) or ""): + for dep in bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 1) or ""): add_dep(rdepends, dep) #bb.note('rdepends is %s' % rdepends) @@ -989,7 +989,7 @@ python package_depchains() { pkg_addrrecs(pkg, base, suffix, func, rdepends, d) else: rdeps = [] - for dep in explode_deps(bb.data.getVar('RDEPENDS_' + base, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or ""): + for dep in bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + base, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or ""): add_dep(rdeps, dep) pkg_addrrecs(pkg, base, suffix, func, rdeps, d) } diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass index 28e67fcc9b..d90939fdb6 100644 --- a/meta/classes/package_deb.bbclass +++ b/meta/classes/package_deb.bbclass @@ -194,9 +194,9 @@ python do_package_deb () { bb.build.exec_func("mapping_rename_hook", localdata) - rdepends = explode_deps(unicode(bb.data.getVar("RDEPENDS", localdata, 1) or "")) + rdepends = bb.utils.explode_deps(unicode(bb.data.getVar("RDEPENDS", localdata, 1) or "")) rdepends = [dep for dep in rdepends if not '*' in dep] - rrecommends = explode_deps(unicode(bb.data.getVar("RRECOMMENDS", localdata, 1) or "")) + rrecommends = bb.utils.explode_deps(unicode(bb.data.getVar("RRECOMMENDS", localdata, 1) or "")) rrecommends = [rec for rec in rrecommends if not '*' in rec] rsuggests = (unicode(bb.data.getVar("RSUGGESTS", localdata, 1) or "")).split() rprovides = (unicode(bb.data.getVar("RPROVIDES", localdata, 1) or "")).split() diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index c4f53046f5..1aa2c814bb 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass @@ -235,8 +235,8 @@ python do_package_ipk () { bb.build.exec_func("mapping_rename_hook", localdata) - rdepends = explode_deps(bb.data.getVar("RDEPENDS", localdata, 1) or "") - rrecommends = explode_deps(bb.data.getVar("RRECOMMENDS", localdata, 1) or "") + rdepends = bb.utils.explode_deps(bb.data.getVar("RDEPENDS", localdata, 1) or "") + rrecommends = bb.utils.explode_deps(bb.data.getVar("RRECOMMENDS", localdata, 1) or "") rsuggests = (bb.data.getVar("RSUGGESTS", localdata, 1) or "").split() rprovides = (bb.data.getVar("RPROVIDES", localdata, 1) or "").split() rreplaces = (bb.data.getVar("RREPLACES", localdata, 1) or "").split() |