summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-03 11:21:22 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-05 10:23:53 -0800
commitb1aeaa8b0dcf27ef8dcd87279901c6f5817d9e94 (patch)
tree62b315fdc05e03677922a0161fdc7a39e2985466
parent22f0df2aa737bda1ae3bce862ee5ceba5b2d204b (diff)
downloadpoky-b1aeaa8b0dcf27ef8dcd87279901c6f5817d9e94.tar.gz
meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)
sed \ -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data.expand *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/base.bbclass4
-rw-r--r--meta/classes/buildstats.bbclass12
-rw-r--r--meta/classes/cpan-base.bbclass2
-rw-r--r--meta/classes/icecc.bbclass26
-rw-r--r--meta/classes/image-swab.bbclass2
-rw-r--r--meta/classes/insane.bbclass2
-rw-r--r--meta/classes/kernel-yocto.bbclass2
-rw-r--r--meta/classes/package.bbclass24
-rw-r--r--meta/classes/package_deb.bbclass2
-rw-r--r--meta/classes/package_rpm.bbclass6
-rw-r--r--meta/classes/package_tar.bbclass4
-rw-r--r--meta/classes/recipe_sanity.bbclass6
-rw-r--r--meta/classes/relocatable.bbclass8
-rw-r--r--meta/classes/sanity.bbclass18
-rw-r--r--meta/classes/sourcepkg.bbclass4
-rw-r--r--meta/classes/sstate.bbclass30
-rw-r--r--meta/classes/syslinux.bbclass2
-rw-r--r--meta/classes/utility-tasks.bbclass2
-rw-r--r--meta/conf/distro/include/csl-versions.inc4
-rw-r--r--meta/conf/distro/include/tcmode-external-csl.inc2
-rw-r--r--meta/lib/oe/data.py2
-rw-r--r--meta/lib/oe/packagedata.py12
-rw-r--r--meta/recipes-connectivity/connman/connman.inc4
-rw-r--r--meta/recipes-core/base-passwd/base-passwd_3.5.22.bb4
-rw-r--r--meta/recipes-core/busybox/busybox.inc2
-rw-r--r--meta/recipes-core/ncurses/ncurses.inc4
-rw-r--r--meta/recipes-core/uclibc/uclibc.inc2
-rw-r--r--meta/recipes-devtools/apt/apt-native.inc2
-rw-r--r--meta/recipes-devtools/gcc/gcc-common.inc2
-rw-r--r--meta/recipes-devtools/gcc/gcc-package-cross.inc2
-rw-r--r--meta/recipes-devtools/perl/perl_5.14.2.bb2
-rw-r--r--meta/recipes-extended/lighttpd/lighttpd_1.4.30.bb2
-rw-r--r--meta/recipes-extended/pam/libpam_1.1.5.bb6
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.0.bb2
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.12.7.bb2
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.16.6.bb2
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.24.8.bb2
-rw-r--r--meta/recipes-graphics/directfb/directfb.inc2
-rw-r--r--meta/recipes-graphics/pango/pango.inc2
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-package.inc8
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio.inc2
-rw-r--r--meta/recipes-qt/qt-apps/qmmp_0.5.2.bb4
-rw-r--r--meta/recipes-qt/qt4/qt4.inc22
-rw-r--r--meta/recipes-support/libpcre/libpcre_8.21.bb2
44 files changed, 129 insertions, 129 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 48e4a28d83..82dcda9aec 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -122,7 +122,7 @@ def generate_git_config(e):
122 gitconfig_path = e.data.getVar('GIT_CONFIG', True) 122 gitconfig_path = e.data.getVar('GIT_CONFIG', True)
123 proxy_command = " gitProxy = %s\n" % data.getVar('OE_GIT_PROXY_COMMAND', e.data, True) 123 proxy_command = " gitProxy = %s\n" % data.getVar('OE_GIT_PROXY_COMMAND', e.data, True)
124 124
125 bb.mkdirhier(bb.data.expand("${GIT_CONFIG_PATH}", e.data)) 125 bb.mkdirhier(e.data.expand("${GIT_CONFIG_PATH}"))
126 if (os.path.exists(gitconfig_path)): 126 if (os.path.exists(gitconfig_path)):
127 os.remove(gitconfig_path) 127 os.remove(gitconfig_path)
128 128
@@ -307,7 +307,7 @@ python () {
307 def appendVar(varname, appends): 307 def appendVar(varname, appends):
308 if not appends: 308 if not appends:
309 return 309 return
310 varname = bb.data.expand(varname, d) 310 varname = d.expand(varname)
311 d.appendVar(varname, " " + " ".join(appends)) 311 d.appendVar(varname, " " + " ".join(appends))
312 312
313 extradeps = [] 313 extradeps = []
diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index efd3426c16..dc9afb101b 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -132,7 +132,7 @@ def get_timedata(var, data):
132def write_task_data(status, logfile, dev, e): 132def write_task_data(status, logfile, dev, e):
133 bn = get_bn(e) 133 bn = get_bn(e)
134 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn) 134 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
135 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data)) 135 taskdir = os.path.join(bsdir, e.data.expand("${PF}"))
136 file = open(os.path.join(logfile), "a") 136 file = open(os.path.join(logfile), "a")
137 timedata = get_timedata("__timedata_task", e.data) 137 timedata = get_timedata("__timedata_task", e.data)
138 if timedata: 138 if timedata:
@@ -205,7 +205,7 @@ python run_buildstats () {
205 bn = get_bn(e) 205 bn = get_bn(e)
206 device = get_device(e) 206 device = get_device(e)
207 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn) 207 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
208 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data)) 208 taskdir = os.path.join(bsdir, e.data.expand("${PF}"))
209 build_time = os.path.join(bsdir, "build_stats") 209 build_time = os.path.join(bsdir, "build_stats")
210 file = open(build_time, "a") 210 file = open(build_time, "a")
211 ######################################################################## 211 ########################################################################
@@ -230,7 +230,7 @@ python run_buildstats () {
230 bn = get_bn(e) 230 bn = get_bn(e)
231 device = get_device(e) 231 device = get_device(e)
232 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn) 232 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
233 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data)) 233 taskdir = os.path.join(bsdir, e.data.expand("${PF}"))
234 if device != "NoLogicalDevice": 234 if device != "NoLogicalDevice":
235 set_diskdata("__diskdata_task", device, e.data) 235 set_diskdata("__diskdata_task", device, e.data)
236 set_timedata("__timedata_task", e.data) 236 set_timedata("__timedata_task", e.data)
@@ -248,7 +248,7 @@ python run_buildstats () {
248 bn = get_bn(e) 248 bn = get_bn(e)
249 device = get_device(e) 249 device = get_device(e)
250 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn) 250 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
251 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data)) 251 taskdir = os.path.join(bsdir, e.data.expand("${PF}"))
252 write_task_data("passed", os.path.join(taskdir, e.task), device, e) 252 write_task_data("passed", os.path.join(taskdir, e.task), device, e)
253 if e.task == "do_rootfs": 253 if e.task == "do_rootfs":
254 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn) 254 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
@@ -263,7 +263,7 @@ python run_buildstats () {
263 bn = get_bn(e) 263 bn = get_bn(e)
264 device = get_device(e) 264 device = get_device(e)
265 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn) 265 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
266 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data)) 266 taskdir = os.path.join(bsdir, e.data.expand("${PF}"))
267 write_task_data("failed", os.path.join(taskdir, e.task), device, e) 267 write_task_data("failed", os.path.join(taskdir, e.task), device, e)
268 ######################################################################## 268 ########################################################################
269 # Lets make things easier and tell people where the build failed in 269 # Lets make things easier and tell people where the build failed in
@@ -272,7 +272,7 @@ python run_buildstats () {
272 ######################################################################## 272 ########################################################################
273 build_status = os.path.join(bsdir, "build_stats") 273 build_status = os.path.join(bsdir, "build_stats")
274 file = open(build_status,"a") 274 file = open(build_status,"a")
275 file.write(bb.data.expand("Failed at: ${PF} at task: %s \n" % e.task, e.data)) 275 file.write(e.data.expand("Failed at: ${PF} at task: %s \n" % e.task))
276 file.close() 276 file.close()
277 277
278} 278}
diff --git a/meta/classes/cpan-base.bbclass b/meta/classes/cpan-base.bbclass
index 6cb1fefc29..b4b7b81d8d 100644
--- a/meta/classes/cpan-base.bbclass
+++ b/meta/classes/cpan-base.bbclass
@@ -12,7 +12,7 @@ PERL_OWN_DIR = "${@["", "/perl-native"][(bb.data.inherits_class('native', d))]}"
12# Determine the staged version of perl from the perl configuration file 12# Determine the staged version of perl from the perl configuration file
13def get_perl_version(d): 13def get_perl_version(d):
14 import re 14 import re
15 cfg = bb.data.expand('${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/config.sh', d) 15 cfg = d.expand('${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/config.sh')
16 try: 16 try:
17 f = open(cfg, 'r') 17 f = open(cfg, 'r')
18 except IOError: 18 except IOError:
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index a14e02db0e..45570739f2 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -39,7 +39,7 @@ def icecc_dep_prepend(d):
39DEPENDS_prepend += "${@icecc_dep_prepend(d)} " 39DEPENDS_prepend += "${@icecc_dep_prepend(d)} "
40 40
41def get_cross_kernel_cc(bb,d): 41def get_cross_kernel_cc(bb,d):
42 kernel_cc = bb.data.expand('${KERNEL_CC}', d) 42 kernel_cc = d.expand('${KERNEL_CC}')
43 kernel_cc = kernel_cc.replace('ccache', '').strip() 43 kernel_cc = kernel_cc.replace('ccache', '').strip()
44 kernel_cc = kernel_cc.split(' ')[0] 44 kernel_cc = kernel_cc.split(' ')[0]
45 kernel_cc = kernel_cc.strip() 45 kernel_cc = kernel_cc.strip()
@@ -49,7 +49,7 @@ def create_path(compilers, bb, d):
49 """ 49 """
50 Create Symlinks for the icecc in the staging directory 50 Create Symlinks for the icecc in the staging directory
51 """ 51 """
52 staging = os.path.join(bb.data.expand('${STAGING_BINDIR}', d), "ice") 52 staging = os.path.join(d.expand('${STAGING_BINDIR}'), "ice")
53 if icc_is_kernel(bb, d): 53 if icc_is_kernel(bb, d):
54 staging += "-kernel" 54 staging += "-kernel"
55 55
@@ -78,7 +78,7 @@ def create_path(compilers, bb, d):
78 return staging 78 return staging
79 79
80def use_icc(bb,d): 80def use_icc(bb,d):
81 package_tmp = bb.data.expand('${PN}', d) 81 package_tmp = d.expand('${PN}')
82 82
83 system_class_blacklist = [ "none" ] 83 system_class_blacklist = [ "none" ]
84 user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL') or "none").split() 84 user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL') or "none").split()
@@ -101,7 +101,7 @@ def use_icc(bb,d):
101 return "no" 101 return "no"
102 102
103 if d.getVar('PARALLEL_MAKE') == "": 103 if d.getVar('PARALLEL_MAKE') == "":
104 bb.note(package_tmp, " ", bb.data.expand('${PV}', d), " has empty PARALLEL_MAKE, disable icecc") 104 bb.note(package_tmp, " ", d.expand('${PV}'), " has empty PARALLEL_MAKE, disable icecc")
105 return "no" 105 return "no"
106 106
107 return "yes" 107 return "yes"
@@ -124,19 +124,19 @@ def icc_version(bb, d):
124 124
125 if icc_is_native(bb, d): 125 if icc_is_native(bb, d):
126 archive_name = "local-host-env" 126 archive_name = "local-host-env"
127 elif bb.data.expand('${HOST_PREFIX}', d) == "": 127 elif d.expand('${HOST_PREFIX}') == "":
128 bb.fatal(bb.data.expand("${PN}", d), " NULL prefix") 128 bb.fatal(d.expand("${PN}"), " NULL prefix")
129 else: 129 else:
130 prefix = bb.data.expand('${HOST_PREFIX}' , d) 130 prefix = d.expand('${HOST_PREFIX}' )
131 distro = bb.data.expand('${DISTRO}', d) 131 distro = d.expand('${DISTRO}')
132 target_sys = bb.data.expand('${TARGET_SYS}', d) 132 target_sys = d.expand('${TARGET_SYS}')
133 float = d.getVar('TARGET_FPU') or "hard" 133 float = d.getVar('TARGET_FPU') or "hard"
134 archive_name = prefix + distro + "-" + target_sys + "-" + float 134 archive_name = prefix + distro + "-" + target_sys + "-" + float
135 if icc_is_kernel(bb, d): 135 if icc_is_kernel(bb, d):
136 archive_name += "-kernel" 136 archive_name += "-kernel"
137 137
138 import socket 138 import socket
139 ice_dir = bb.data.expand('${STAGING_DIR_NATIVE}${prefix_native}', d) 139 ice_dir = d.expand('${STAGING_DIR_NATIVE}${prefix_native}')
140 tar_file = os.path.join(ice_dir, 'ice', archive_name + "-@VERSION@-" + socket.gethostname() + '.tar.gz') 140 tar_file = os.path.join(ice_dir, 'ice', archive_name + "-@VERSION@-" + socket.gethostname() + '.tar.gz')
141 141
142 return tar_file 142 return tar_file
@@ -146,7 +146,7 @@ def icc_path(bb,d):
146 return create_path( [get_cross_kernel_cc(bb,d), ], bb, d) 146 return create_path( [get_cross_kernel_cc(bb,d), ], bb, d)
147 147
148 else: 148 else:
149 prefix = bb.data.expand('${HOST_PREFIX}', d) 149 prefix = d.expand('${HOST_PREFIX}')
150 return create_path( [prefix+"gcc", prefix+"g++"], bb, d) 150 return create_path( [prefix+"gcc", prefix+"g++"], bb, d)
151 151
152def icc_get_tool(bb, d, tool): 152def icc_get_tool(bb, d, tool):
@@ -155,8 +155,8 @@ def icc_get_tool(bb, d, tool):
155 elif icc_is_kernel(bb, d): 155 elif icc_is_kernel(bb, d):
156 return os.popen("which %s" % get_cross_kernel_cc(bb, d)).read()[:-1] 156 return os.popen("which %s" % get_cross_kernel_cc(bb, d)).read()[:-1]
157 else: 157 else:
158 ice_dir = bb.data.expand('${STAGING_BINDIR_TOOLCHAIN}', d) 158 ice_dir = d.expand('${STAGING_BINDIR_TOOLCHAIN}')
159 target_sys = bb.data.expand('${TARGET_SYS}', d) 159 target_sys = d.expand('${TARGET_SYS}')
160 return os.path.join(ice_dir, "%s-%s" % (target_sys, tool)) 160 return os.path.join(ice_dir, "%s-%s" % (target_sys, tool))
161 161
162set_icecc_env() { 162set_icecc_env() {
diff --git a/meta/classes/image-swab.bbclass b/meta/classes/image-swab.bbclass
index 5aace0f5c8..0414653f72 100644
--- a/meta/classes/image-swab.bbclass
+++ b/meta/classes/image-swab.bbclass
@@ -54,7 +54,7 @@ python() {
54 deps = (d.getVarFlag('do_setscene', 'depends') or "").split() 54 deps = (d.getVarFlag('do_setscene', 'depends') or "").split()
55 deps.append('strace-native:do_populate_sysroot') 55 deps.append('strace-native:do_populate_sysroot')
56 d.setVarFlag('do_setscene', 'depends', " ".join(deps)) 56 d.setVarFlag('do_setscene', 'depends', " ".join(deps))
57 logdir = bb.data.expand("${TRACE_LOGDIR}", d) 57 logdir = d.expand("${TRACE_LOGDIR}")
58 bb.utils.mkdirhier(logdir) 58 bb.utils.mkdirhier(logdir)
59 else: 59 else:
60 d.setVar('STRACEFUNC', '') 60 d.setVar('STRACEFUNC', '')
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 7a84465ca6..6298136c39 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -673,7 +673,7 @@ python do_package_qa () {
673python do_qa_staging() { 673python do_qa_staging() {
674 bb.note("QA checking staging") 674 bb.note("QA checking staging")
675 675
676 if not package_qa_check_staged(bb.data.expand('${SYSROOT_DESTDIR}/${STAGING_LIBDIR}',d), d): 676 if not package_qa_check_staged(d.expand('${SYSROOT_DESTDIR}/${STAGING_LIBDIR}'), d):
677 bb.fatal("QA staging was broken by the package built above") 677 bb.fatal("QA staging was broken by the package built above")
678} 678}
679 679
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 187e3cc07c..aabca789cf 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -244,7 +244,7 @@ python do_kernel_configcheck() {
244 bb.plain("NOTE: validating kernel configuration") 244 bb.plain("NOTE: validating kernel configuration")
245 245
246 pathprefix = "export PATH=%s:%s; " % (d.getVar('PATH', True), "${S}/scripts/util/") 246 pathprefix = "export PATH=%s:%s; " % (d.getVar('PATH', True), "${S}/scripts/util/")
247 cmd = bb.data.expand("cd ${B}/..; kconf_check -config- ${B} ${S} ${B} ${KBRANCH}",d ) 247 cmd = d.expand("cd ${B}/..; kconf_check -config- ${B} ${S} ${B} ${KBRANCH}")
248 ret, result = commands.getstatusoutput("%s%s" % (pathprefix, cmd)) 248 ret, result = commands.getstatusoutput("%s%s" % (pathprefix, cmd))
249 249
250 bb.plain( "%s" % result ) 250 bb.plain( "%s" % result )
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 5c42619f3f..e8c449711f 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -195,10 +195,10 @@ def splitfile(file, debugfile, debugsrcdir, d):
195 dvar = d.getVar('PKGD', True) 195 dvar = d.getVar('PKGD', True)
196 pathprefix = "export PATH=%s; " % d.getVar('PATH', True) 196 pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
197 objcopy = d.getVar("OBJCOPY", True) 197 objcopy = d.getVar("OBJCOPY", True)
198 debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d) 198 debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
199 workdir = d.getVar("WORKDIR", True) 199 workdir = d.getVar("WORKDIR", True)
200 workparentdir = os.path.dirname(workdir) 200 workparentdir = os.path.dirname(workdir)
201 sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d) 201 sourcefile = d.expand("${WORKDIR}/debugsources.list")
202 202
203 # We ignore kernel modules, we don't generate debug info files. 203 # We ignore kernel modules, we don't generate debug info files.
204 if file.find("/lib/modules/") != -1 and file.endswith(".ko"): 204 if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
@@ -238,11 +238,11 @@ def splitfile2(debugsrcdir, d):
238 pathprefix = "export PATH=%s; " % d.getVar('PATH', True) 238 pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
239 strip = d.getVar("STRIP", True) 239 strip = d.getVar("STRIP", True)
240 objcopy = d.getVar("OBJCOPY", True) 240 objcopy = d.getVar("OBJCOPY", True)
241 debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d) 241 debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
242 workdir = d.getVar("WORKDIR", True) 242 workdir = d.getVar("WORKDIR", True)
243 workparentdir = os.path.dirname(workdir) 243 workparentdir = os.path.dirname(workdir)
244 workbasedir = os.path.basename(workdir) 244 workbasedir = os.path.basename(workdir)
245 sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d) 245 sourcefile = d.expand("${WORKDIR}/debugsources.list")
246 246
247 if debugsrcdir: 247 if debugsrcdir:
248 nosuchdir = [] 248 nosuchdir = []
@@ -624,7 +624,7 @@ python fixup_perms () {
624 if len(lsplit) != 8 and not (len(lsplit) == 3 and lsplit[1].lower() == "link"): 624 if len(lsplit) != 8 and not (len(lsplit) == 3 and lsplit[1].lower() == "link"):
625 bb.error("Fixup perms: %s invalid line: %s" % (conf, line)) 625 bb.error("Fixup perms: %s invalid line: %s" % (conf, line))
626 continue 626 continue
627 entry = fs_perms_entry(bb.data.expand(line, d)) 627 entry = fs_perms_entry(d.expand(line))
628 if entry and entry.path: 628 if entry and entry.path:
629 fs_perms_table[entry.path] = entry 629 fs_perms_table[entry.path] = entry
630 f.close() 630 f.close()
@@ -1071,9 +1071,9 @@ python emit_pkgdata() {
1071 pkgdatadir = d.getVar('PKGDESTWORK', True) 1071 pkgdatadir = d.getVar('PKGDESTWORK', True)
1072 1072
1073 # Take shared lock since we're only reading, not writing 1073 # Take shared lock since we're only reading, not writing
1074 lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d), True) 1074 lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"), True)
1075 1075
1076 data_file = pkgdatadir + bb.data.expand("/${PN}" , d) 1076 data_file = pkgdatadir + d.expand("/${PN}" )
1077 f = open(data_file, 'w') 1077 f = open(data_file, 'w')
1078 f.write("PACKAGES: %s\n" % packages) 1078 f.write("PACKAGES: %s\n" % packages)
1079 f.close() 1079 f.close()
@@ -1154,7 +1154,7 @@ python package_do_filedeps() {
1154 pkgdest = d.getVar('PKGDEST', True) 1154 pkgdest = d.getVar('PKGDEST', True)
1155 packages = d.getVar('PACKAGES', True) 1155 packages = d.getVar('PACKAGES', True)
1156 1156
1157 rpmdeps = bb.data.expand("${RPMDEPS}", d) 1157 rpmdeps = d.expand("${RPMDEPS}")
1158 r = re.compile(r'[<>=]+ +[^ ]*') 1158 r = re.compile(r'[<>=]+ +[^ ]*')
1159 1159
1160 # Quick routine to process the results of the rpmdeps call... 1160 # Quick routine to process the results of the rpmdeps call...
@@ -1253,7 +1253,7 @@ python package_do_shlibs() {
1253 shlibswork_dir = d.getVar('SHLIBSWORKDIR', True) 1253 shlibswork_dir = d.getVar('SHLIBSWORKDIR', True)
1254 1254
1255 # Take shared lock since we're only reading, not writing 1255 # Take shared lock since we're only reading, not writing
1256 lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d)) 1256 lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
1257 1257
1258 def linux_so(root, path, file): 1258 def linux_so(root, path, file):
1259 cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(os.path.join(root, file)) + " 2>/dev/null" 1259 cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(os.path.join(root, file)) + " 2>/dev/null"
@@ -1499,7 +1499,7 @@ python package_do_pkgconfig () {
1499 if m: 1499 if m:
1500 name = m.group(1) 1500 name = m.group(1)
1501 val = m.group(2) 1501 val = m.group(2)
1502 pd.setVar(name, bb.data.expand(val, pd)) 1502 pd.setVar(name, pd.expand(val))
1503 continue 1503 continue
1504 m = field_re.match(l) 1504 m = field_re.match(l)
1505 if m: 1505 if m:
@@ -1509,7 +1509,7 @@ python package_do_pkgconfig () {
1509 pkgconfig_needed[pkg] += exp.replace(',', ' ').split() 1509 pkgconfig_needed[pkg] += exp.replace(',', ' ').split()
1510 1510
1511 # Take shared lock since we're only reading, not writing 1511 # Take shared lock since we're only reading, not writing
1512 lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d)) 1512 lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
1513 1513
1514 for pkg in packages.split(): 1514 for pkg in packages.split():
1515 pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist") 1515 pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist")
@@ -1560,7 +1560,7 @@ python read_shlibdeps () {
1560 rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False) or "") 1560 rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False) or "")
1561 1561
1562 for extension in ".shlibdeps", ".pcdeps", ".clilibdeps": 1562 for extension in ".shlibdeps", ".pcdeps", ".clilibdeps":
1563 depsfile = bb.data.expand("${PKGDEST}/" + pkg + extension, d) 1563 depsfile = d.expand("${PKGDEST}/" + pkg + extension)
1564 if os.access(depsfile, os.R_OK): 1564 if os.access(depsfile, os.R_OK):
1565 fd = file(depsfile) 1565 fd = file(depsfile)
1566 lines = fd.readlines() 1566 lines = fd.readlines()
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 8721fd2121..1f7ec9ca3e 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -20,7 +20,7 @@ python do_package_deb_install () {
20 pkgfn = d.getVar('PKGFN', True) 20 pkgfn = d.getVar('PKGFN', True)
21 rootfs = d.getVar('IMAGE_ROOTFS', True) 21 rootfs = d.getVar('IMAGE_ROOTFS', True)
22 debdir = d.getVar('DEPLOY_DIR_DEB', True) 22 debdir = d.getVar('DEPLOY_DIR_DEB', True)
23 apt_config = bb.data.expand('${STAGING_ETCDIR_NATIVE}/apt/apt.conf', d) 23 apt_config = d.expand('${STAGING_ETCDIR_NATIVE}/apt/apt.conf')
24 stagingbindir = d.getVar('STAGING_BINDIR_NATIVE', True) 24 stagingbindir = d.getVar('STAGING_BINDIR_NATIVE', True)
25 tmpdir = d.getVar('TMPDIR', True) 25 tmpdir = d.getVar('TMPDIR', True)
26 26
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index af8c63ed6f..68313eccc8 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -998,9 +998,9 @@ python do_package_rpm () {
998 d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch) 998 d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch)
999 else: 999 else:
1000 d.setVar('PACKAGE_ARCH_EXTEND', package_arch) 1000 d.setVar('PACKAGE_ARCH_EXTEND', package_arch)
1001 pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}', d) 1001 pkgwritedir = d.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH_EXTEND}')
1002 pkgarch = bb.data.expand('${PACKAGE_ARCH_EXTEND}${TARGET_VENDOR}-${TARGET_OS}', d) 1002 pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${TARGET_VENDOR}-${TARGET_OS}')
1003 magicfile = bb.data.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc', d) 1003 magicfile = d.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc')
1004 bb.mkdirhier(pkgwritedir) 1004 bb.mkdirhier(pkgwritedir)
1005 os.chmod(pkgwritedir, 0755) 1005 os.chmod(pkgwritedir, 0755)
1006 1006
diff --git a/meta/classes/package_tar.bbclass b/meta/classes/package_tar.bbclass
index 7590177e4b..68b1bf0fed 100644
--- a/meta/classes/package_tar.bbclass
+++ b/meta/classes/package_tar.bbclass
@@ -4,7 +4,7 @@ IMAGE_PKGTYPE ?= "tar"
4 4
5python package_tar_fn () { 5python package_tar_fn () {
6 fn = os.path.join(d.getVar('DEPLOY_DIR_TAR'), "%s-%s-%s.tar.gz" % (d.getVar('PKG'), d.getVar('PKGV'), d.getVar('PKGR'))) 6 fn = os.path.join(d.getVar('DEPLOY_DIR_TAR'), "%s-%s-%s.tar.gz" % (d.getVar('PKG'), d.getVar('PKGV'), d.getVar('PKGR')))
7 fn = bb.data.expand(fn, d) 7 fn = d.expand(fn)
8 d.setVar('PKGFN', fn) 8 d.setVar('PKGFN', fn)
9} 9}
10 10
@@ -68,7 +68,7 @@ python do_package_tar () {
68 overrides = localdata.getVar('OVERRIDES') 68 overrides = localdata.getVar('OVERRIDES')
69 if not overrides: 69 if not overrides:
70 raise bb.build.FuncFailed('OVERRIDES not defined') 70 raise bb.build.FuncFailed('OVERRIDES not defined')
71 overrides = bb.data.expand(overrides, localdata) 71 overrides = localdata.expand(overrides)
72 localdata.setVar('OVERRIDES', '%s:%s' % (overrides, pkg)) 72 localdata.setVar('OVERRIDES', '%s:%s' % (overrides, pkg))
73 73
74 bb.data.update_data(localdata) 74 bb.data.update_data(localdata)
diff --git a/meta/classes/recipe_sanity.bbclass b/meta/classes/recipe_sanity.bbclass
index b3246599b9..da8ad76c96 100644
--- a/meta/classes/recipe_sanity.bbclass
+++ b/meta/classes/recipe_sanity.bbclass
@@ -66,7 +66,7 @@ def can_use_autotools_base(cfgdata, d):
66def can_remove_FILESPATH(cfgdata, d): 66def can_remove_FILESPATH(cfgdata, d):
67 expected = cfgdata.get("FILESPATH") 67 expected = cfgdata.get("FILESPATH")
68 #expected = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in d.getVar('FILESPATHBASE', True).split(':') for p in d.getVar('FILESPATHPKG', True).split(':') for o in (d.getVar('OVERRIDES', True) + ':').split(':') if os.path.exists(os.path.join(fp, p, o))])}:${FILESDIR}" 68 #expected = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in d.getVar('FILESPATHBASE', True).split(':') for p in d.getVar('FILESPATHPKG', True).split(':') for o in (d.getVar('OVERRIDES', True) + ':').split(':') if os.path.exists(os.path.join(fp, p, o))])}:${FILESDIR}"
69 expectedpaths = bb.data.expand(expected, d) 69 expectedpaths = d.expand(expected)
70 unexpanded = d.getVar("FILESPATH", 0) 70 unexpanded = d.getVar("FILESPATH", 0)
71 filespath = d.getVar("FILESPATH", True).split(":") 71 filespath = d.getVar("FILESPATH", True).split(":")
72 filespath = [os.path.normpath(f) for f in filespath if os.path.exists(f)] 72 filespath = [os.path.normpath(f) for f in filespath if os.path.exists(f)]
@@ -91,7 +91,7 @@ def can_remove_FILESDIR(cfgdata, d):
91 return unexpanded != expected and \ 91 return unexpanded != expected and \
92 os.path.exists(expanded) and \ 92 os.path.exists(expanded) and \
93 (expanded in filespath or 93 (expanded in filespath or
94 expanded == bb.data.expand(expected, d)) 94 expanded == d.expand(expected))
95 95
96def can_remove_others(p, cfgdata, d): 96def can_remove_others(p, cfgdata, d):
97 for k in ["S", "PV", "PN", "DESCRIPTION", "LICENSE", "DEPENDS", 97 for k in ["S", "PV", "PN", "DESCRIPTION", "LICENSE", "DEPENDS",
@@ -104,7 +104,7 @@ def can_remove_others(p, cfgdata, d):
104 104
105 try: 105 try:
106 expanded = d.getVar(k, True) 106 expanded = d.getVar(k, True)
107 cfgexpanded = bb.data.expand(cfgunexpanded, d) 107 cfgexpanded = d.expand(cfgunexpanded)
108 except bb.fetch.ParameterError: 108 except bb.fetch.ParameterError:
109 continue 109 continue
110 110
diff --git a/meta/classes/relocatable.bbclass b/meta/classes/relocatable.bbclass
index 54227a91ca..072f533f4f 100644
--- a/meta/classes/relocatable.bbclass
+++ b/meta/classes/relocatable.bbclass
@@ -7,9 +7,9 @@ def process_dir (directory, d):
7 import subprocess as sub 7 import subprocess as sub
8 import stat 8 import stat
9 9
10 cmd = bb.data.expand('${CHRPATH_BIN}', d) 10 cmd = d.expand('${CHRPATH_BIN}')
11 tmpdir = d.getVar('TMPDIR') 11 tmpdir = d.getVar('TMPDIR')
12 basedir = bb.data.expand('${base_prefix}', d) 12 basedir = d.expand('${base_prefix}')
13 13
14 #bb.debug("Checking %s for binaries to process" % directory) 14 #bb.debug("Checking %s for binaries to process" % directory)
15 if not os.path.exists(directory): 15 if not os.path.exists(directory):
@@ -82,7 +82,7 @@ def process_dir (directory, d):
82 os.chmod(fpath, perms) 82 os.chmod(fpath, perms)
83 83
84def rpath_replace (path, d): 84def rpath_replace (path, d):
85 bindirs = bb.data.expand("${bindir} ${sbindir} ${base_sbindir} ${base_bindir} ${libdir} ${base_libdir} ${libexecdir} ${PREPROCESS_RELOCATE_DIRS}", d).split() 85 bindirs = d.expand("${bindir} ${sbindir} ${base_sbindir} ${base_bindir} ${libdir} ${base_libdir} ${libexecdir} ${PREPROCESS_RELOCATE_DIRS}").split()
86 86
87 for bindir in bindirs: 87 for bindir in bindirs:
88 #bb.note ("Processing directory " + bindir) 88 #bb.note ("Processing directory " + bindir)
@@ -90,5 +90,5 @@ def rpath_replace (path, d):
90 process_dir (directory, d) 90 process_dir (directory, d)
91 91
92python relocatable_binaries_preprocess() { 92python relocatable_binaries_preprocess() {
93 rpath_replace(bb.data.expand('${SYSROOT_DESTDIR}', d), d) 93 rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d)
94} 94}
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index d8835dae64..1b941ac58c 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -13,12 +13,12 @@ def raise_sanity_error(msg):
13 13
14def check_conf_exists(fn, data): 14def check_conf_exists(fn, data):
15 bbpath = [] 15 bbpath = []
16 fn = bb.data.expand(fn, data) 16 fn = data.expand(fn)
17 vbbpath = data.getVar("BBPATH") 17 vbbpath = data.getVar("BBPATH")
18 if vbbpath: 18 if vbbpath:
19 bbpath += vbbpath.split(":") 19 bbpath += vbbpath.split(":")
20 for p in bbpath: 20 for p in bbpath:
21 currname = os.path.join(bb.data.expand(p, data), fn) 21 currname = os.path.join(data.expand(p), fn)
22 if os.access(currname, os.R_OK): 22 if os.access(currname, os.R_OK):
23 return True 23 return True
24 return False 24 return False
@@ -411,16 +411,16 @@ def check_sanity(e):
411 f.write(current_abi) 411 f.write(current_abi)
412 elif abi == "2" and current_abi == "3": 412 elif abi == "2" and current_abi == "3":
413 bb.note("Converting staging from layout version 2 to layout version 3") 413 bb.note("Converting staging from layout version 2 to layout version 3")
414 os.system(bb.data.expand("mv ${TMPDIR}/staging ${TMPDIR}/sysroots", e.data)) 414 os.system(e.data.expand("mv ${TMPDIR}/staging ${TMPDIR}/sysroots"))
415 os.system(bb.data.expand("ln -s sysroots ${TMPDIR}/staging", e.data)) 415 os.system(e.data.expand("ln -s sysroots ${TMPDIR}/staging"))
416 os.system(bb.data.expand("cd ${TMPDIR}/stamps; for i in */*do_populate_staging; do new=`echo $i | sed -e 's/do_populate_staging/do_populate_sysroot/'`; mv $i $new; done", e.data)) 416 os.system(e.data.expand("cd ${TMPDIR}/stamps; for i in */*do_populate_staging; do new=`echo $i | sed -e 's/do_populate_staging/do_populate_sysroot/'`; mv $i $new; done"))
417 f = file(abifile, "w") 417 f = file(abifile, "w")
418 f.write(current_abi) 418 f.write(current_abi)
419 elif abi == "3" and current_abi == "4": 419 elif abi == "3" and current_abi == "4":
420 bb.note("Converting staging layout from version 3 to layout version 4") 420 bb.note("Converting staging layout from version 3 to layout version 4")
421 if os.path.exists(bb.data.expand("${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}", e.data)): 421 if os.path.exists(e.data.expand("${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}")):
422 os.system(bb.data.expand("mv ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS} ${STAGING_BINDIR_CROSS}", e.data)) 422 os.system(e.data.expand("mv ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS} ${STAGING_BINDIR_CROSS}"))
423 os.system(bb.data.expand("ln -s ${STAGING_BINDIR_CROSS} ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}", e.data)) 423 os.system(e.data.expand("ln -s ${STAGING_BINDIR_CROSS} ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}"))
424 424
425 f = file(abifile, "w") 425 f = file(abifile, "w")
426 f.write(current_abi) 426 f.write(current_abi)
@@ -428,7 +428,7 @@ def check_sanity(e):
428 messages = messages + "Staging layout has changed. The cross directory has been deprecated and cross packages are now built under the native sysroot.\nThis requires a rebuild.\n" 428 messages = messages + "Staging layout has changed. The cross directory has been deprecated and cross packages are now built under the native sysroot.\nThis requires a rebuild.\n"
429 elif abi == "5" and current_abi == "6": 429 elif abi == "5" and current_abi == "6":
430 bb.note("Converting staging layout from version 5 to layout version 6") 430 bb.note("Converting staging layout from version 5 to layout version 6")
431 os.system(bb.data.expand("mv ${TMPDIR}/pstagelogs ${SSTATE_MANIFESTS}", e.data)) 431 os.system(e.data.expand("mv ${TMPDIR}/pstagelogs ${SSTATE_MANIFESTS}"))
432 f = file(abifile, "w") 432 f = file(abifile, "w")
433 f.write(current_abi) 433 f.write(current_abi)
434 elif abi == "7" and current_abi == "8": 434 elif abi == "7" and current_abi == "8":
diff --git a/meta/classes/sourcepkg.bbclass b/meta/classes/sourcepkg.bbclass
index 2a78a90452..102c109324 100644
--- a/meta/classes/sourcepkg.bbclass
+++ b/meta/classes/sourcepkg.bbclass
@@ -17,7 +17,7 @@ def get_src_tree(d):
17 return 17 return
18 18
19 s_tree_raw = s.split('/')[1] 19 s_tree_raw = s.split('/')[1]
20 s_tree = bb.data.expand(s_tree_raw, d) 20 s_tree = d.expand(s_tree_raw)
21 21
22 src_tree_path = os.path.join(workdir, s_tree) 22 src_tree_path = os.path.join(workdir, s_tree)
23 try: 23 try:
@@ -59,7 +59,7 @@ python sourcepkg_do_dumpdata() {
59 distro = d.getVar('DISTRO', True) 59 distro = d.getVar('DISTRO', True)
60 s_tree = get_src_tree(d) 60 s_tree = get_src_tree(d)
61 openembeddeddir = os.path.join(workdir, s_tree, distro) 61 openembeddeddir = os.path.join(workdir, s_tree, distro)
62 dumpfile = os.path.join(openembeddeddir, bb.data.expand("${P}-${PR}.showdata.dump",d)) 62 dumpfile = os.path.join(openembeddeddir, d.expand("${P}-${PR}.showdata.dump"))
63 63
64 try: 64 try:
65 os.mkdir(openembeddeddir) 65 os.mkdir(openembeddeddir)
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index e4338e0f78..0d16d118d9 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -24,16 +24,16 @@ python () {
24 if bb.data.inherits_class('native', d): 24 if bb.data.inherits_class('native', d):
25 d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH')) 25 d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH'))
26 elif bb.data.inherits_class('cross', d): 26 elif bb.data.inherits_class('cross', d):
27 d.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${TUNE_PKGARCH}", d)) 27 d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${TUNE_PKGARCH}"))
28 d.setVar('SSTATE_MANMACH', bb.data.expand("${BUILD_ARCH}_${MACHINE}", d)) 28 d.setVar('SSTATE_MANMACH', d.expand("${BUILD_ARCH}_${MACHINE}"))
29 elif bb.data.inherits_class('crosssdk', d): 29 elif bb.data.inherits_class('crosssdk', d):
30 d.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${PACKAGE_ARCH}", d)) 30 d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${PACKAGE_ARCH}"))
31 elif bb.data.inherits_class('nativesdk', d): 31 elif bb.data.inherits_class('nativesdk', d):
32 d.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}", d)) 32 d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}"))
33 elif bb.data.inherits_class('cross-canadian', d): 33 elif bb.data.inherits_class('cross-canadian', d):
34 d.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}_${PACKAGE_ARCH}", d)) 34 d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}_${PACKAGE_ARCH}"))
35 else: 35 else:
36 d.setVar('SSTATE_MANMACH', bb.data.expand("${MACHINE}", d)) 36 d.setVar('SSTATE_MANMACH', d.expand("${MACHINE}"))
37 37
38 # These classes encode staging paths into their scripts data so can only be 38 # These classes encode staging paths into their scripts data so can only be
39 # reused if we manipulate the paths 39 # reused if we manipulate the paths
@@ -97,8 +97,8 @@ def sstate_install(ss, d):
97 97
98 sharedfiles = [] 98 sharedfiles = []
99 shareddirs = [] 99 shareddirs = []
100 bb.mkdirhier(bb.data.expand("${SSTATE_MANIFESTS}", d)) 100 bb.mkdirhier(d.expand("${SSTATE_MANIFESTS}"))
101 manifest = bb.data.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'], d) 101 manifest = d.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'])
102 102
103 if os.access(manifest, os.R_OK): 103 if os.access(manifest, os.R_OK):
104 bb.fatal("Package already staged (%s)?!" % manifest) 104 bb.fatal("Package already staged (%s)?!" % manifest)
@@ -153,7 +153,7 @@ def sstate_installpkg(ss, d):
153 bb.mkdirhier(dir) 153 bb.mkdirhier(dir)
154 oe.path.remove(dir) 154 oe.path.remove(dir)
155 155
156 sstateinst = bb.data.expand("${WORKDIR}/sstate-install-%s/" % ss['name'], d) 156 sstateinst = d.expand("${WORKDIR}/sstate-install-%s/" % ss['name'])
157 sstatepkg = d.getVar('SSTATE_PKG', True) + '_' + ss['name'] + ".tgz" 157 sstatepkg = d.getVar('SSTATE_PKG', True) + '_' + ss['name'] + ".tgz"
158 158
159 if not os.path.exists(sstatepkg): 159 if not os.path.exists(sstatepkg):
@@ -246,7 +246,7 @@ def sstate_clean_manifest(manifest, d):
246def sstate_clean(ss, d): 246def sstate_clean(ss, d):
247 import oe.path 247 import oe.path
248 248
249 manifest = bb.data.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'], d) 249 manifest = d.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'])
250 250
251 if os.path.exists(manifest): 251 if os.path.exists(manifest):
252 locks = [] 252 locks = []
@@ -351,7 +351,7 @@ def sstate_package(ss, d):
351 351
352 tmpdir = d.getVar('TMPDIR', True) 352 tmpdir = d.getVar('TMPDIR', True)
353 353
354 sstatebuild = bb.data.expand("${WORKDIR}/sstate-build-%s/" % ss['name'], d) 354 sstatebuild = d.expand("${WORKDIR}/sstate-build-%s/" % ss['name'])
355 sstatepkg = d.getVar('SSTATE_PKG', True) + '_'+ ss['name'] + ".tgz" 355 sstatepkg = d.getVar('SSTATE_PKG', True) + '_'+ ss['name'] + ".tgz"
356 bb.mkdirhier(sstatebuild) 356 bb.mkdirhier(sstatebuild)
357 bb.mkdirhier(os.path.dirname(sstatepkg)) 357 bb.mkdirhier(os.path.dirname(sstatepkg))
@@ -397,7 +397,7 @@ def pstaging_fetch(sstatepkg, d):
397 localdata = bb.data.createCopy(d) 397 localdata = bb.data.createCopy(d)
398 bb.data.update_data(localdata) 398 bb.data.update_data(localdata)
399 399
400 dldir = bb.data.expand("${SSTATE_DIR}", localdata) 400 dldir = localdata.expand("${SSTATE_DIR}")
401 srcuri = "file://" + os.path.basename(sstatepkg) 401 srcuri = "file://" + os.path.basename(sstatepkg)
402 402
403 bb.mkdirhier(dldir) 403 bb.mkdirhier(dldir)
@@ -484,7 +484,7 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d):
484 } 484 }
485 485
486 for task in range(len(sq_fn)): 486 for task in range(len(sq_fn)):
487 sstatefile = bb.data.expand("${SSTATE_DIR}/" + sq_hashfn[task] + "_" + mapping[sq_task[task]] + ".tgz", d) 487 sstatefile = d.expand("${SSTATE_DIR}/" + sq_hashfn[task] + "_" + mapping[sq_task[task]] + ".tgz")
488 sstatefile = sstatefile.replace("${BB_TASKHASH}", sq_hash[task]) 488 sstatefile = sstatefile.replace("${BB_TASKHASH}", sq_hash[task])
489 if os.path.exists(sstatefile): 489 if os.path.exists(sstatefile):
490 bb.debug(2, "SState: Found valid sstate file %s" % sstatefile) 490 bb.debug(2, "SState: Found valid sstate file %s" % sstatefile)
@@ -499,7 +499,7 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d):
499 localdata = bb.data.createCopy(d) 499 localdata = bb.data.createCopy(d)
500 bb.data.update_data(localdata) 500 bb.data.update_data(localdata)
501 501
502 dldir = bb.data.expand("${SSTATE_DIR}", localdata) 502 dldir = localdata.expand("${SSTATE_DIR}")
503 localdata.setVar('DL_DIR', dldir) 503 localdata.setVar('DL_DIR', dldir)
504 localdata.setVar('PREMIRRORS', mirrors) 504 localdata.setVar('PREMIRRORS', mirrors)
505 505
@@ -509,7 +509,7 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d):
509 if task in ret: 509 if task in ret:
510 continue 510 continue
511 511
512 sstatefile = bb.data.expand("${SSTATE_DIR}/" + sq_hashfn[task] + "_" + mapping[sq_task[task]] + ".tgz", d) 512 sstatefile = d.expand("${SSTATE_DIR}/" + sq_hashfn[task] + "_" + mapping[sq_task[task]] + ".tgz")
513 sstatefile = sstatefile.replace("${BB_TASKHASH}", sq_hash[task]) 513 sstatefile = sstatefile.replace("${BB_TASKHASH}", sq_hash[task])
514 514
515 srcuri = "file://" + os.path.basename(sstatefile) 515 srcuri = "file://" + os.path.basename(sstatefile)
diff --git a/meta/classes/syslinux.bbclass b/meta/classes/syslinux.bbclass
index b194fa69a3..700ea53911 100644
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -95,7 +95,7 @@ python build_syslinux_menu () {
95 overrides = localdata.getVar('OVERRIDES') 95 overrides = localdata.getVar('OVERRIDES')
96 if not overrides: 96 if not overrides:
97 raise bb.build.FuncFailed('OVERRIDES not defined') 97 raise bb.build.FuncFailed('OVERRIDES not defined')
98 overrides = bb.data.expand(overrides, localdata) 98 overrides = localdata.expand(overrides)
99 99
100 localdata.setVar('OVERRIDES', label + ':' + overrides) 100 localdata.setVar('OVERRIDES', label + ':' + overrides)
101 bb.data.update_data(localdata) 101 bb.data.update_data(localdata)
diff --git a/meta/classes/utility-tasks.bbclass b/meta/classes/utility-tasks.bbclass
index bbdf6e159b..cbb000a1e3 100644
--- a/meta/classes/utility-tasks.bbclass
+++ b/meta/classes/utility-tasks.bbclass
@@ -16,7 +16,7 @@ addtask clean
16do_clean[nostamp] = "1" 16do_clean[nostamp] = "1"
17python do_clean() { 17python do_clean() {
18 """clear the build and temp directories""" 18 """clear the build and temp directories"""
19 dir = bb.data.expand("${WORKDIR}", d) 19 dir = d.expand("${WORKDIR}")
20 bb.note("Removing " + dir) 20 bb.note("Removing " + dir)
21 oe.path.remove(dir) 21 oe.path.remove(dir)
22 22
diff --git a/meta/conf/distro/include/csl-versions.inc b/meta/conf/distro/include/csl-versions.inc
index 22e83946a1..6b8b2c5b96 100644
--- a/meta/conf/distro/include/csl-versions.inc
+++ b/meta/conf/distro/include/csl-versions.inc
@@ -39,7 +39,7 @@ def csl_get_gcc_version(d):
39 39
40def csl_get_libc_version(d): 40def csl_get_libc_version(d):
41 import os,bb 41 import os,bb
42 syspath = bb.data.expand('${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}', d) 42 syspath = d.expand('${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}')
43 if not syspath: 43 if not syspath:
44 return 'UNKNOWN' 44 return 'UNKNOWN'
45 45
@@ -55,7 +55,7 @@ def csl_get_libc_version(d):
55 55
56def csl_get_kernel_version(d): 56def csl_get_kernel_version(d):
57 import os,bb 57 import os,bb
58 syspath = bb.data.expand('${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}', d) 58 syspath = d.expand('${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}')
59 if not syspath: 59 if not syspath:
60 return 'UNKNOWN' 60 return 'UNKNOWN'
61 61
diff --git a/meta/conf/distro/include/tcmode-external-csl.inc b/meta/conf/distro/include/tcmode-external-csl.inc
index 1ff808d9e7..7bb8453732 100644
--- a/meta/conf/distro/include/tcmode-external-csl.inc
+++ b/meta/conf/distro/include/tcmode-external-csl.inc
@@ -92,7 +92,7 @@ def populate_toolchain_links(d):
92 d = d.createCopy() 92 d = d.createCopy()
93 d.finalize() 93 d.finalize()
94 94
95 pattern = bb.data.expand('${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}*', d) 95 pattern = d.expand('${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}*')
96 files = glob(pattern) 96 files = glob(pattern)
97 if not files: 97 if not files:
98 bb.fatal("Unable to populate toolchain binary symlinks") 98 bb.fatal("Unable to populate toolchain binary symlinks")
diff --git a/meta/lib/oe/data.py b/meta/lib/oe/data.py
index af900be6e4..e50f453de5 100644
--- a/meta/lib/oe/data.py
+++ b/meta/lib/oe/data.py
@@ -7,7 +7,7 @@ def typed_value(key, d):
7 var_type = d.getVarFlag(key, 'type') 7 var_type = d.getVarFlag(key, 'type')
8 flags = d.getVarFlags(key) 8 flags = d.getVarFlags(key)
9 if flags is not None: 9 if flags is not None:
10 flags = dict((flag, bb.data.expand(value, d)) 10 flags = dict((flag, d.expand(value))
11 for flag, value in flags.iteritems()) 11 for flag, value in flags.iteritems())
12 else: 12 else:
13 flags = {} 13 flags = {}
diff --git a/meta/lib/oe/packagedata.py b/meta/lib/oe/packagedata.py
index 918e7ad2cc..a7a40f0d06 100644
--- a/meta/lib/oe/packagedata.py
+++ b/meta/lib/oe/packagedata.py
@@ -26,15 +26,15 @@ def read_pkgdatafile(fn):
26 return pkgdata 26 return pkgdata
27 27
28def get_subpkgedata_fn(pkg, d): 28def get_subpkgedata_fn(pkg, d):
29 archs = bb.data.expand("${PACKAGE_ARCHS}", d).split(" ") 29 archs = d.expand("${PACKAGE_ARCHS}").split(" ")
30 archs.reverse() 30 archs.reverse()
31 pkgdata = bb.data.expand('${TMPDIR}/pkgdata/', d) 31 pkgdata = d.expand('${TMPDIR}/pkgdata/')
32 targetdir = bb.data.expand('${TARGET_VENDOR}-${TARGET_OS}/runtime/', d) 32 targetdir = d.expand('${TARGET_VENDOR}-${TARGET_OS}/runtime/')
33 for arch in archs: 33 for arch in archs:
34 fn = pkgdata + arch + targetdir + pkg 34 fn = pkgdata + arch + targetdir + pkg
35 if os.path.exists(fn): 35 if os.path.exists(fn):
36 return fn 36 return fn
37 return bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d) 37 return d.expand('${PKGDATA_DIR}/runtime/%s' % pkg)
38 38
39def has_subpkgdata(pkg, d): 39def has_subpkgdata(pkg, d):
40 return os.access(get_subpkgedata_fn(pkg, d), os.R_OK) 40 return os.access(get_subpkgedata_fn(pkg, d), os.R_OK)
@@ -43,11 +43,11 @@ def read_subpkgdata(pkg, d):
43 return read_pkgdatafile(get_subpkgedata_fn(pkg, d)) 43 return read_pkgdatafile(get_subpkgedata_fn(pkg, d))
44 44
45def has_pkgdata(pn, d): 45def has_pkgdata(pn, d):
46 fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d) 46 fn = d.expand('${PKGDATA_DIR}/%s' % pn)
47 return os.access(fn, os.R_OK) 47 return os.access(fn, os.R_OK)
48 48
49def read_pkgdata(pn, d): 49def read_pkgdata(pn, d):
50 fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d) 50 fn = d.expand('${PKGDATA_DIR}/%s' % pn)
51 return read_pkgdatafile(fn) 51 return read_pkgdatafile(fn)
52 52
53# 53#
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index d1bf7cdd9f..d9d663c3b8 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -75,8 +75,8 @@ python populate_packages_prepend() {
75 packages = [] 75 packages = []
76 multilib_prefix = (d.getVar("MLPREFIX", True) or "") 76 multilib_prefix = (d.getVar("MLPREFIX", True) or "")
77 hook = lambda file,pkg,b,c,d:packages.append((file,pkg)) 77 hook = lambda file,pkg,b,c,d:packages.append((file,pkg))
78 plugin_dir = bb.data.expand('${libdir}/connman/plugins/', d) 78 plugin_dir = d.expand('${libdir}/connman/plugins/')
79 plugin_name = bb.data.expand('${PN}-plugin-%s', d) 79 plugin_name = d.expand('${PN}-plugin-%s')
80 do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, '${PN} plugin for %s', extra_depends='', hook=hook ) 80 do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, '${PN} plugin for %s', extra_depends='', hook=hook )
81 for (file, package) in packages: 81 for (file, package) in packages:
82 plugintype = package.split( '-' )[-1] 82 plugintype = package.split( '-' )[-1]
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
index 92ad0d9776..ae3864c0a6 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
@@ -63,10 +63,10 @@ python populate_packages_prepend() {
63 # time before the files from the package may be available, hence 63 # time before the files from the package may be available, hence
64 # storing the data from the files in the preinst directly. 64 # storing the data from the files in the preinst directly.
65 65
66 f = open(bb.data.expand("${STAGING_DATADIR}/base-passwd/passwd.master", d), 'r') 66 f = open(d.expand("${STAGING_DATADIR}/base-passwd/passwd.master"), 'r')
67 passwd = "".join(f.readlines()) 67 passwd = "".join(f.readlines())
68 f.close() 68 f.close()
69 f = open(bb.data.expand("${STAGING_DATADIR}/base-passwd/group.master", d), 'r') 69 f = open(d.expand("${STAGING_DATADIR}/base-passwd/group.master"), 'r')
70 group = "".join(f.readlines()) 70 group = "".join(f.readlines())
71 f.close() 71 f.close()
72 72
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 7aa131cf69..ec76ad2902 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -82,7 +82,7 @@ python () {
82 if "${OE_FEATURES}": 82 if "${OE_FEATURES}":
83 d.setVar('configmangle_append', 83 d.setVar('configmangle_append',
84 "/^### DISTRO FEATURES$/a\\\n%s\n\n" % 84 "/^### DISTRO FEATURES$/a\\\n%s\n\n" %
85 ("\\n".join((bb.data.expand("${OE_FEATURES}", d).split("\n"))))) 85 ("\\n".join((d.expand("${OE_FEATURES}").split("\n")))))
86 d.setVar('configmangle_append', 86 d.setVar('configmangle_append',
87 "/^### CROSS$/a\\\n%s\n" % 87 "/^### CROSS$/a\\\n%s\n" %
88 ("\\n".join(["CONFIG_CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"", 88 ("\\n".join(["CONFIG_CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"",
diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
index 43303b7196..3b10c4329e 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -178,8 +178,8 @@ do_install() {
178} 178}
179 179
180python populate_packages_prepend () { 180python populate_packages_prepend () {
181 base_libdir = bb.data.expand("${base_libdir}", d) 181 base_libdir = d.expand("${base_libdir}")
182 pnbase = bb.data.expand("${PN}-lib%s", d) 182 pnbase = d.expand("${PN}-lib%s")
183 do_split_packages(d, base_libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) 183 do_split_packages(d, base_libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True)
184} 184}
185 185
diff --git a/meta/recipes-core/uclibc/uclibc.inc b/meta/recipes-core/uclibc/uclibc.inc
index 69d8921e3e..78010db25f 100644
--- a/meta/recipes-core/uclibc/uclibc.inc
+++ b/meta/recipes-core/uclibc/uclibc.inc
@@ -142,7 +142,7 @@ python () {
142 if "${OE_FEATURES}": 142 if "${OE_FEATURES}":
143 d.setVar('configmangle_append', 143 d.setVar('configmangle_append',
144 "/^### DISTRO FEATURES$/a\\\n%s\n\n" % 144 "/^### DISTRO FEATURES$/a\\\n%s\n\n" %
145 ("\\n".join((bb.data.expand("${OE_FEATURES}", d).split("\n"))))) 145 ("\\n".join((d.expand("${OE_FEATURES}").split("\n")))))
146 d.setVar('configmangle_append', 146 d.setVar('configmangle_append',
147 "/^### CROSS$/a\\\n%s\n" % 147 "/^### CROSS$/a\\\n%s\n" %
148 ("\\n".join(["CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"", 148 ("\\n".join(["CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"",
diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc
index 4bf5105dd2..51e1e3b5c4 100644
--- a/meta/recipes-devtools/apt/apt-native.inc
+++ b/meta/recipes-devtools/apt/apt-native.inc
@@ -18,7 +18,7 @@ python do_install_config () {
18 data = infile.read() 18 data = infile.read()
19 infile.close() 19 infile.close()
20 20
21 data = bb.data.expand(data, d) 21 data = d.expand(data)
22 22
23 outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt') 23 outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
24 if not os.path.exists(outdir): 24 if not os.path.exists(outdir):
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index bf6c2398e8..f550aab27a 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -79,7 +79,7 @@ do_clean[lockfiles] = "${SW}.clean.lock"
79 79
80python workshared_clean () { 80python workshared_clean () {
81 """clear the source directory""" 81 """clear the source directory"""
82 dir = bb.data.expand("${SW}", d) 82 dir = d.expand("${SW}")
83 bb.note("Removing " + dir) 83 bb.note("Removing " + dir)
84 oe.path.remove(dir) 84 oe.path.remove(dir)
85 85
diff --git a/meta/recipes-devtools/gcc/gcc-package-cross.inc b/meta/recipes-devtools/gcc/gcc-package-cross.inc
index c872e00208..e32412c127 100644
--- a/meta/recipes-devtools/gcc/gcc-package-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-package-cross.inc
@@ -1,7 +1,7 @@
1INHIBIT_PACKAGE_STRIP = "1" 1INHIBIT_PACKAGE_STRIP = "1"
2 2
3# Compute how to get from libexecdir to bindir in python (easier than shell) 3# Compute how to get from libexecdir to bindir in python (easier than shell)
4BINRELPATH = "${@oe.path.relative(bb.data.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}", d), bb.data.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${MULTIMACH_TARGET_SYS}", d))}" 4BINRELPATH = "${@oe.path.relative(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${MULTIMACH_TARGET_SYS}"))}"
5 5
6do_install () { 6do_install () {
7 oe_runmake 'DESTDIR=${D}' install-host 7 oe_runmake 'DESTDIR=${D}' install-host
diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb
index f9a6cc9d5d..a0c34a39cb 100644
--- a/meta/recipes-devtools/perl/perl_5.14.2.bb
+++ b/meta/recipes-devtools/perl/perl_5.14.2.bb
@@ -290,7 +290,7 @@ PACKAGES_append = " perl-modules "
290RRECOMMENDS_perl-modules = "${@d.getVar('PACKAGES', True).replace('${PN}-modules ', '').replace('${PN}-dbg ', '').replace('${PN}-misc ', '').replace('${PN}-dev ', '').replace('${PN}-pod ', '').replace('${PN}-doc ', '')}" 290RRECOMMENDS_perl-modules = "${@d.getVar('PACKAGES', True).replace('${PN}-modules ', '').replace('${PN}-dbg ', '').replace('${PN}-misc ', '').replace('${PN}-dev ', '').replace('${PN}-pod ', '').replace('${PN}-doc ', '')}"
291 291
292python populate_packages_prepend () { 292python populate_packages_prepend () {
293 libdir = bb.data.expand('${libdir}/perl/${PV}', d) 293 libdir = d.expand('${libdir}/perl/${PV}')
294 do_split_packages(d, libdir, 'auto/(Encode/.[^/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) 294 do_split_packages(d, libdir, 'auto/(Encode/.[^/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
295 do_split_packages(d, libdir, 'auto/([^/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) 295 do_split_packages(d, libdir, 'auto/([^/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
296 do_split_packages(d, libdir, 'Module/([^\/]*).*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) 296 do_split_packages(d, libdir, 'Module/([^\/]*).*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.30.bb b/meta/recipes-extended/lighttpd/lighttpd_1.4.30.bb
index 2c247f0531..3ae38671f8 100644
--- a/meta/recipes-extended/lighttpd/lighttpd_1.4.30.bb
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.30.bb
@@ -58,6 +58,6 @@ CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
58PACKAGES_DYNAMIC = "lighttpd-module-*" 58PACKAGES_DYNAMIC = "lighttpd-module-*"
59 59
60python populate_packages_prepend () { 60python populate_packages_prepend () {
61 lighttpd_libdir = bb.data.expand('${libdir}', d) 61 lighttpd_libdir = d.expand('${libdir}')
62 do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='') 62 do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
63} 63}
diff --git a/meta/recipes-extended/pam/libpam_1.1.5.bb b/meta/recipes-extended/pam/libpam_1.1.5.bb
index 8dd5ac5251..08ce1d13b3 100644
--- a/meta/recipes-extended/pam/libpam_1.1.5.bb
+++ b/meta/recipes-extended/pam/libpam_1.1.5.bb
@@ -61,9 +61,9 @@ python populate_packages_prepend () {
61 d.setVar('FILES_' + pn, nf) 61 d.setVar('FILES_' + pn, nf)
62 62
63 dvar = bb.data.expand('${WORKDIR}/package', d, True) 63 dvar = bb.data.expand('${WORKDIR}/package', d, True)
64 pam_libdir = bb.data.expand('${base_libdir}/security', d) 64 pam_libdir = d.expand('${base_libdir}/security')
65 pam_sbindir = bb.data.expand('${sbindir}', d) 65 pam_sbindir = d.expand('${sbindir}')
66 pam_filterdir = bb.data.expand('${base_libdir}/security/pam_filter', d) 66 pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
67 67
68 do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', extra_depends='') 68 do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', extra_depends='')
69 pam_plugin_append_file('pam-plugin-unix', pam_sbindir, 'unix_chkpwd') 69 pam_plugin_append_file('pam-plugin-unix', pam_sbindir, 'unix_chkpwd')
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.0.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.0.bb
index 603b38feef..0e2067a4e0 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.0.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.0.bb
@@ -60,7 +60,7 @@ PACKAGES_DYNAMIC_virtclass-native = ""
60python populate_packages_prepend () { 60python populate_packages_prepend () {
61 postinst_pixbufloader = d.getVar("postinst_pixbufloader", True) 61 postinst_pixbufloader = d.getVar("postinst_pixbufloader", True)
62 62
63 loaders_root = bb.data.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders', d) 63 loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
64 64
65 do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s', postinst_pixbufloader) 65 do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s', postinst_pixbufloader)
66} 66}
diff --git a/meta/recipes-gnome/gtk+/gtk+_2.12.7.bb b/meta/recipes-gnome/gtk+/gtk+_2.12.7.bb
index e45768d9da..66be75aee0 100644
--- a/meta/recipes-gnome/gtk+/gtk+_2.12.7.bb
+++ b/meta/recipes-gnome/gtk+/gtk+_2.12.7.bb
@@ -37,7 +37,7 @@ python populate_packages_prepend () {
37 prologue = d.getVar("postinst_prologue", True) 37 prologue = d.getVar("postinst_prologue", True)
38 postinst_pixbufloader = d.getVar("postinst_pixbufloader", True) 38 postinst_pixbufloader = d.getVar("postinst_pixbufloader", True)
39 39
40 gtk_libdir = bb.data.expand('${libdir}/gtk-2.0/${LIBV}', d) 40 gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
41 loaders_root = os.path.join(gtk_libdir, 'loaders') 41 loaders_root = os.path.join(gtk_libdir, 'loaders')
42 immodules_root = os.path.join(gtk_libdir, 'immodules') 42 immodules_root = os.path.join(gtk_libdir, 'immodules')
43 printmodules_root = os.path.join(gtk_libdir, 'printbackends'); 43 printmodules_root = os.path.join(gtk_libdir, 'printbackends');
diff --git a/meta/recipes-gnome/gtk+/gtk+_2.16.6.bb b/meta/recipes-gnome/gtk+/gtk+_2.16.6.bb
index 1e7a87f5d2..aee18c5880 100644
--- a/meta/recipes-gnome/gtk+/gtk+_2.16.6.bb
+++ b/meta/recipes-gnome/gtk+/gtk+_2.16.6.bb
@@ -37,7 +37,7 @@ python populate_packages_prepend () {
37 prologue = d.getVar("postinst_prologue", True) 37 prologue = d.getVar("postinst_prologue", True)
38 postinst_pixbufloader = d.getVar("postinst_pixbufloader", True) 38 postinst_pixbufloader = d.getVar("postinst_pixbufloader", True)
39 39
40 gtk_libdir = bb.data.expand('${libdir}/gtk-2.0/${LIBV}', d) 40 gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
41 loaders_root = os.path.join(gtk_libdir, 'loaders') 41 loaders_root = os.path.join(gtk_libdir, 'loaders')
42 immodules_root = os.path.join(gtk_libdir, 'immodules') 42 immodules_root = os.path.join(gtk_libdir, 'immodules')
43 printmodules_root = os.path.join(gtk_libdir, 'printbackends'); 43 printmodules_root = os.path.join(gtk_libdir, 'printbackends');
diff --git a/meta/recipes-gnome/gtk+/gtk+_2.24.8.bb b/meta/recipes-gnome/gtk+/gtk+_2.24.8.bb
index c27826cedb..559c76ee6e 100644
--- a/meta/recipes-gnome/gtk+/gtk+_2.24.8.bb
+++ b/meta/recipes-gnome/gtk+/gtk+_2.24.8.bb
@@ -43,7 +43,7 @@ python populate_packages_prepend () {
43 43
44 prologue = d.getVar("postinst_prologue", True) 44 prologue = d.getVar("postinst_prologue", True)
45 45
46 gtk_libdir = bb.data.expand('${libdir}/gtk-2.0/${LIBV}', d) 46 gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
47 immodules_root = os.path.join(gtk_libdir, 'immodules') 47 immodules_root = os.path.join(gtk_libdir, 'immodules')
48 printmodules_root = os.path.join(gtk_libdir, 'printbackends'); 48 printmodules_root = os.path.join(gtk_libdir, 'printbackends');
49 49
diff --git a/meta/recipes-graphics/directfb/directfb.inc b/meta/recipes-graphics/directfb/directfb.inc
index d45159f046..9061ac149f 100644
--- a/meta/recipes-graphics/directfb/directfb.inc
+++ b/meta/recipes-graphics/directfb/directfb.inc
@@ -36,7 +36,7 @@ EXTRA_OECONF = "\
36# 36#
37#python populate_packages_prepend () { 37#python populate_packages_prepend () {
38# import os.path 38# import os.path
39# inputdrivers_libdir = bb.data.expand('${libdir}/directfb-${RV}/inputdrivers', d) 39# inputdrivers_libdir = d.expand('${libdir}/directfb-${RV}/inputdrivers')
40# do_split_packages(d, inputdrivers_libdir, '*.so$', 'directfb-inputdrivers-%s', 'Directfb plugin for %s') 40# do_split_packages(d, inputdrivers_libdir, '*.so$', 'directfb-inputdrivers-%s', 'Directfb plugin for %s')
41#} 41#}
42 42
diff --git a/meta/recipes-graphics/pango/pango.inc b/meta/recipes-graphics/pango/pango.inc
index 8b36d04c03..a2d5dc3a12 100644
--- a/meta/recipes-graphics/pango/pango.inc
+++ b/meta/recipes-graphics/pango/pango.inc
@@ -52,7 +52,7 @@ fi
52python populate_packages_prepend () { 52python populate_packages_prepend () {
53 prologue = d.getVar("postinst_prologue", True) 53 prologue = d.getVar("postinst_prologue", True)
54 54
55 modules_root = bb.data.expand('${libdir}/pango/${LIBV}/modules', d) 55 modules_root = d.expand('${libdir}/pango/${LIBV}/modules')
56 56
57 do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', prologue + 'pango-querymodules > /etc/pango/pango.modules') 57 do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', prologue + 'pango-querymodules > /etc/pango/pango.modules')
58} 58}
diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
index ccabe3c032..4572265ef4 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
@@ -1,14 +1,14 @@
1LIBV = "0.10" 1LIBV = "0.10"
2 2
3python populate_packages_prepend () { 3python populate_packages_prepend () {
4 gst_libdir = bb.data.expand('${libdir}/gstreamer-${LIBV}', d) 4 gst_libdir = d.expand('${libdir}/gstreamer-${LIBV}')
5 postinst = d.getVar('plugin_postinst', True) 5 postinst = d.getVar('plugin_postinst', True)
6 glibdir = d.getVar('libdir', True) 6 glibdir = d.getVar('libdir', True)
7 7
8 do_split_packages(d, glibdir, '^lib(.*)\.so\.*', 'lib%s', 'gstreamer %s library', extra_depends='', allow_links=True) 8 do_split_packages(d, glibdir, '^lib(.*)\.so\.*', 'lib%s', 'gstreamer %s library', extra_depends='', allow_links=True)
9 do_split_packages(d, gst_libdir, 'libgst(.*)\.so$', bb.data.expand('${PN}-%s', d), 'GStreamer plugin for %s', postinst=postinst, extra_depends=bb.data.expand('${PN}',d)) 9 do_split_packages(d, gst_libdir, 'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer plugin for %s', postinst=postinst, extra_depends=d.expand('${PN}'))
10 do_split_packages(d, gst_libdir, 'libgst(.*)\.la$', bb.data.expand('${PN}-%s-dev', d), 'GStreamer plugin for %s (development files)', extra_depends=bb.data.expand('${PN}-dev',d)) 10 do_split_packages(d, gst_libdir, 'libgst(.*)\.la$', d.expand('${PN}-%s-dev'), 'GStreamer plugin for %s (development files)', extra_depends=d.expand('${PN}-dev'))
11 do_split_packages(d, gst_libdir, 'libgst(.*)\.a$', bb.data.expand('${PN}-%s-staticdev', d), 'GStreamer plugin for %s (static development files)', extra_depends=bb.data.expand('${PN}-staticdev',d)) 11 do_split_packages(d, gst_libdir, 'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer plugin for %s (static development files)', extra_depends=d.expand('${PN}-staticdev'))
12 12
13 pn = d.getVar('PN', True) 13 pn = d.getVar('PN', True)
14 metapkg = pn + '-meta' 14 metapkg = pn + '-meta'
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index ca3a28dc6c..dda0352ae4 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -106,7 +106,7 @@ pkg_postinst_${PN}-server() {
106python populate_packages_prepend() { 106python populate_packages_prepend() {
107 #d.setVar('PKG_pulseaudio', 'pulseaudio') 107 #d.setVar('PKG_pulseaudio', 'pulseaudio')
108 108
109 plugindir = bb.data.expand('${libdir}/pulse-${PV}/modules/', d) 109 plugindir = d.expand('${libdir}/pulse-${PV}/modules/')
110 do_split_packages(d, plugindir, '^module-(.*)\.so$', 'pulseaudio-module-%s', 'PulseAudio module for %s', extra_depends='' ) 110 do_split_packages(d, plugindir, '^module-(.*)\.so$', 'pulseaudio-module-%s', 'PulseAudio module for %s', extra_depends='' )
111 do_split_packages(d, plugindir, '^lib(.*)\.so$', 'pulseaudio-lib-%s', 'PulseAudio library for %s', extra_depends='' ) 111 do_split_packages(d, plugindir, '^lib(.*)\.so$', 'pulseaudio-lib-%s', 'PulseAudio library for %s', extra_depends='' )
112} 112}
diff --git a/meta/recipes-qt/qt-apps/qmmp_0.5.2.bb b/meta/recipes-qt/qt-apps/qmmp_0.5.2.bb
index 469351ce50..df18f91c90 100644
--- a/meta/recipes-qt/qt-apps/qmmp_0.5.2.bb
+++ b/meta/recipes-qt/qt-apps/qmmp_0.5.2.bb
@@ -31,8 +31,8 @@ PACKAGES_DYNAMIC = "qmmp-plugin-* "
31 31
32python populate_packages_prepend () { 32python populate_packages_prepend () {
33 import os 33 import os
34 qmmp_libdir = bb.data.expand('${libdir}/qmmp', d) 34 qmmp_libdir = d.expand('${libdir}/qmmp')
35 gd = bb.data.expand('${D}/${libdir}/qmmp', d) 35 gd = d.expand('${D}/${libdir}/qmmp')
36 plug_dirs = os.listdir(gd) 36 plug_dirs = os.listdir(gd)
37 37
38 for plug_dir in plug_dirs: 38 for plug_dir in plug_dirs:
diff --git a/meta/recipes-qt/qt4/qt4.inc b/meta/recipes-qt/qt4/qt4.inc
index 4d719138ca..2e70bd91e2 100644
--- a/meta/recipes-qt/qt4/qt4.inc
+++ b/meta/recipes-qt/qt4/qt4.inc
@@ -257,17 +257,17 @@ do_compile() {
257} 257}
258 258
259python populate_packages_prepend() { 259python populate_packages_prepend() {
260 translation_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/translations/', d) 260 translation_dir = d.expand('${datadir}/${QT_DIR_NAME}/translations/')
261 translation_name = bb.data.expand('${QT_BASE_NAME}-translation-%s', d) 261 translation_name = d.expand('${QT_BASE_NAME}-translation-%s')
262 do_split_packages(d, translation_dir, '^(assistant|designer|linguist|qt|qtconfig|qvfb)_(.*)\.qm$', translation_name, '${PN} translation for %s', extra_depends='' ) 262 do_split_packages(d, translation_dir, '^(assistant|designer|linguist|qt|qtconfig|qvfb)_(.*)\.qm$', translation_name, '${PN} translation for %s', extra_depends='' )
263 263
264 phrasebook_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/', d) 264 phrasebook_dir = d.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/')
265 phrasebook_name = bb.data.expand('${QT_BASE_NAME}-phrasebook-%s', d) 265 phrasebook_name = d.expand('${QT_BASE_NAME}-phrasebook-%s')
266 import os; 266 import os;
267 if os.path.exists("%s%s" % (bb.data.expand('${D}',d), phrasebook_dir)): 267 if os.path.exists("%s%s" % (d.expand('${D}'), phrasebook_dir)):
268 do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' ) 268 do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' )
269 else: 269 else:
270 bb.note("The path does not exist:", bb.data.expand('${D}', d), phrasebook_dir) 270 bb.note("The path does not exist:", d.expand('${D}'), phrasebook_dir)
271 271
272 # Package all the plugins and their -dbg version and create a meta package 272 # Package all the plugins and their -dbg version and create a meta package
273 def qtopia_split(path, name, glob): 273 def qtopia_split(path, name, glob):
@@ -275,17 +275,17 @@ python populate_packages_prepend() {
275 Split the package into a normal and -dbg package and then add the 275 Split the package into a normal and -dbg package and then add the
276 new packages to the meta package. 276 new packages to the meta package.
277 """ 277 """
278 plugin_dir = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/' % path, d) 278 plugin_dir = d.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/' % path)
279 if not os.path.exists("%s%s" % (bb.data.expand('${D}',d), plugin_dir)): 279 if not os.path.exists("%s%s" % (d.expand('${D}'), plugin_dir)):
280 bb.note("The path does not exist:", bb.data.expand('${D}', d), plugin_dir) 280 bb.note("The path does not exist:", d.expand('${D}'), plugin_dir)
281 return 281 return
282 282
283 plugin_name = bb.data.expand('${QT_BASE_NAME}-plugin-%s-%%s' % name, d) 283 plugin_name = d.expand('${QT_BASE_NAME}-plugin-%s-%%s' % name)
284 dev_packages = [] 284 dev_packages = []
285 dev_hook = lambda file,pkg,b,c,d:dev_packages.append((file,pkg)) 285 dev_hook = lambda file,pkg,b,c,d:dev_packages.append((file,pkg))
286 do_split_packages(d, plugin_dir, glob, plugin_name, '${PN} %s for %%s' % name, extra_depends='', hook=dev_hook) 286 do_split_packages(d, plugin_dir, glob, plugin_name, '${PN} %s for %%s' % name, extra_depends='', hook=dev_hook)
287 # Create a -dbg package as well 287 # Create a -dbg package as well
288 plugin_dir_dbg = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/.debug' % path, d) 288 plugin_dir_dbg = d.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/.debug' % path)
289 packages = d.getVar('PACKAGES') 289 packages = d.getVar('PACKAGES')
290 for (file,package) in dev_packages: 290 for (file,package) in dev_packages:
291 packages = "%s %s-dbg" % (packages, package) 291 packages = "%s %s-dbg" % (packages, package)
diff --git a/meta/recipes-support/libpcre/libpcre_8.21.bb b/meta/recipes-support/libpcre/libpcre_8.21.bb
index 4eb65d7e32..f48d9f285c 100644
--- a/meta/recipes-support/libpcre/libpcre_8.21.bb
+++ b/meta/recipes-support/libpcre/libpcre_8.21.bb
@@ -46,7 +46,7 @@ do_compile () {
46} 46}
47 47
48python populate_packages_prepend () { 48python populate_packages_prepend () {
49 pcre_libdir = bb.data.expand('${libdir}', d) 49 pcre_libdir = d.expand('${libdir}')
50 do_split_packages(d, pcre_libdir, '^lib(.*)\.so\.+', 'lib%s', 'libpcre %s library', extra_depends='', allow_links=True) 50 do_split_packages(d, pcre_libdir, '^lib(.*)\.so\.+', 'lib%s', 'libpcre %s library', extra_depends='', allow_links=True)
51} 51}
52 52