summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/base.bbclass20
-rw-r--r--meta/classes/insane.bbclass2
-rw-r--r--meta/classes/package.bbclass18
-rw-r--r--meta/classes/package_deb.bbclass4
-rw-r--r--meta/classes/package_ipk.bbclass4
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
935do_build = "" 935do_build = ""
936do_build[func] = "1" 936do_build[func] = "1"
937 937
938# Functions that update metadata based on files outputted
939# during the build process.
940
941def explode_deps(s):
942 r = []
943 l = s.split()
944 flag = False
945 for i in l:
946 if i[0] == '(':
947 flag = True
948 j = []
949 if flag:
950 j.append(i)
951 if i.endswith(')'):
952 flag = False
953 r[-1] += ' ' + ' '.join(j)
954 else:
955 r.append(i)
956 return r
957
958# Make sure MACHINE isn't exported 938# Make sure MACHINE isn't exported
959# (breaks binutils at least) 939# (breaks binutils at least)
960MACHINE[unexport] = "1" 940MACHINE[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):
439 bb.data.update_data(localdata) 439 bb.data.update_data(localdata)
440 440
441 # Now check the RDEPENDS 441 # Now check the RDEPENDS
442 rdepends = explode_deps(bb.data.getVar('RDEPENDS', localdata, True) or "") 442 rdepends = bb.utils.explode_deps(bb.data.getVar('RDEPENDS', localdata, True) or "")
443 443
444 444
445 # Now do the sanity check!!! 445 # 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):
210 #bb.note("%s before: %s" % (varname, bb.data.getVar(varname, d, 1))) 210 #bb.note("%s before: %s" % (varname, bb.data.getVar(varname, d, 1)))
211 211
212 new_depends = [] 212 new_depends = []
213 for depend in explode_deps(bb.data.getVar(varname, d, 1) or ""): 213 for depend in bb.utils.explode_deps(bb.data.getVar(varname, d, 1) or ""):
214 # Have to be careful with any version component of the depend 214 # Have to be careful with any version component of the depend
215 split_depend = depend.split(' (') 215 split_depend = depend.split(' (')
216 new_depend = get_package_mapping(split_depend[0].strip(), d) 216 new_depend = get_package_mapping(split_depend[0].strip(), d)
@@ -440,7 +440,7 @@ python populate_packages () {
440 dangling_links[pkg].append(os.path.normpath(target)) 440 dangling_links[pkg].append(os.path.normpath(target))
441 441
442 for pkg in package_list: 442 for pkg in package_list:
443 rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or "") 443 rdepends = bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or "")
444 for l in dangling_links[pkg]: 444 for l in dangling_links[pkg]:
445 found = False 445 found = False
446 bb.debug(1, "%s contains dangling link %s" % (pkg, l)) 446 bb.debug(1, "%s contains dangling link %s" % (pkg, l))
@@ -870,7 +870,7 @@ python package_do_pkgconfig () {
870python read_shlibdeps () { 870python read_shlibdeps () {
871 packages = bb.data.getVar('PACKAGES', d, 1).split() 871 packages = bb.data.getVar('PACKAGES', d, 1).split()
872 for pkg in packages: 872 for pkg in packages:
873 rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "") 873 rdepends = bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
874 for extension in ".shlibdeps", ".pcdeps", ".clilibdeps": 874 for extension in ".shlibdeps", ".pcdeps", ".clilibdeps":
875 depsfile = bb.data.expand("${PKGDEST}/" + pkg + extension, d) 875 depsfile = bb.data.expand("${PKGDEST}/" + pkg + extension, d)
876 if os.access(depsfile, os.R_OK): 876 if os.access(depsfile, os.R_OK):
@@ -903,7 +903,7 @@ python package_depchains() {
903 def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d): 903 def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d):
904 904
905 #bb.note('depends for %s is %s' % (base, depends)) 905 #bb.note('depends for %s is %s' % (base, depends))
906 rreclist = explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "") 906 rreclist = bb.utils.explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "")
907 907
908 for depend in depends: 908 for depend in depends:
909 if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'): 909 if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'):
@@ -924,7 +924,7 @@ python package_depchains() {
924 def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d): 924 def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d):
925 925
926 #bb.note('rdepends for %s is %s' % (base, rdepends)) 926 #bb.note('rdepends for %s is %s' % (base, rdepends))
927 rreclist = explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "") 927 rreclist = bb.utils.explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "")
928 928
929 for depend in rdepends: 929 for depend in rdepends:
930 if depend.find('virtual-locale-') != -1: 930 if depend.find('virtual-locale-') != -1:
@@ -948,15 +948,15 @@ python package_depchains() {
948 list.append(dep) 948 list.append(dep)
949 949
950 depends = [] 950 depends = []
951 for dep in explode_deps(bb.data.getVar('DEPENDS', d, 1) or ""): 951 for dep in bb.utils.explode_deps(bb.data.getVar('DEPENDS', d, 1) or ""):
952 add_dep(depends, dep) 952 add_dep(depends, dep)
953 953
954 rdepends = [] 954 rdepends = []
955 for dep in explode_deps(bb.data.getVar('RDEPENDS', d, 1) or ""): 955 for dep in bb.utils.explode_deps(bb.data.getVar('RDEPENDS', d, 1) or ""):
956 add_dep(rdepends, dep) 956 add_dep(rdepends, dep)
957 957
958 for pkg in packages.split(): 958 for pkg in packages.split():
959 for dep in explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 1) or ""): 959 for dep in bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 1) or ""):
960 add_dep(rdepends, dep) 960 add_dep(rdepends, dep)
961 961
962 #bb.note('rdepends is %s' % rdepends) 962 #bb.note('rdepends is %s' % rdepends)
@@ -989,7 +989,7 @@ python package_depchains() {
989 pkg_addrrecs(pkg, base, suffix, func, rdepends, d) 989 pkg_addrrecs(pkg, base, suffix, func, rdepends, d)
990 else: 990 else:
991 rdeps = [] 991 rdeps = []
992 for dep in explode_deps(bb.data.getVar('RDEPENDS_' + base, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or ""): 992 for dep in bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + base, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or ""):
993 add_dep(rdeps, dep) 993 add_dep(rdeps, dep)
994 pkg_addrrecs(pkg, base, suffix, func, rdeps, d) 994 pkg_addrrecs(pkg, base, suffix, func, rdeps, d)
995} 995}
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 () {
194 194
195 bb.build.exec_func("mapping_rename_hook", localdata) 195 bb.build.exec_func("mapping_rename_hook", localdata)
196 196
197 rdepends = explode_deps(unicode(bb.data.getVar("RDEPENDS", localdata, 1) or "")) 197 rdepends = bb.utils.explode_deps(unicode(bb.data.getVar("RDEPENDS", localdata, 1) or ""))
198 rdepends = [dep for dep in rdepends if not '*' in dep] 198 rdepends = [dep for dep in rdepends if not '*' in dep]
199 rrecommends = explode_deps(unicode(bb.data.getVar("RRECOMMENDS", localdata, 1) or "")) 199 rrecommends = bb.utils.explode_deps(unicode(bb.data.getVar("RRECOMMENDS", localdata, 1) or ""))
200 rrecommends = [rec for rec in rrecommends if not '*' in rec] 200 rrecommends = [rec for rec in rrecommends if not '*' in rec]
201 rsuggests = (unicode(bb.data.getVar("RSUGGESTS", localdata, 1) or "")).split() 201 rsuggests = (unicode(bb.data.getVar("RSUGGESTS", localdata, 1) or "")).split()
202 rprovides = (unicode(bb.data.getVar("RPROVIDES", localdata, 1) or "")).split() 202 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 () {
235 235
236 bb.build.exec_func("mapping_rename_hook", localdata) 236 bb.build.exec_func("mapping_rename_hook", localdata)
237 237
238 rdepends = explode_deps(bb.data.getVar("RDEPENDS", localdata, 1) or "") 238 rdepends = bb.utils.explode_deps(bb.data.getVar("RDEPENDS", localdata, 1) or "")
239 rrecommends = explode_deps(bb.data.getVar("RRECOMMENDS", localdata, 1) or "") 239 rrecommends = bb.utils.explode_deps(bb.data.getVar("RRECOMMENDS", localdata, 1) or "")
240 rsuggests = (bb.data.getVar("RSUGGESTS", localdata, 1) or "").split() 240 rsuggests = (bb.data.getVar("RSUGGESTS", localdata, 1) or "").split()
241 rprovides = (bb.data.getVar("RPROVIDES", localdata, 1) or "").split() 241 rprovides = (bb.data.getVar("RPROVIDES", localdata, 1) or "").split()
242 rreplaces = (bb.data.getVar("RREPLACES", localdata, 1) or "").split() 242 rreplaces = (bb.data.getVar("RREPLACES", localdata, 1) or "").split()