summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-09 15:00:01 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-10 11:51:19 (GMT)
commitc8dee9b92dfd545852ecac8dc2adfc95ac02e957 (patch)
tree5f1b86954646a0f3bb914407994388a6a4346769
parent5d3860f4a8abb8e95442b04f8b84a333af362fcd (diff)
downloadpoky-c8dee9b92dfd545852ecac8dc2adfc95ac02e957.tar.gz
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata: sed \ -e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` (From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta-demoapps/recipes-gnome/abiword/abiword-2.5.inc2
-rw-r--r--meta-demoapps/recipes-gnome/abiword/abiword.inc2
-rw-r--r--meta-demoapps/recipes-support/poppler/poppler-fpu.inc2
-rw-r--r--meta/classes/autotools.bbclass6
-rw-r--r--meta/classes/base.bbclass114
-rw-r--r--meta/classes/bugzilla.bbclass30
-rw-r--r--meta/classes/buildstats.bbclass36
-rw-r--r--meta/classes/cpan-base.bbclass2
-rw-r--r--meta/classes/cpan_build.bbclass4
-rw-r--r--meta/classes/cross-canadian.bbclass2
-rw-r--r--meta/classes/debian.bbclass18
-rw-r--r--meta/classes/distrodata.bbclass162
-rw-r--r--meta/classes/distutils-base.bbclass2
-rw-r--r--meta/classes/distutils-native-base.bbclass2
-rw-r--r--meta/classes/gconf.bbclass16
-rw-r--r--meta/classes/gtk-icon-cache.bbclass24
-rw-r--r--meta/classes/icecc.bbclass16
-rw-r--r--meta/classes/image-swab.bbclass4
-rw-r--r--meta/classes/image.bbclass20
-rw-r--r--meta/classes/image_types.bbclass4
-rw-r--r--meta/classes/imagetest-qemu.bbclass56
-rw-r--r--meta/classes/insane.bbclass78
-rw-r--r--meta/classes/kernel-arch.bbclass6
-rw-r--r--meta/classes/kernel-yocto.bbclass2
-rw-r--r--meta/classes/kernel.bbclass68
-rw-r--r--meta/classes/libc-common.bbclass10
-rw-r--r--meta/classes/libc-package.bbclass66
-rw-r--r--meta/classes/license.bbclass18
-rw-r--r--meta/classes/metadata_scm.bbclass2
-rw-r--r--meta/classes/native.bbclass12
-rw-r--r--meta/classes/nativesdk.bbclass14
-rw-r--r--meta/classes/package.bbclass232
-rw-r--r--meta/classes/package_deb.bbclass82
-rw-r--r--meta/classes/package_ipk.bbclass82
-rw-r--r--meta/classes/package_rpm.bbclass136
-rw-r--r--meta/classes/package_tar.bbclass38
-rw-r--r--meta/classes/packagedata.bbclass8
-rw-r--r--meta/classes/packagehistory.bbclass8
-rw-r--r--meta/classes/patch.bbclass28
-rw-r--r--meta/classes/pkg_distribute.bbclass2
-rw-r--r--meta/classes/pkg_metainfo.bbclass12
-rw-r--r--meta/classes/populate_sdk_deb.bbclass4
-rw-r--r--meta/classes/populate_sdk_rpm.bbclass2
-rw-r--r--meta/classes/qemu.bbclass2
-rw-r--r--meta/classes/qt4e.bbclass2
-rw-r--r--meta/classes/qt4x11.bbclass2
-rw-r--r--meta/classes/relocatable.bbclass2
-rw-r--r--meta/classes/rootfs_ipk.bbclass10
-rw-r--r--meta/classes/rootfs_rpm.bbclass14
-rw-r--r--meta/classes/sanity.bbclass10
-rw-r--r--meta/classes/siteconfig.bbclass2
-rw-r--r--meta/classes/siteinfo.bbclass2
-rw-r--r--meta/classes/sourcepkg.bbclass12
-rw-r--r--meta/classes/src_distribute.bbclass16
-rw-r--r--meta/classes/sstate.bbclass94
-rw-r--r--meta/classes/staging.bbclass6
-rw-r--r--meta/classes/syslinux.bbclass34
-rw-r--r--meta/classes/task.bbclass2
-rw-r--r--meta/classes/toolchain-scripts.bbclass6
-rw-r--r--meta/classes/update-alternatives.bbclass38
-rw-r--r--meta/classes/update-rc.d.bbclass36
-rw-r--r--meta/classes/useradd.bbclass8
-rw-r--r--meta/classes/utility-tasks.bbclass8
-rw-r--r--meta/classes/utils.bbclass4
-rw-r--r--meta/conf/bitbake.conf36
-rw-r--r--meta/conf/distro/defaultsetup.conf2
-rw-r--r--meta/conf/machine/include/arm/feature-arm-thumb.inc2
-rw-r--r--meta/conf/machine/include/tune-thumb.inc8
-rw-r--r--meta/lib/oe/distro_check.py22
-rw-r--r--meta/lib/oe/patch.py4
-rw-r--r--meta/lib/oe/utils.py8
-rw-r--r--meta/recipes-bsp/grub/grub_0.97.bb2
-rw-r--r--meta/recipes-bsp/grub/grub_1.99.bb2
-rw-r--r--meta/recipes-bsp/uboot/u-boot_2011.03.bb2
-rw-r--r--meta/recipes-bsp/uboot/u-boot_2011.06.bb2
-rw-r--r--meta/recipes-bsp/x-load/x-load_git.bb2
-rw-r--r--meta/recipes-connectivity/connman/connman.inc2
-rw-r--r--meta/recipes-core/busybox/busybox.inc6
-rw-r--r--meta/recipes-core/eglibc/eglibc-options.inc6
-rw-r--r--meta/recipes-core/eglibc/eglibc-package.inc4
-rw-r--r--meta/recipes-core/eglibc/eglibc_2.13.bb4
-rw-r--r--meta/recipes-core/eglibc/eglibc_2.14.bb4
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.30.0.bb2
-rw-r--r--meta/recipes-core/libxml/libxml2.inc4
-rw-r--r--meta/recipes-core/tasks/task-base.bb10
-rw-r--r--meta/recipes-core/tasks/task-core-sdk.bb6
-rw-r--r--meta/recipes-core/uclibc/uclibc-config.inc16
-rw-r--r--meta/recipes-core/uclibc/uclibc.inc10
-rw-r--r--meta/recipes-devtools/apt/apt-native.inc4
-rw-r--r--meta/recipes-devtools/apt/apt-package.inc8
-rw-r--r--meta/recipes-devtools/automake/automake.inc2
-rw-r--r--meta/recipes-devtools/cmake/cmake.inc2
-rw-r--r--meta/recipes-devtools/cmake/cmake_2.8.5.bb6
-rw-r--r--meta/recipes-devtools/gcc/gcc-common.inc8
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-common.inc2
-rw-r--r--meta/recipes-devtools/gnu-config/gnu-config_20080123.bb2
-rw-r--r--meta/recipes-devtools/intltool/intltool.inc2
-rw-r--r--meta/recipes-devtools/opkg/opkg.inc2
-rw-r--r--meta/recipes-devtools/perl/perl_5.14.2.bb2
-rw-r--r--meta/recipes-devtools/python/python-pygobject_2.27.91.bb2
-rw-r--r--meta/recipes-devtools/qemu/qemu-targets.inc2
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server_2.1+2.2beta47.bb2
-rw-r--r--meta/recipes-extended/cups/cups14.inc2
-rw-r--r--meta/recipes-extended/lsof/lsof_4.85.bb6
-rw-r--r--meta/recipes-extended/pam/libpam_1.1.4.bb4
-rw-r--r--meta/recipes-extended/zip/zip.inc2
-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.bb8
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.16.6.bb8
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.24.6.bb6
-rw-r--r--meta/recipes-gnome/gtk-engines/gtk-engines_2.20.2.bb4
-rw-r--r--meta/recipes-graphics/cairo/cairo-fpu.inc2
-rw-r--r--meta/recipes-graphics/clutter/clutter-fpu.inc2
-rw-r--r--meta/recipes-graphics/fontconfig/fontconfig-native_2.8.0.bb2
-rw-r--r--meta/recipes-graphics/mesa/mesa-dri.inc2
-rw-r--r--meta/recipes-graphics/pango/pango.inc2
-rw-r--r--meta/recipes-graphics/xorg-lib/libxft_2.2.0.bb4
-rw-r--r--meta/recipes-kernel/linux/linux-dtb.inc10
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_2.6.34.bb2
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_2.6.34.bb2
-rw-r--r--meta/recipes-multimedia/alsa/alsa-fpu.inc2
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-plugins-package.inc12
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio.inc2
-rw-r--r--meta/recipes-qt/qt4/qt4.inc20
-rw-r--r--meta/recipes-qt/qt4/qt4_arch.inc6
-rw-r--r--meta/recipes-sato/puzzles/oh-puzzles_git.bb4
-rw-r--r--meta/recipes-sato/puzzles/puzzles_r9306.bb2
-rw-r--r--meta/recipes-support/attr/ea-acl.inc4
-rw-r--r--meta/recipes-support/boost/boost-36.inc10
-rwxr-xr-xscripts/jhbuild/jhbuild2oe.py28
130 files changed, 1058 insertions, 1058 deletions
diff --git a/meta-demoapps/recipes-gnome/abiword/abiword-2.5.inc b/meta-demoapps/recipes-gnome/abiword/abiword-2.5.inc
index ce537df..511ae97 100644
--- a/meta-demoapps/recipes-gnome/abiword/abiword-2.5.inc
+++ b/meta-demoapps/recipes-gnome/abiword/abiword-2.5.inc
@@ -9,7 +9,7 @@ RDEPENDS_${PN} = "glibc-gconv-ibm850 glibc-gconv-cp1252 \
9SRC_URI = "http://www.abiword.org/downloads/abiword/${PV}/source/abiword-${PV}.tar.gz" 9SRC_URI = "http://www.abiword.org/downloads/abiword/${PV}/source/abiword-${PV}.tar.gz"
10 10
11#want 2.x from 2.x.y for the installation directory 11#want 2.x from 2.x.y for the installation directory
12SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}" 12SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
13 13
14FILES_${PN} += " \ 14FILES_${PN} += " \
15 ${datadir}/icons/* \ 15 ${datadir}/icons/* \
diff --git a/meta-demoapps/recipes-gnome/abiword/abiword.inc b/meta-demoapps/recipes-gnome/abiword/abiword.inc
index 4ec0ba9..036f98f 100644
--- a/meta-demoapps/recipes-gnome/abiword/abiword.inc
+++ b/meta-demoapps/recipes-gnome/abiword/abiword.inc
@@ -17,7 +17,7 @@ SVNURI = "svn://svn.abisource.com/abiword/trunk;module=abiword;proto=http"
17SVNSRC = "${WORKDIR}/abi" 17SVNSRC = "${WORKDIR}/abi"
18 18
19#want 2.x from 2.x.y for the installation directory 19#want 2.x from 2.x.y for the installation directory
20SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}" 20SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
21 21
22FILES_${PN} += " \ 22FILES_${PN} += " \
23 ${datadir}/icons/* \ 23 ${datadir}/icons/* \
diff --git a/meta-demoapps/recipes-support/poppler/poppler-fpu.inc b/meta-demoapps/recipes-support/poppler/poppler-fpu.inc
index a262730..2fbee13 100644
--- a/meta-demoapps/recipes-support/poppler/poppler-fpu.inc
+++ b/meta-demoapps/recipes-support/poppler/poppler-fpu.inc
@@ -1,6 +1,6 @@
1 1
2def get_poppler_fpu_setting(bb, d): 2def get_poppler_fpu_setting(bb, d):
3 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: 3 if d.getVar('TARGET_FPU', 1) in [ 'soft' ]:
4 return "--enable-fixedpoint" 4 return "--enable-fixedpoint"
5 return "" 5 return ""
6 6
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 451c7fc..37e7d4b 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -1,8 +1,8 @@
1def autotools_dep_prepend(d): 1def autotools_dep_prepend(d):
2 if bb.data.getVar('INHIBIT_AUTOTOOLS_DEPS', d, 1): 2 if d.getVar('INHIBIT_AUTOTOOLS_DEPS', 1):
3 return '' 3 return ''
4 4
5 pn = bb.data.getVar('PN', d, 1) 5 pn = d.getVar('PN', 1)
6 deps = '' 6 deps = ''
7 7
8 if pn in ['autoconf-native', 'automake-native', 'help2man-native']: 8 if pn in ['autoconf-native', 'automake-native', 'help2man-native']:
@@ -13,7 +13,7 @@ def autotools_dep_prepend(d):
13 deps += 'libtool-native ' 13 deps += 'libtool-native '
14 if not bb.data.inherits_class('native', d) \ 14 if not bb.data.inherits_class('native', d) \
15 and not bb.data.inherits_class('cross', d) \ 15 and not bb.data.inherits_class('cross', d) \
16 and not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1): 16 and not d.getVar('INHIBIT_DEFAULT_DEPS', 1):
17 deps += 'libtool-cross ' 17 deps += 'libtool-cross '
18 18
19 return deps + 'gnu-config-native ' 19 return deps + 'gnu-config-native '
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index f539744..f3f798f 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -60,9 +60,9 @@ def base_dep_prepend(d):
60 # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not 60 # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
61 # we need that built is the responsibility of the patch function / class, not 61 # we need that built is the responsibility of the patch function / class, not
62 # the application. 62 # the application.
63 if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d): 63 if not d.getVar('INHIBIT_DEFAULT_DEPS'):
64 if (bb.data.getVar('HOST_SYS', d, 1) != 64 if (d.getVar('HOST_SYS', 1) !=
65 bb.data.getVar('BUILD_SYS', d, 1)): 65 d.getVar('BUILD_SYS', 1)):
66 deps += " virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc " 66 deps += " virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc "
67 return deps 67 return deps
68 68
@@ -73,13 +73,13 @@ DEPENDS_prepend="${BASEDEPENDS} "
73FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}" 73FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}"
74# THISDIR only works properly with imediate expansion as it has to run 74# THISDIR only works properly with imediate expansion as it has to run
75# in the context of the location its used (:=) 75# in the context of the location its used (:=)
76THISDIR = "${@os.path.dirname(bb.data.getVar('FILE', d, True))}" 76THISDIR = "${@os.path.dirname(d.getVar('FILE', True))}"
77 77
78addtask fetch 78addtask fetch
79do_fetch[dirs] = "${DL_DIR}" 79do_fetch[dirs] = "${DL_DIR}"
80python base_do_fetch() { 80python base_do_fetch() {
81 81
82 src_uri = (bb.data.getVar('SRC_URI', d, True) or "").split() 82 src_uri = (d.getVar('SRC_URI', True) or "").split()
83 if len(src_uri) == 0: 83 if len(src_uri) == 0:
84 return 84 return
85 85
@@ -96,14 +96,14 @@ python base_do_fetch() {
96addtask unpack after do_fetch 96addtask unpack after do_fetch
97do_unpack[dirs] = "${WORKDIR}" 97do_unpack[dirs] = "${WORKDIR}"
98python base_do_unpack() { 98python base_do_unpack() {
99 src_uri = (bb.data.getVar('SRC_URI', d, True) or "").split() 99 src_uri = (d.getVar('SRC_URI', True) or "").split()
100 if len(src_uri) == 0: 100 if len(src_uri) == 0:
101 return 101 return
102 102
103 localdata = bb.data.createCopy(d) 103 localdata = bb.data.createCopy(d)
104 bb.data.update_data(localdata) 104 bb.data.update_data(localdata)
105 105
106 rootdir = bb.data.getVar('WORKDIR', localdata, True) 106 rootdir = localdata.getVar('WORKDIR', True)
107 107
108 try: 108 try:
109 fetcher = bb.fetch2.Fetch(src_uri, localdata) 109 fetcher = bb.fetch2.Fetch(src_uri, localdata)
@@ -118,7 +118,7 @@ def generate_git_config(e):
118 from bb import data 118 from bb import data
119 119
120 if data.getVar('GIT_CORE_CONFIG', e.data, True): 120 if data.getVar('GIT_CORE_CONFIG', e.data, True):
121 gitconfig_path = bb.data.getVar('GIT_CONFIG', e.data, True) 121 gitconfig_path = e.data.getVar('GIT_CONFIG', True)
122 proxy_command = " gitproxy = %s\n" % data.getVar('GIT_PROXY_COMMAND', e.data, True) 122 proxy_command = " gitproxy = %s\n" % data.getVar('GIT_PROXY_COMMAND', e.data, True)
123 123
124 bb.mkdirhier(bb.data.expand("${STAGING_DIR_NATIVE}/usr/etc/", e.data)) 124 bb.mkdirhier(bb.data.expand("${STAGING_DIR_NATIVE}/usr/etc/", e.data))
@@ -207,11 +207,11 @@ python base_eventhandler() {
207 name = getName(e) 207 name = getName(e)
208 208
209 if name.startswith("BuildStarted"): 209 if name.startswith("BuildStarted"):
210 bb.data.setVar( 'BB_VERSION', bb.__version__, e.data ) 210 e.data.setVar( 'BB_VERSION', bb.__version__)
211 statusvars = ['BB_VERSION', 'TARGET_ARCH', 'TARGET_OS', 'MACHINE', 'DISTRO', 'DISTRO_VERSION','TUNE_FEATURES', 'TARGET_FPU'] 211 statusvars = ['BB_VERSION', 'TARGET_ARCH', 'TARGET_OS', 'MACHINE', 'DISTRO', 'DISTRO_VERSION','TUNE_FEATURES', 'TARGET_FPU']
212 statuslines = ["%-17s = \"%s\"" % (i, bb.data.getVar(i, e.data, 1) or '') for i in statusvars] 212 statuslines = ["%-17s = \"%s\"" % (i, e.data.getVar(i, 1) or '') for i in statusvars]
213 213
214 layers = (bb.data.getVar("BBLAYERS", e.data, 1) or "").split() 214 layers = (e.data.getVar("BBLAYERS", 1) or "").split()
215 layers_branch_rev = ["%-17s = \"%s:%s\"" % (os.path.basename(i), \ 215 layers_branch_rev = ["%-17s = \"%s:%s\"" % (os.path.basename(i), \
216 base_get_metadata_git_branch(i, None).strip(), \ 216 base_get_metadata_git_branch(i, None).strip(), \
217 base_get_metadata_git_revision(i, None)) \ 217 base_get_metadata_git_revision(i, None)) \
@@ -237,7 +237,7 @@ python base_eventhandler() {
237 needed_vars = [ "TARGET_ARCH", "TARGET_OS" ] 237 needed_vars = [ "TARGET_ARCH", "TARGET_OS" ]
238 pesteruser = [] 238 pesteruser = []
239 for v in needed_vars: 239 for v in needed_vars:
240 val = bb.data.getVar(v, e.data, 1) 240 val = e.data.getVar(v, 1)
241 if not val or val == 'INVALID': 241 if not val or val == 'INVALID':
242 pesteruser.append(v) 242 pesteruser.append(v)
243 if pesteruser: 243 if pesteruser:
@@ -330,23 +330,23 @@ python () {
330 appendVar('EXTRA_OECONF', extraconf) 330 appendVar('EXTRA_OECONF', extraconf)
331 331
332 # If PRINC is set, try and increase the PR value by the amount specified 332 # If PRINC is set, try and increase the PR value by the amount specified
333 princ = bb.data.getVar('PRINC', d, True) 333 princ = d.getVar('PRINC', True)
334 if princ: 334 if princ:
335 pr = bb.data.getVar('PR', d, True) 335 pr = d.getVar('PR', True)
336 pr_prefix = re.search("\D+",pr) 336 pr_prefix = re.search("\D+",pr)
337 prval = re.search("\d+",pr) 337 prval = re.search("\d+",pr)
338 if pr_prefix is None or prval is None: 338 if pr_prefix is None or prval is None:
339 bb.error("Unable to analyse format of PR variable: %s" % pr) 339 bb.error("Unable to analyse format of PR variable: %s" % pr)
340 nval = int(prval.group(0)) + int(princ) 340 nval = int(prval.group(0)) + int(princ)
341 pr = pr_prefix.group(0) + str(nval) + pr[prval.end():] 341 pr = pr_prefix.group(0) + str(nval) + pr[prval.end():]
342 bb.data.setVar('PR', pr, d) 342 d.setVar('PR', pr)
343 343
344 pn = bb.data.getVar('PN', d, 1) 344 pn = d.getVar('PN', 1)
345 license = bb.data.getVar('LICENSE', d, True) 345 license = d.getVar('LICENSE', True)
346 if license == "INVALID": 346 if license == "INVALID":
347 bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn) 347 bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn)
348 348
349 commercial_license = " %s " % bb.data.getVar('COMMERCIAL_LICENSE', d, 1) 349 commercial_license = " %s " % d.getVar('COMMERCIAL_LICENSE', 1)
350 import re 350 import re
351 pnr = "[ \t]%s[ \t]" % pn.replace('+', "\+") 351 pnr = "[ \t]%s[ \t]" % pn.replace('+', "\+")
352 if commercial_license and re.search(pnr, commercial_license): 352 if commercial_license and re.search(pnr, commercial_license):
@@ -356,86 +356,86 @@ python () {
356 # If we're building a target package we need to use fakeroot (pseudo) 356 # If we're building a target package we need to use fakeroot (pseudo)
357 # in order to capture permissions, owners, groups and special files 357 # in order to capture permissions, owners, groups and special files
358 if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): 358 if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
359 bb.data.setVarFlag('do_configure', 'umask', 022, d) 359 d.setVarFlag('do_configure', 'umask', 022)
360 bb.data.setVarFlag('do_compile', 'umask', 022, d) 360 d.setVarFlag('do_compile', 'umask', 022)
361 deps = (bb.data.getVarFlag('do_install', 'depends', d) or "").split() 361 deps = (d.getVarFlag('do_install', 'depends') or "").split()
362 deps.append('virtual/fakeroot-native:do_populate_sysroot') 362 deps.append('virtual/fakeroot-native:do_populate_sysroot')
363 bb.data.setVarFlag('do_install', 'depends', " ".join(deps),d) 363 bb.data.setVarFlag('do_install', 'depends', " ".join(deps),d)
364 bb.data.setVarFlag('do_install', 'fakeroot', 1, d) 364 d.setVarFlag('do_install', 'fakeroot', 1)
365 bb.data.setVarFlag('do_install', 'umask', 022, d) 365 d.setVarFlag('do_install', 'umask', 022)
366 deps = (bb.data.getVarFlag('do_package', 'depends', d) or "").split() 366 deps = (d.getVarFlag('do_package', 'depends') or "").split()
367 deps.append('virtual/fakeroot-native:do_populate_sysroot') 367 deps.append('virtual/fakeroot-native:do_populate_sysroot')
368 bb.data.setVarFlag('do_package', 'depends', " ".join(deps),d) 368 bb.data.setVarFlag('do_package', 'depends', " ".join(deps),d)
369 bb.data.setVarFlag('do_package', 'fakeroot', 1, d) 369 d.setVarFlag('do_package', 'fakeroot', 1)
370 bb.data.setVarFlag('do_package', 'umask', 022, d) 370 d.setVarFlag('do_package', 'umask', 022)
371 bb.data.setVarFlag('do_package_setscene', 'fakeroot', 1, d) 371 d.setVarFlag('do_package_setscene', 'fakeroot', 1)
372 source_mirror_fetch = bb.data.getVar('SOURCE_MIRROR_FETCH', d, 0) 372 source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', 0)
373 if not source_mirror_fetch: 373 if not source_mirror_fetch:
374 need_host = bb.data.getVar('COMPATIBLE_HOST', d, 1) 374 need_host = d.getVar('COMPATIBLE_HOST', 1)
375 if need_host: 375 if need_host:
376 import re 376 import re
377 this_host = bb.data.getVar('HOST_SYS', d, 1) 377 this_host = d.getVar('HOST_SYS', 1)
378 if not re.match(need_host, this_host): 378 if not re.match(need_host, this_host):
379 raise bb.parse.SkipPackage("incompatible with host %s" % this_host) 379 raise bb.parse.SkipPackage("incompatible with host %s" % this_host)
380 380
381 need_machine = bb.data.getVar('COMPATIBLE_MACHINE', d, 1) 381 need_machine = d.getVar('COMPATIBLE_MACHINE', 1)
382 if need_machine: 382 if need_machine:
383 import re 383 import re
384 this_machine = bb.data.getVar('MACHINE', d, 1) 384 this_machine = d.getVar('MACHINE', 1)
385 if this_machine and not re.match(need_machine, this_machine): 385 if this_machine and not re.match(need_machine, this_machine):
386 this_soc_family = bb.data.getVar('SOC_FAMILY', d, 1) 386 this_soc_family = d.getVar('SOC_FAMILY', 1)
387 if (this_soc_family and not re.match(need_machine, this_soc_family)) or not this_soc_family: 387 if (this_soc_family and not re.match(need_machine, this_soc_family)) or not this_soc_family:
388 raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine) 388 raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
389 389
390 390
391 dont_want_license = bb.data.getVar('INCOMPATIBLE_LICENSE', d, 1) 391 dont_want_license = d.getVar('INCOMPATIBLE_LICENSE', 1)
392 if dont_want_license and not pn.endswith("-native") and not pn.endswith("-cross") and not pn.endswith("-cross-initial") and not pn.endswith("-cross-intermediate") and not pn.endswith("-crosssdk-intermediate") and not pn.endswith("-crosssdk") and not pn.endswith("-crosssdk-initial"): 392 if dont_want_license and not pn.endswith("-native") and not pn.endswith("-cross") and not pn.endswith("-cross-initial") and not pn.endswith("-cross-intermediate") and not pn.endswith("-crosssdk-intermediate") and not pn.endswith("-crosssdk") and not pn.endswith("-crosssdk-initial"):
393 hosttools_whitelist = (bb.data.getVar('HOSTTOOLS_WHITELIST_%s' % dont_want_license, d, 1) or "").split() 393 hosttools_whitelist = (d.getVar('HOSTTOOLS_WHITELIST_%s' % dont_want_license, 1) or "").split()
394 lgplv2_whitelist = (bb.data.getVar('LGPLv2_WHITELIST_%s' % dont_want_license, d, 1) or "").split() 394 lgplv2_whitelist = (d.getVar('LGPLv2_WHITELIST_%s' % dont_want_license, 1) or "").split()
395 dont_want_whitelist = (bb.data.getVar('WHITELIST_%s' % dont_want_license, d, 1) or "").split() 395 dont_want_whitelist = (d.getVar('WHITELIST_%s' % dont_want_license, 1) or "").split()
396 if pn not in hosttools_whitelist and pn not in lgplv2_whitelist and pn not in dont_want_whitelist: 396 if pn not in hosttools_whitelist and pn not in lgplv2_whitelist and pn not in dont_want_whitelist:
397 397
398 import re 398 import re
399 this_license = bb.data.getVar('LICENSE', d, 1) 399 this_license = d.getVar('LICENSE', 1)
400 if this_license and re.search(dont_want_license, this_license): 400 if this_license and re.search(dont_want_license, this_license):
401 bb.note("SKIPPING %s because it's %s" % (pn, this_license)) 401 bb.note("SKIPPING %s because it's %s" % (pn, this_license))
402 raise bb.parse.SkipPackage("incompatible with license %s" % this_license) 402 raise bb.parse.SkipPackage("incompatible with license %s" % this_license)
403 403
404 # Git packages should DEPEND on git-native 404 # Git packages should DEPEND on git-native
405 srcuri = bb.data.getVar('SRC_URI', d, 1) 405 srcuri = d.getVar('SRC_URI', 1)
406 if "git://" in srcuri: 406 if "git://" in srcuri:
407 depends = bb.data.getVarFlag('do_fetch', 'depends', d) or "" 407 depends = d.getVarFlag('do_fetch', 'depends') or ""
408 depends = depends + " git-native:do_populate_sysroot" 408 depends = depends + " git-native:do_populate_sysroot"
409 bb.data.setVarFlag('do_fetch', 'depends', depends, d) 409 d.setVarFlag('do_fetch', 'depends', depends)
410 410
411 # Mercurial packages should DEPEND on mercurial-native 411 # Mercurial packages should DEPEND on mercurial-native
412 elif "hg://" in srcuri: 412 elif "hg://" in srcuri:
413 depends = bb.data.getVarFlag('do_fetch', 'depends', d) or "" 413 depends = d.getVarFlag('do_fetch', 'depends') or ""
414 depends = depends + " mercurial-native:do_populate_sysroot" 414 depends = depends + " mercurial-native:do_populate_sysroot"
415 bb.data.setVarFlag('do_fetch', 'depends', depends, d) 415 d.setVarFlag('do_fetch', 'depends', depends)
416 416
417 # OSC packages should DEPEND on osc-native 417 # OSC packages should DEPEND on osc-native
418 elif "osc://" in srcuri: 418 elif "osc://" in srcuri:
419 depends = bb.data.getVarFlag('do_fetch', 'depends', d) or "" 419 depends = d.getVarFlag('do_fetch', 'depends') or ""
420 depends = depends + " osc-native:do_populate_sysroot" 420 depends = depends + " osc-native:do_populate_sysroot"
421 bb.data.setVarFlag('do_fetch', 'depends', depends, d) 421 d.setVarFlag('do_fetch', 'depends', depends)
422 422
423 # *.xz should depends on xz-native for unpacking 423 # *.xz should depends on xz-native for unpacking
424 # Not endswith because of "*.patch.xz;patch=1". Need bb.decodeurl in future 424 # Not endswith because of "*.patch.xz;patch=1". Need bb.decodeurl in future
425 if '.xz' in srcuri: 425 if '.xz' in srcuri:
426 depends = bb.data.getVarFlag('do_unpack', 'depends', d) or "" 426 depends = d.getVarFlag('do_unpack', 'depends') or ""
427 depends = depends + " xz-native:do_populate_sysroot" 427 depends = depends + " xz-native:do_populate_sysroot"
428 bb.data.setVarFlag('do_unpack', 'depends', depends, d) 428 d.setVarFlag('do_unpack', 'depends', depends)
429 429
430 # unzip-native should already be staged before unpacking ZIP recipes 430 # unzip-native should already be staged before unpacking ZIP recipes
431 if ".zip" in srcuri: 431 if ".zip" in srcuri:
432 depends = bb.data.getVarFlag('do_unpack', 'depends', d) or "" 432 depends = d.getVarFlag('do_unpack', 'depends') or ""
433 depends = depends + " unzip-native:do_populate_sysroot" 433 depends = depends + " unzip-native:do_populate_sysroot"
434 bb.data.setVarFlag('do_unpack', 'depends', depends, d) 434 d.setVarFlag('do_unpack', 'depends', depends)
435 435
436 # 'multimachine' handling 436 # 'multimachine' handling
437 mach_arch = bb.data.getVar('MACHINE_ARCH', d, 1) 437 mach_arch = d.getVar('MACHINE_ARCH', 1)
438 pkg_arch = bb.data.getVar('PACKAGE_ARCH', d, 1) 438 pkg_arch = d.getVar('PACKAGE_ARCH', 1)
439 439
440 if (pkg_arch == mach_arch): 440 if (pkg_arch == mach_arch):
441 # Already machine specific - nothing further to do 441 # Already machine specific - nothing further to do
@@ -445,7 +445,7 @@ python () {
445 # We always try to scan SRC_URI for urls with machine overrides 445 # We always try to scan SRC_URI for urls with machine overrides
446 # unless the package sets SRC_URI_OVERRIDES_PACKAGE_ARCH=0 446 # unless the package sets SRC_URI_OVERRIDES_PACKAGE_ARCH=0
447 # 447 #
448 override = bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1) 448 override = d.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', 1)
449 if override != '0': 449 if override != '0':
450 paths = [] 450 paths = []
451 for p in [ "${PF}", "${P}", "${PN}", "files", "" ]: 451 for p in [ "${PF}", "${P}", "${PN}", "files", "" ]:
@@ -461,18 +461,18 @@ python () {
461 for mp in paths: 461 for mp in paths:
462 if local.startswith(mp): 462 if local.startswith(mp):
463 #bb.note("overriding PACKAGE_ARCH from %s to %s" % (pkg_arch, mach_arch)) 463 #bb.note("overriding PACKAGE_ARCH from %s to %s" % (pkg_arch, mach_arch))
464 bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d) 464 d.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}")
465 return 465 return
466 466
467 packages = bb.data.getVar('PACKAGES', d, 1).split() 467 packages = d.getVar('PACKAGES', 1).split()
468 for pkg in packages: 468 for pkg in packages:
469 pkgarch = bb.data.getVar("PACKAGE_ARCH_%s" % pkg, d, 1) 469 pkgarch = d.getVar("PACKAGE_ARCH_%s" % pkg, 1)
470 470
471 # We could look for != PACKAGE_ARCH here but how to choose 471 # We could look for != PACKAGE_ARCH here but how to choose
472 # if multiple differences are present? 472 # if multiple differences are present?
473 # Look through PACKAGE_ARCHS for the priority order? 473 # Look through PACKAGE_ARCHS for the priority order?
474 if pkgarch and pkgarch == mach_arch: 474 if pkgarch and pkgarch == mach_arch:
475 bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d) 475 d.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}")
476 bb.warn("Recipe %s is marked as only being architecture specific but seems to have machine specific packages?! The recipe may as well mark itself as machine specific directly." % d.getVar("PN", True)) 476 bb.warn("Recipe %s is marked as only being architecture specific but seems to have machine specific packages?! The recipe may as well mark itself as machine specific directly." % d.getVar("PN", True))
477} 477}
478 478
@@ -483,7 +483,7 @@ python do_cleansstate() {
483 483
484addtask cleanall after do_cleansstate 484addtask cleanall after do_cleansstate
485python do_cleanall() { 485python do_cleanall() {
486 src_uri = (bb.data.getVar('SRC_URI', d, True) or "").split() 486 src_uri = (d.getVar('SRC_URI', True) or "").split()
487 if len(src_uri) == 0: 487 if len(src_uri) == 0:
488 return 488 return
489 489
diff --git a/meta/classes/bugzilla.bbclass b/meta/classes/bugzilla.bbclass
index 801bd66..4028d26 100644
--- a/meta/classes/bugzilla.bbclass
+++ b/meta/classes/bugzilla.bbclass
@@ -109,14 +109,14 @@ python bugzilla_eventhandler() {
109 return 109 return
110 110
111 if name == "TaskFailed": 111 if name == "TaskFailed":
112 xmlrpc = bb.data.getVar("BUGZILLA_XMLRPC", data, True) 112 xmlrpc = data.getVar("BUGZILLA_XMLRPC", True)
113 user = bb.data.getVar("BUGZILLA_USER", data, True) 113 user = data.getVar("BUGZILLA_USER", True)
114 passw = bb.data.getVar("BUGZILLA_PASS", data, True) 114 passw = data.getVar("BUGZILLA_PASS", True)
115 product = bb.data.getVar("BUGZILLA_PRODUCT", data, True) 115 product = data.getVar("BUGZILLA_PRODUCT", True)
116 compon = bb.data.getVar("BUGZILLA_COMPONENT", data, True) 116 compon = data.getVar("BUGZILLA_COMPONENT", True)
117 version = bb.data.getVar("BUGZILLA_VERSION", data, True) 117 version = data.getVar("BUGZILLA_VERSION", True)
118 118
119 proxy = bb.data.getVar('http_proxy', data, True ) 119 proxy = data.getVar('http_proxy', True )
120 if (proxy): 120 if (proxy):
121 import urllib2 121 import urllib2
122 s, u, p, hostport = urllib2._parse_proxy(proxy) 122 s, u, p, hostport = urllib2._parse_proxy(proxy)
@@ -132,14 +132,14 @@ python bugzilla_eventhandler() {
132 'component': compon} 132 'component': compon}
133 133
134 # evil hack to figure out what is going on 134 # evil hack to figure out what is going on
135 debug_file = open(os.path.join(bb.data.getVar("TMPDIR", data, True),"..","bugzilla-log"),"a") 135 debug_file = open(os.path.join(data.getVar("TMPDIR", True),"..","bugzilla-log"),"a")
136 136
137 file = None 137 file = None
138 bugname = "%(package)s-%(pv)s-autobuild" % { "package" : bb.data.getVar("PN", data, True), 138 bugname = "%(package)s-%(pv)s-autobuild" % { "package" : data.getVar("PN", True),
139 "pv" : bb.data.getVar("PV", data, True), 139 "pv" : data.getVar("PV", True),
140 } 140 }
141 log_file = glob.glob("%s/log.%s.*" % (bb.data.getVar('T', event.data, True), event.task)) 141 log_file = glob.glob("%s/log.%s.*" % (event.data.getVar('T', True), event.task))
142 text = "The %s step in %s failed at %s for machine %s" % (e.task, bb.data.getVar("PN", data, True), bb.data.getVar('DATETIME', data, True), bb.data.getVar( 'MACHINE', data, True ) ) 142 text = "The %s step in %s failed at %s for machine %s" % (e.task, data.getVar("PN", True), data.getVar('DATETIME', True), data.getVar( 'MACHINE', True ) )
143 if len(log_file) != 0: 143 if len(log_file) != 0:
144 print >> debug_file, "Adding log file %s" % log_file[0] 144 print >> debug_file, "Adding log file %s" % log_file[0]
145 file = open(log_file[0], 'r') 145 file = open(log_file[0], 'r')
@@ -167,7 +167,7 @@ python bugzilla_eventhandler() {
167 167
168 if bug_number and log: 168 if bug_number and log:
169 print >> debug_file, "The bug is known as '%s'" % bug_number 169 print >> debug_file, "The bug is known as '%s'" % bug_number
170 desc = "Build log for machine %s" % (bb.data.getVar('MACHINE', data, True)) 170 desc = "Build log for machine %s" % (data.getVar('MACHINE', True))
171 if not bugzilla_create_attachment(debug_file, server, args.copy(), bug_number, text, log_file[0], log, desc): 171 if not bugzilla_create_attachment(debug_file, server, args.copy(), bug_number, text, log_file[0], log, desc):
172 print >> debug_file, "Failed to attach the build log for bug #%s" % bug_number 172 print >> debug_file, "Failed to attach the build log for bug #%s" % bug_number
173 else: 173 else:
@@ -181,6 +181,6 @@ python bugzilla_eventhandler() {
181 181
182 # store bug number for oestats-client 182 # store bug number for oestats-client
183 if bug_number: 183 if bug_number:
184 bb.data.setVar('OESTATS_BUG_NUMBER', bug_number, data) 184 data.setVar('OESTATS_BUG_NUMBER', bug_number)
185} 185}
186 186
diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index 96c98d4..4cd8fe6 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -21,25 +21,25 @@ def get_cputime():
21 return sum(int(field) for field in fields) 21 return sum(int(field) for field in fields)
22 22
23def set_bn(e): 23def set_bn(e):
24 bn = e.getPkgs()[0] + "-" + bb.data.getVar('MACHINE',e.data, True) 24 bn = e.getPkgs()[0] + "-" + e.data.getVar('MACHINE', True)
25 try: 25 try:
26 os.remove(bb.data.getVar('BNFILE', e.data, True)) 26 os.remove(e.data.getVar('BNFILE', True))
27 except: 27 except:
28 pass 28 pass
29 file = open(bb.data.getVar('BNFILE', e.data, True), "w") 29 file = open(e.data.getVar('BNFILE', True), "w")
30 file.write(os.path.join(bn, bb.data.getVar('BUILDNAME', e.data, True))) 30 file.write(os.path.join(bn, e.data.getVar('BUILDNAME', True)))
31 file.close() 31 file.close()
32 32
33def get_bn(e): 33def get_bn(e):
34 file = open(bb.data.getVar('BNFILE', e.data, True)) 34 file = open(e.data.getVar('BNFILE', True))
35 bn = file.readline() 35 bn = file.readline()
36 file.close() 36 file.close()
37 return bn 37 return bn
38 38
39def set_device(e): 39def set_device(e):
40 tmpdir = bb.data.getVar('TMPDIR', e.data, True) 40 tmpdir = e.data.getVar('TMPDIR', True)
41 try: 41 try:
42 os.remove(bb.data.getVar('DEVFILE', e.data, True)) 42 os.remove(e.data.getVar('DEVFILE', True))
43 except: 43 except:
44 pass 44 pass
45 ############################################################################ 45 ############################################################################
@@ -66,12 +66,12 @@ def set_device(e):
66 rdev=line.split()[2] 66 rdev=line.split()[2]
67 else: 67 else:
68 rdev="NoLogicalDevice" 68 rdev="NoLogicalDevice"
69 file = open(bb.data.getVar('DEVFILE', e.data, True), "w") 69 file = open(e.data.getVar('DEVFILE', True), "w")
70 file.write(rdev) 70 file.write(rdev)
71 file.close() 71 file.close()
72 72
73def get_device(e): 73def get_device(e):
74 file = open(bb.data.getVar('DEVFILE', e.data, True)) 74 file = open(e.data.getVar('DEVFILE', True))
75 device = file.readline() 75 device = file.readline()
76 file.close() 76 file.close()
77 return device 77 return device
@@ -126,7 +126,7 @@ def get_timedata(var, data):
126 126
127def write_task_data(status, logfile, dev, e): 127def write_task_data(status, logfile, dev, e):
128 bn = get_bn(e) 128 bn = get_bn(e)
129 bsdir = os.path.join(bb.data.getVar('BUILDSTATS_BASE', e.data, True), bn) 129 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
130 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data)) 130 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data))
131 file = open(os.path.join(logfile), "a") 131 file = open(os.path.join(logfile), "a")
132 timedata = get_timedata("__timedata_task", e.data) 132 timedata = get_timedata("__timedata_task", e.data)
@@ -168,7 +168,7 @@ python run_buildstats () {
168 # set the buildname 168 # set the buildname
169 ######################################################################## 169 ########################################################################
170 try: 170 try:
171 bb.mkdirhier(bb.data.getVar('BUILDSTATS_BASE', e.data, True)) 171 bb.mkdirhier(e.data.getVar('BUILDSTATS_BASE', True))
172 except: 172 except:
173 pass 173 pass
174 set_bn(e) 174 set_bn(e)
@@ -176,7 +176,7 @@ python run_buildstats () {
176 set_device(e) 176 set_device(e)
177 device = get_device(e) 177 device = get_device(e)
178 178
179 bsdir = os.path.join(bb.data.getVar('BUILDSTATS_BASE', e.data, True), bn) 179 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
180 try: 180 try:
181 bb.mkdirhier(bsdir) 181 bb.mkdirhier(bsdir)
182 except: 182 except:
@@ -199,7 +199,7 @@ python run_buildstats () {
199 elif isinstance(e, bb.event.BuildCompleted): 199 elif isinstance(e, bb.event.BuildCompleted):
200 bn = get_bn(e) 200 bn = get_bn(e)
201 device = get_device(e) 201 device = get_device(e)
202 bsdir = os.path.join(bb.data.getVar('BUILDSTATS_BASE', e.data, True), bn) 202 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
203 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data)) 203 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data))
204 build_time = os.path.join(bsdir, "build_stats") 204 build_time = os.path.join(bsdir, "build_stats")
205 file = open(build_time, "a") 205 file = open(build_time, "a")
@@ -224,7 +224,7 @@ python run_buildstats () {
224 if isinstance(e, bb.build.TaskStarted): 224 if isinstance(e, bb.build.TaskStarted):
225 bn = get_bn(e) 225 bn = get_bn(e)
226 device = get_device(e) 226 device = get_device(e)
227 bsdir = os.path.join(bb.data.getVar('BUILDSTATS_BASE', e.data, True), bn) 227 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
228 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data)) 228 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data))
229 if device != "NoLogicalDevice": 229 if device != "NoLogicalDevice":
230 set_diskdata("__diskdata_task", device, e.data) 230 set_diskdata("__diskdata_task", device, e.data)
@@ -242,14 +242,14 @@ python run_buildstats () {
242 elif isinstance(e, bb.build.TaskSucceeded): 242 elif isinstance(e, bb.build.TaskSucceeded):
243 bn = get_bn(e) 243 bn = get_bn(e)
244 device = get_device(e) 244 device = get_device(e)
245 bsdir = os.path.join(bb.data.getVar('BUILDSTATS_BASE', e.data, True), bn) 245 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
246 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data)) 246 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data))
247 write_task_data("passed", os.path.join(taskdir, e.task), device, e) 247 write_task_data("passed", os.path.join(taskdir, e.task), device, e)
248 if e.task == "do_rootfs": 248 if e.task == "do_rootfs":
249 bsdir = os.path.join(bb.data.getVar('BUILDSTATS_BASE', e.data, True), bn) 249 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
250 bs=os.path.join(bsdir, "build_stats") 250 bs=os.path.join(bsdir, "build_stats")
251 file = open(bs,"a") 251 file = open(bs,"a")
252 rootfs = bb.data.getVar('IMAGE_ROOTFS', e.data, True) 252 rootfs = e.data.getVar('IMAGE_ROOTFS', True)
253 rootfs_size = subprocess.Popen(["du", "-sh", rootfs], stdout=subprocess.PIPE).stdout.read() 253 rootfs_size = subprocess.Popen(["du", "-sh", rootfs], stdout=subprocess.PIPE).stdout.read()
254 file.write("Uncompressed Rootfs size: %s" % rootfs_size) 254 file.write("Uncompressed Rootfs size: %s" % rootfs_size)
255 file.close() 255 file.close()
@@ -257,7 +257,7 @@ python run_buildstats () {
257 elif isinstance(e, bb.build.TaskFailed): 257 elif isinstance(e, bb.build.TaskFailed):
258 bn = get_bn(e) 258 bn = get_bn(e)
259 device = get_device(e) 259 device = get_device(e)
260 bsdir = os.path.join(bb.data.getVar('BUILDSTATS_BASE', e.data, True), bn) 260 bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
261 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data)) 261 taskdir = os.path.join(bsdir, bb.data.expand("${PF}", e.data))
262 write_task_data("failed", os.path.join(taskdir, e.task), device, e) 262 write_task_data("failed", os.path.join(taskdir, e.task), device, e)
263 ######################################################################## 263 ########################################################################
diff --git a/meta/classes/cpan-base.bbclass b/meta/classes/cpan-base.bbclass
index b5dbdae..79582ca 100644
--- a/meta/classes/cpan-base.bbclass
+++ b/meta/classes/cpan-base.bbclass
@@ -28,7 +28,7 @@ def get_perl_version(d):
28 28
29# Determine where the library directories are 29# Determine where the library directories are
30def perl_get_libdirs(d): 30def perl_get_libdirs(d):
31 libdir = bb.data.getVar('libdir', d, 1) 31 libdir = d.getVar('libdir', 1)
32 if is_target(d) == "no": 32 if is_target(d) == "no":
33 libdir += '/perl-native' 33 libdir += '/perl-native'
34 libdir += '/perl' 34 libdir += '/perl'
diff --git a/meta/classes/cpan_build.bbclass b/meta/classes/cpan_build.bbclass
index cc503a4..981332c 100644
--- a/meta/classes/cpan_build.bbclass
+++ b/meta/classes/cpan_build.bbclass
@@ -10,9 +10,9 @@ inherit cpan-base
10# libmodule-build-perl) 10# libmodule-build-perl)
11# 11#
12def cpan_build_dep_prepend(d): 12def cpan_build_dep_prepend(d):
13 if bb.data.getVar('CPAN_BUILD_DEPS', d, 1): 13 if d.getVar('CPAN_BUILD_DEPS', 1):
14 return '' 14 return ''
15 pn = bb.data.getVar('PN', d, 1) 15 pn = d.getVar('PN', 1)
16 if pn in ['libmodule-build-perl', 'libmodule-build-perl-native']: 16 if pn in ['libmodule-build-perl', 'libmodule-build-perl-native']:
17 return '' 17 return ''
18 return 'libmodule-build-perl-native ' 18 return 'libmodule-build-perl-native '
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index 601175d..6f5bcd0 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -16,7 +16,7 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
16# 16#
17PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" 17PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
18python () { 18python () {
19 archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split() 19 archs = d.getVar('PACKAGE_ARCHS', True).split()
20 sdkarchs = [] 20 sdkarchs = []
21 for arch in archs: 21 for arch in archs:
22 sdkarchs.append(arch + '-nativesdk') 22 sdkarchs.append(arch + '-nativesdk')
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass
index 554525d..025abcf 100644
--- a/meta/classes/debian.bbclass
+++ b/meta/classes/debian.bbclass
@@ -22,8 +22,8 @@ python () {
22python debian_package_name_hook () { 22python debian_package_name_hook () {
23 import glob, copy, stat, errno, re 23 import glob, copy, stat, errno, re
24 24
25 pkgdest = bb.data.getVar('PKGDEST', d, 1) 25 pkgdest = d.getVar('PKGDEST', 1)
26 packages = bb.data.getVar('PACKAGES', d, 1) 26 packages = d.getVar('PACKAGES', 1)
27 bin_re = re.compile(".*/s?" + os.path.basename(d.getVar("bindir", True)) + "$") 27 bin_re = re.compile(".*/s?" + os.path.basename(d.getVar("bindir", True)) + "$")
28 lib_re = re.compile(".*/" + os.path.basename(d.getVar("libdir", True)) + "$") 28 lib_re = re.compile(".*/" + os.path.basename(d.getVar("libdir", True)) + "$")
29 so_re = re.compile("lib.*\.so") 29 so_re = re.compile("lib.*\.so")
@@ -60,7 +60,7 @@ python debian_package_name_hook () {
60 for f in files: 60 for f in files:
61 if so_re.match(f): 61 if so_re.match(f):
62 fp = os.path.join(root, f) 62 fp = os.path.join(root, f)
63 cmd = (bb.data.getVar('BUILD_PREFIX', d, 1) or "") + "objdump -p " + fp + " 2>/dev/null" 63 cmd = (d.getVar('BUILD_PREFIX', 1) or "") + "objdump -p " + fp + " 2>/dev/null"
64 fd = os.popen(cmd) 64 fd = os.popen(cmd)
65 lines = fd.readlines() 65 lines = fd.readlines()
66 fd.close() 66 fd.close()
@@ -74,7 +74,7 @@ python debian_package_name_hook () {
74 if len(sonames) == 1: 74 if len(sonames) == 1:
75 soname = sonames[0] 75 soname = sonames[0]
76 elif len(sonames) > 1: 76 elif len(sonames) > 1:
77 lead = bb.data.getVar('LEAD_SONAME', d, 1) 77 lead = d.getVar('LEAD_SONAME', 1)
78 if lead: 78 if lead:
79 r = re.compile(lead) 79 r = re.compile(lead)
80 filtered = [] 80 filtered = []
@@ -95,21 +95,21 @@ python debian_package_name_hook () {
95 if soname_result: 95 if soname_result:
96 (pkgname, devname) = soname_result 96 (pkgname, devname) = soname_result
97 for pkg in packages.split(): 97 for pkg in packages.split():
98 if (bb.data.getVar('PKG_' + pkg, d) or bb.data.getVar('DEBIAN_NOAUTONAME_' + pkg, d)): 98 if (d.getVar('PKG_' + pkg) or d.getVar('DEBIAN_NOAUTONAME_' + pkg)):
99 continue 99 continue
100 debian_pn = bb.data.getVar('DEBIANNAME_' + pkg, d) 100 debian_pn = d.getVar('DEBIANNAME_' + pkg)
101 if debian_pn: 101 if debian_pn:
102 newpkg = debian_pn 102 newpkg = debian_pn
103 elif pkg == orig_pkg: 103 elif pkg == orig_pkg:
104 newpkg = pkgname 104 newpkg = pkgname
105 else: 105 else:
106 newpkg = pkg.replace(orig_pkg, devname, 1) 106 newpkg = pkg.replace(orig_pkg, devname, 1)
107 mlpre=bb.data.getVar('MLPREFIX', d, True) 107 mlpre=d.getVar('MLPREFIX', True)
108 if mlpre: 108 if mlpre:
109 if not newpkg.find(mlpre) == 0: 109 if not newpkg.find(mlpre) == 0:
110 newpkg = mlpre + newpkg 110 newpkg = mlpre + newpkg
111 if newpkg != pkg: 111 if newpkg != pkg:
112 bb.data.setVar('PKG_' + pkg, newpkg, d) 112 d.setVar('PKG_' + pkg, newpkg)
113 113
114 # reversed sort is needed when some package is substring of another 114 # reversed sort is needed when some package is substring of another
115 # ie in ncurses we get without reverse sort: 115 # ie in ncurses we get without reverse sort:
@@ -117,7 +117,7 @@ python debian_package_name_hook () {
117 # and later 117 # and later
118 # DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libticw orig_pkg ncurses-libtic debian_pn None newpkg libticw 118 # DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libticw orig_pkg ncurses-libtic debian_pn None newpkg libticw
119 # so we need to handle ncurses-libticw->libticw5 before ncurses-libtic->libtic5 119 # so we need to handle ncurses-libticw->libticw5 before ncurses-libtic->libtic5
120 for pkg in sorted((bb.data.getVar('AUTO_LIBNAME_PKGS', d, 1) or "").split(), reverse=True): 120 for pkg in sorted((d.getVar('AUTO_LIBNAME_PKGS', 1) or "").split(), reverse=True):
121 auto_libname(packages, pkg) 121 auto_libname(packages, pkg)
122} 122}
123 123
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index ce7b931..687247a 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -19,87 +19,87 @@ addtask distrodata_np
19do_distrodata_np[nostamp] = "1" 19do_distrodata_np[nostamp] = "1"
20python do_distrodata_np() { 20python do_distrodata_np() {
21 localdata = bb.data.createCopy(d) 21 localdata = bb.data.createCopy(d)
22 pn = bb.data.getVar("PN", d, True) 22 pn = d.getVar("PN", True)
23 bb.note("Package Name: %s" % pn) 23 bb.note("Package Name: %s" % pn)
24 24
25 import oe.distro_check as dist_check 25 import oe.distro_check as dist_check
26 tmpdir = bb.data.getVar('TMPDIR', d, True) 26 tmpdir = d.getVar('TMPDIR', True)
27 distro_check_dir = os.path.join(tmpdir, "distro_check") 27 distro_check_dir = os.path.join(tmpdir, "distro_check")
28 datetime = bb.data.getVar('DATETIME', localdata, True) 28 datetime = localdata.getVar('DATETIME', True)
29 dist_check.update_distro_data(distro_check_dir, datetime) 29 dist_check.update_distro_data(distro_check_dir, datetime)
30 30
31 if pn.find("-native") != -1: 31 if pn.find("-native") != -1:
32 pnstripped = pn.split("-native") 32 pnstripped = pn.split("-native")
33 bb.note("Native Split: %s" % pnstripped) 33 bb.note("Native Split: %s" % pnstripped)
34 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) 34 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True), localdata)
35 bb.data.update_data(localdata) 35 bb.data.update_data(localdata)
36 36
37 if pn.find("-nativesdk") != -1: 37 if pn.find("-nativesdk") != -1:
38 pnstripped = pn.split("-nativesdk") 38 pnstripped = pn.split("-nativesdk")
39 bb.note("Native Split: %s" % pnstripped) 39 bb.note("Native Split: %s" % pnstripped)
40 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) 40 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True), localdata)
41 bb.data.update_data(localdata) 41 bb.data.update_data(localdata)
42 42
43 if pn.find("-cross") != -1: 43 if pn.find("-cross") != -1:
44 pnstripped = pn.split("-cross") 44 pnstripped = pn.split("-cross")
45 bb.note("cross Split: %s" % pnstripped) 45 bb.note("cross Split: %s" % pnstripped)
46 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) 46 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True), localdata)
47 bb.data.update_data(localdata) 47 bb.data.update_data(localdata)
48 48
49 if pn.find("-crosssdk") != -1: 49 if pn.find("-crosssdk") != -1:
50 pnstripped = pn.split("-crosssdk") 50 pnstripped = pn.split("-crosssdk")
51 bb.note("cross Split: %s" % pnstripped) 51 bb.note("cross Split: %s" % pnstripped)
52 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) 52 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True), localdata)
53 bb.data.update_data(localdata) 53 bb.data.update_data(localdata)
54 54
55 if pn.find("-initial") != -1: 55 if pn.find("-initial") != -1:
56 pnstripped = pn.split("-initial") 56 pnstripped = pn.split("-initial")
57 bb.note("initial Split: %s" % pnstripped) 57 bb.note("initial Split: %s" % pnstripped)
58 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) 58 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True), localdata)
59 bb.data.update_data(localdata) 59 bb.data.update_data(localdata)
60 60
61 """generate package information from .bb file""" 61 """generate package information from .bb file"""
62 pname = bb.data.getVar('PN', localdata, True) 62 pname = localdata.getVar('PN', True)
63 pcurver = bb.data.getVar('PV', localdata, True) 63 pcurver = localdata.getVar('PV', True)
64 pdesc = bb.data.getVar('DESCRIPTION', localdata, True) 64 pdesc = localdata.getVar('DESCRIPTION', True)
65 if pdesc is not None: 65 if pdesc is not None:
66 pdesc = pdesc.replace(',','') 66 pdesc = pdesc.replace(',','')
67 pdesc = pdesc.replace('\n','') 67 pdesc = pdesc.replace('\n','')
68 68
69 pgrp = bb.data.getVar('SECTION', localdata, True) 69 pgrp = localdata.getVar('SECTION', True)
70 plicense = bb.data.getVar('LICENSE', localdata, True).replace(',','_') 70 plicense = localdata.getVar('LICENSE', True).replace(',','_')
71 if bb.data.getVar('LIC_FILES_CHKSUM', localdata, True): 71 if localdata.getVar('LIC_FILES_CHKSUM', True):
72 pchksum="1" 72 pchksum="1"
73 else: 73 else:
74 pchksum="0" 74 pchksum="0"
75 75
76 if bb.data.getVar('RECIPE_STATUS', localdata, True): 76 if localdata.getVar('RECIPE_STATUS', True):
77 hasrstatus="1" 77 hasrstatus="1"
78 else: 78 else:
79 hasrstatus="0" 79 hasrstatus="0"
80 80
81 rstatus = bb.data.getVar('RECIPE_STATUS', localdata, True) 81 rstatus = localdata.getVar('RECIPE_STATUS', True)
82 if rstatus is not None: 82 if rstatus is not None:
83 rstatus = rstatus.replace(',','') 83 rstatus = rstatus.replace(',','')
84 84
85 pupver = bb.data.getVar('RECIPE_LATEST_VERSION', localdata, True) 85 pupver = localdata.getVar('RECIPE_LATEST_VERSION', True)
86 if pcurver == pupver: 86 if pcurver == pupver:
87 vermatch="1" 87 vermatch="1"
88 else: 88 else:
89 vermatch="0" 89 vermatch="0"
90 noupdate_reason = bb.data.getVar('RECIPE_NO_UPDATE_REASON', localdata, True) 90 noupdate_reason = localdata.getVar('RECIPE_NO_UPDATE_REASON', True)
91 if noupdate_reason is None: 91 if noupdate_reason is None:
92 noupdate="0" 92 noupdate="0"
93 else: 93 else:
94 noupdate="1" 94 noupdate="1"
95 noupdate_reason = noupdate_reason.replace(',','') 95 noupdate_reason = noupdate_reason.replace(',','')
96 96
97 ris = bb.data.getVar('RECIPE_INTEL_SECTION', localdata, True) 97 ris = localdata.getVar('RECIPE_INTEL_SECTION', True)
98 maintainer = bb.data.getVar('RECIPE_MAINTAINER', localdata, True) 98 maintainer = localdata.getVar('RECIPE_MAINTAINER', True)
99 rttr = bb.data.getVar('RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES', localdata, True) 99 rttr = localdata.getVar('RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES', True)
100 rlrd = bb.data.getVar('RECIPE_LATEST_RELEASE_DATE', localdata, True) 100 rlrd = localdata.getVar('RECIPE_LATEST_RELEASE_DATE', True)
101 dc = bb.data.getVar('DEPENDENCY_CHECK', localdata, True) 101 dc = localdata.getVar('DEPENDENCY_CHECK', True)
102 rc = bb.data.getVar('RECIPE_COMMENTS', localdata, True) 102 rc = localdata.getVar('RECIPE_COMMENTS', True)
103 result = dist_check.compare_in_distro_packages_list(distro_check_dir, localdata) 103 result = dist_check.compare_in_distro_packages_list(distro_check_dir, localdata)
104 104
105 bb.note("DISTRO: %s,%s,%s,%s,%s,%s,%s,%s,%s, %s, %s, %s\n" % \ 105 bb.note("DISTRO: %s,%s,%s,%s,%s,%s,%s,%s,%s, %s, %s, %s\n" % \
@@ -113,81 +113,81 @@ python do_distrodata_np() {
113addtask distrodata 113addtask distrodata
114do_distrodata[nostamp] = "1" 114do_distrodata[nostamp] = "1"
115python do_distrodata() { 115python do_distrodata() {
116 logpath = bb.data.getVar('LOG_DIR', d, True) 116 logpath = d.getVar('LOG_DIR', True)
117 bb.utils.mkdirhier(logpath) 117 bb.utils.mkdirhier(logpath)
118 logfile = os.path.join(logpath, "distrodata.csv") 118 logfile = os.path.join(logpath, "distrodata.csv")
119 119
120 import oe.distro_check as dist_check 120 import oe.distro_check as dist_check
121 localdata = bb.data.createCopy(d) 121 localdata = bb.data.createCopy(d)
122 tmpdir = bb.data.getVar('TMPDIR', d, True) 122 tmpdir = d.getVar('TMPDIR', True)
123 distro_check_dir = os.path.join(tmpdir, "distro_check") 123 distro_check_dir = os.path.join(tmpdir, "distro_check")
124 datetime = bb.data.getVar('DATETIME', localdata, True) 124 datetime = localdata.getVar('DATETIME', True)
125 dist_check.update_distro_data(distro_check_dir, datetime) 125 dist_check.update_distro_data(distro_check_dir, datetime)
126 126
127 pn = bb.data.getVar("PN", d, True) 127 pn = d.getVar("PN", True)
128 bb.note("Package Name: %s" % pn) 128 bb.note("Package Name: %s" % pn)
129 129
130 if pn.find("-native") != -1: 130 if pn.find("-native") != -1:
131 pnstripped = pn.split("-native") 131 pnstripped = pn.split("-native")
132 bb.note("Native Split: %s" % pnstripped) 132 bb.note("Native Split: %s" % pnstripped)
133 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) 133 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True), localdata)
134 bb.data.update_data(localdata) 134 bb.data.update_data(localdata)
135 135
136 if pn.find("-cross") != -1: 136 if pn.find("-cross") != -1:
137 pnstripped = pn.split("-cross") 137 pnstripped = pn.split("-cross")
138 bb.note("cross Split: %s" % pnstripped) 138 bb.note("cross Split: %s" % pnstripped)
139 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) 139 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True), localdata)
140 bb.data.update_data(localdata) 140 bb.data.update_data(localdata)
141 141
142 if pn.find("-initial") != -1: 142 if pn.find("-initial") != -1:
143 pnstripped = pn.split("-initial") 143 pnstripped = pn.split("-initial")
144 bb.note("initial Split: %s" % pnstripped) 144 bb.note("initial Split: %s" % pnstripped)
145 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) 145 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True), localdata)
146 bb.data.update_data(localdata) 146 bb.data.update_data(localdata)
147 147
148 """generate package information from .bb file""" 148 """generate package information from .bb file"""
149 pname = bb.data.getVar('PN', localdata, True) 149 pname = localdata.getVar('PN', True)
150 pcurver = bb.data.getVar('PV', localdata, True) 150 pcurver = localdata.getVar('PV', True)
151 pdesc = bb.data.getVar('DESCRIPTION', localdata, True) 151 pdesc = localdata.getVar('DESCRIPTION', True)
152 if pdesc is not None: 152 if pdesc is not None:
153 pdesc = pdesc.replace(',','') 153 pdesc = pdesc.replace(',','')
154 pdesc = pdesc.replace('\n','') 154 pdesc = pdesc.replace('\n','')
155 155
156 pgrp = bb.data.getVar('SECTION', localdata, True) 156 pgrp = localdata.getVar('SECTION', True)
157 plicense = bb.data.getVar('LICENSE', localdata, True).replace(',','_') 157 plicense = localdata.getVar('LICENSE', True).replace(',','_')
158 if bb.data.getVar('LIC_FILES_CHKSUM', localdata, True): 158 if localdata.getVar('LIC_FILES_CHKSUM', True):
159 pchksum="1" 159 pchksum="1"
160 else: 160 else:
161 pchksum="0" 161 pchksum="0"
162 162
163 if bb.data.getVar('RECIPE_STATUS', localdata, True): 163 if localdata.getVar('RECIPE_STATUS', True):
164 hasrstatus="1" 164 hasrstatus="1"
165 else: 165 else:
166 hasrstatus="0" 166 hasrstatus="0"
167 167
168 rstatus = bb.data.getVar('RECIPE_STATUS', localdata, True) 168 rstatus = localdata.getVar('RECIPE_STATUS', True)
169 if rstatus is not None: 169 if rstatus is not None:
170 rstatus = rstatus.replace(',','') 170 rstatus = rstatus.replace(',','')
171 171
172 pupver = bb.data.getVar('RECIPE_LATEST_VERSION', localdata, True) 172 pupver = localdata.getVar('RECIPE_LATEST_VERSION', True)
173 if pcurver == pupver: 173 if pcurver == pupver:
174 vermatch="1" 174 vermatch="1"
175 else: 175 else:
176 vermatch="0" 176 vermatch="0"
177 177
178 noupdate_reason = bb.data.getVar('RECIPE_NO_UPDATE_REASON', localdata, True) 178 noupdate_reason = localdata.getVar('RECIPE_NO_UPDATE_REASON', True)
179 if noupdate_reason is None: 179 if noupdate_reason is None:
180 noupdate="0" 180 noupdate="0"
181 else: 181 else:
182 noupdate="1" 182 noupdate="1"
183 noupdate_reason = noupdate_reason.replace(',','') 183 noupdate_reason = noupdate_reason.replace(',','')
184 184
185 ris = bb.data.getVar('RECIPE_INTEL_SECTION', localdata, True) 185 ris = localdata.getVar('RECIPE_INTEL_SECTION', True)
186 maintainer = bb.data.getVar('RECIPE_MAINTAINER', localdata, True) 186 maintainer = localdata.getVar('RECIPE_MAINTAINER', True)
187 rttr = bb.data.getVar('RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES', localdata, True) 187 rttr = localdata.getVar('RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES', True)
188 rlrd = bb.data.getVar('RECIPE_LATEST_RELEASE_DATE', localdata, True) 188 rlrd = localdata.getVar('RECIPE_LATEST_RELEASE_DATE', True)
189 dc = bb.data.getVar('DEPENDENCY_CHECK', localdata, True) 189 dc = localdata.getVar('DEPENDENCY_CHECK', True)
190 rc = bb.data.getVar('RECIPE_COMMENTS', localdata, True) 190 rc = localdata.getVar('RECIPE_COMMENTS', True)
191 # do the comparison 191 # do the comparison
192 result = dist_check.compare_in_distro_packages_list(distro_check_dir, localdata) 192 result = dist_check.compare_in_distro_packages_list(distro_check_dir, localdata)
193 193
@@ -298,7 +298,7 @@ python do_checkpkg() {
298 Clear internal url cache as it's a temporary check. Not doing so will have 298 Clear internal url cache as it's a temporary check. Not doing so will have
299 bitbake check url multiple times when looping through a single url 299 bitbake check url multiple times when looping through a single url
300 """ 300 """
301 fn = bb.data.getVar('FILE', d, True) 301 fn = d.getVar('FILE', True)
302 bb.fetch2.urldata_cache[fn] = {} 302 bb.fetch2.urldata_cache[fn] = {}
303 303
304 """ 304 """
@@ -329,7 +329,7 @@ python do_checkpkg() {
329 Return new version if success, or else error in "Errxxxx" style 329 Return new version if success, or else error in "Errxxxx" style
330 """ 330 """
331 def check_new_dir(url, curver, d): 331 def check_new_dir(url, curver, d):
332 pn = bb.data.getVar('PN', d, True) 332 pn = d.getVar('PN', True)
333 f = tempfile.NamedTemporaryFile(delete=False, prefix="%s-1-" % pn) 333 f = tempfile.NamedTemporaryFile(delete=False, prefix="%s-1-" % pn)
334 status = internal_fetch_wget(url, d, f) 334 status = internal_fetch_wget(url, d, f)
335 fhtml = f.read() 335 fhtml = f.read()
@@ -372,7 +372,7 @@ python do_checkpkg() {
372 372
373 f.close() 373 f.close()
374 if status != "ErrHostNoDir" and re.match("Err", status): 374 if status != "ErrHostNoDir" and re.match("Err", status):
375 logpath = bb.data.getVar('LOG_DIR', d, 1) 375 logpath = d.getVar('LOG_DIR', 1)
376 os.system("cp %s %s/" % (f.name, logpath)) 376 os.system("cp %s %s/" % (f.name, logpath))
377 os.unlink(f.name) 377 os.unlink(f.name)
378 return status 378 return status
@@ -388,7 +388,7 @@ python do_checkpkg() {
388 """possible to have no version in pkg name, such as spectrum-fw""" 388 """possible to have no version in pkg name, such as spectrum-fw"""
389 if not re.search("\d+", curname): 389 if not re.search("\d+", curname):
390 return pcurver 390 return pcurver
391 pn = bb.data.getVar('PN', d, True) 391 pn = d.getVar('PN', True)
392 f = tempfile.NamedTemporaryFile(delete=False, prefix="%s-2-" % pn) 392 f = tempfile.NamedTemporaryFile(delete=False, prefix="%s-2-" % pn)
393 status = internal_fetch_wget(url, d, f) 393 status = internal_fetch_wget(url, d, f)
394 fhtml = f.read() 394 fhtml = f.read()
@@ -431,55 +431,55 @@ python do_checkpkg() {
431 f.close() 431 f.close()
432 """if host hasn't directory information, no need to save tmp file""" 432 """if host hasn't directory information, no need to save tmp file"""
433 if status != "ErrHostNoDir" and re.match("Err", status): 433 if status != "ErrHostNoDir" and re.match("Err", status):
434 logpath = bb.data.getVar('LOG_DIR', d, True) 434 logpath = d.getVar('LOG_DIR', True)
435 os.system("cp %s %s/" % (f.name, logpath)) 435 os.system("cp %s %s/" % (f.name, logpath))
436 os.unlink(f.name) 436 os.unlink(f.name)
437 return status 437 return status
438 438
439 """first check whether a uri is provided""" 439 """first check whether a uri is provided"""
440 src_uri = bb.data.getVar('SRC_URI', d, True) 440 src_uri = d.getVar('SRC_URI', True)
441 if not src_uri: 441 if not src_uri:
442 return 442 return
443 443
444 """initialize log files.""" 444 """initialize log files."""
445 logpath = bb.data.getVar('LOG_DIR', d, True) 445 logpath = d.getVar('LOG_DIR', True)
446 bb.utils.mkdirhier(logpath) 446 bb.utils.mkdirhier(logpath)
447 logfile = os.path.join(logpath, "checkpkg.csv") 447 logfile = os.path.join(logpath, "checkpkg.csv")
448 448
449 """generate package information from .bb file""" 449 """generate package information from .bb file"""
450 pname = bb.data.getVar('PN', d, True) 450 pname = d.getVar('PN', True)
451 451
452 if pname.find("-native") != -1: 452 if pname.find("-native") != -1:
453 pnstripped = pname.split("-native") 453 pnstripped = pname.split("-native")
454 bb.note("Native Split: %s" % pnstripped) 454 bb.note("Native Split: %s" % pnstripped)
455 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) 455 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True), localdata)
456 bb.data.update_data(localdata) 456 bb.data.update_data(localdata)
457 457
458 if pname.find("-cross") != -1: 458 if pname.find("-cross") != -1:
459 pnstripped = pname.split("-cross") 459 pnstripped = pname.split("-cross")
460 bb.note("cross Split: %s" % pnstripped) 460 bb.note("cross Split: %s" % pnstripped)
461 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) 461 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True), localdata)
462 bb.data.update_data(localdata) 462 bb.data.update_data(localdata)
463 463
464 if pname.find("-initial") != -1: 464 if pname.find("-initial") != -1:
465 pnstripped = pname.split("-initial") 465 pnstripped = pname.split("-initial")
466 bb.note("initial Split: %s" % pnstripped) 466 bb.note("initial Split: %s" % pnstripped)
467 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) 467 bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True), localdata)
468 bb.data.update_data(localdata) 468 bb.data.update_data(localdata)
469 469
470 pdesc = bb.data.getVar('DESCRIPTION', localdata, True) 470 pdesc = localdata.getVar('DESCRIPTION', True)
471 pgrp = bb.data.getVar('SECTION', localdata, True) 471 pgrp = localdata.getVar('SECTION', True)
472 pversion = bb.data.getVar('PV', localdata, True) 472 pversion = localdata.getVar('PV', True)
473 plicense = bb.data.getVar('LICENSE', localdata, True) 473 plicense = localdata.getVar('LICENSE', True)
474 psection = bb.data.getVar('SECTION', localdata, True) 474 psection = localdata.getVar('SECTION', True)
475 phome = bb.data.getVar('HOMEPAGE', localdata, True) 475 phome = localdata.getVar('HOMEPAGE', True)
476 prelease = bb.data.getVar('PR', localdata, True) 476 prelease = localdata.getVar('PR', True)
477 ppriority = bb.data.getVar('PRIORITY', localdata, True) 477 ppriority = localdata.getVar('PRIORITY', True)
478 pdepends = bb.data.getVar('DEPENDS', localdata, True) 478 pdepends = localdata.getVar('DEPENDS', True)
479 pbugtracker = bb.data.getVar('BUGTRACKER', localdata, True) 479 pbugtracker = localdata.getVar('BUGTRACKER', True)
480 ppe = bb.data.getVar('PE', localdata, True) 480 ppe = localdata.getVar('PE', True)
481 psrcuri = bb.data.getVar('SRC_URI', localdata, True) 481 psrcuri = localdata.getVar('SRC_URI', True)
482 maintainer = bb.data.getVar('RECIPE_MAINTAINER', localdata, True) 482 maintainer = localdata.getVar('RECIPE_MAINTAINER', True)
483 483
484 found = 0 484 found = 0
485 for uri in src_uri.split(): 485 for uri in src_uri.split():
@@ -497,9 +497,9 @@ python do_checkpkg() {
497 497
498 (type, host, path, user, pswd, parm) = bb.decodeurl(uri) 498 (type, host, path, user, pswd, parm) = bb.decodeurl(uri)
499 if type in ['http', 'https', 'ftp']: 499 if type in ['http', 'https', 'ftp']:
500 pcurver = bb.data.getVar('PV', d, True) 500 pcurver = d.getVar('PV', True)
501 else: 501 else:
502 pcurver = bb.data.getVar("SRCREV", d, True) 502 pcurver = d.getVar("SRCREV", True)
503 503
504 if type in ['http', 'https', 'ftp']: 504 if type in ['http', 'https', 'ftp']:
505 newver = pcurver 505 newver = pcurver
@@ -639,7 +639,7 @@ python do_checkpkg() {
639 pstatus += ":%s%s" % (host, path) 639 pstatus += ":%s%s" % (host, path)
640 640
641 """Read from manual distro tracking fields as alternative""" 641 """Read from manual distro tracking fields as alternative"""
642 pmver = bb.data.getVar("RECIPE_LATEST_VERSION", d, True) 642 pmver = d.getVar("RECIPE_LATEST_VERSION", True)
643 if not pmver: 643 if not pmver:
644 pmver = "N/A" 644 pmver = "N/A"
645 pmstatus = "ErrNoRecipeData" 645 pmstatus = "ErrNoRecipeData"
@@ -688,12 +688,12 @@ python do_distro_check() {
688 688
689 localdata = bb.data.createCopy(d) 689 localdata = bb.data.createCopy(d)
690 bb.data.update_data(localdata) 690 bb.data.update_data(localdata)
691 tmpdir = bb.data.getVar('TMPDIR', d, True) 691 tmpdir = d.getVar('TMPDIR', True)
692 distro_check_dir = os.path.join(tmpdir, "distro_check") 692 distro_check_dir = os.path.join(tmpdir, "distro_check")
693 logpath = bb.data.getVar('LOG_DIR', d, True) 693 logpath = d.getVar('LOG_DIR', True)
694 bb.utils.mkdirhier(logpath) 694 bb.utils.mkdirhier(logpath)
695 result_file = os.path.join(logpath, "distrocheck.csv") 695 result_file = os.path.join(logpath, "distrocheck.csv")
696 datetime = bb.data.getVar('DATETIME', localdata, True) 696 datetime = localdata.getVar('DATETIME', True)
697 dc.update_distro_data(distro_check_dir, datetime) 697 dc.update_distro_data(distro_check_dir, datetime)
698 698
699 # do the comparison 699 # do the comparison
@@ -734,12 +734,12 @@ python do_checklicense() {
734 import os 734 import os
735 import bb 735 import bb
736 import shutil 736 import shutil
737 logpath = bb.data.getVar('LOG_DIR', d, True) 737 logpath = d.getVar('LOG_DIR', True)
738 bb.utils.mkdirhier(logpath) 738 bb.utils.mkdirhier(logpath)
739 pn = bb.data.getVar('PN', d, True) 739 pn = d.getVar('PN', True)
740 logfile = os.path.join(logpath, "missinglicense.csv") 740 logfile = os.path.join(logpath, "missinglicense.csv")
741 generic_directory = bb.data.getVar('COMMON_LICENSE_DIR', d, True) 741 generic_directory = d.getVar('COMMON_LICENSE_DIR', True)
742 license_types = bb.data.getVar('LICENSE', d, True) 742 license_types = d.getVar('LICENSE', True)
743 for license_type in ((license_types.replace('+', '').replace('|', '&') 743 for license_type in ((license_types.replace('+', '').replace('|', '&')
744 .replace('(', '').replace(')', '').replace(';', '') 744 .replace('(', '').replace(')', '').replace(';', '')
745 .replace(',', '').replace(" ", "").split("&"))): 745 .replace(',', '').replace(" ", "").split("&"))):
diff --git a/meta/classes/distutils-base.bbclass b/meta/classes/distutils-base.bbclass
index e84b0fc..e7d0bb8 100644
--- a/meta/classes/distutils-base.bbclass
+++ b/meta/classes/distutils-base.bbclass
@@ -1,4 +1,4 @@
1DEPENDS += "${@["python-native python", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" 1DEPENDS += "${@["python-native python", ""][(d.getVar('PACKAGES', 1) == '')]}"
2RDEPENDS_${PN} += "${@['', 'python-core']['${PN}' == '${BPN}']}" 2RDEPENDS_${PN} += "${@['', 'python-core']['${PN}' == '${BPN}']}"
3 3
4inherit distutils-common-base 4inherit distutils-common-base
diff --git a/meta/classes/distutils-native-base.bbclass b/meta/classes/distutils-native-base.bbclass
index 2703fe0..47367d7 100644
--- a/meta/classes/distutils-native-base.bbclass
+++ b/meta/classes/distutils-native-base.bbclass
@@ -1,3 +1,3 @@
1DEPENDS += "${@["python-native", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" 1DEPENDS += "${@["python-native", ""][(d.getVar('PACKAGES', 1) == '')]}"
2 2
3inherit distutils-common-base 3inherit distutils-common-base
diff --git a/meta/classes/gconf.bbclass b/meta/classes/gconf.bbclass
index 6798678..bffc92e 100644
--- a/meta/classes/gconf.bbclass
+++ b/meta/classes/gconf.bbclass
@@ -27,8 +27,8 @@ done
27 27
28python populate_packages_append () { 28python populate_packages_append () {
29 import re 29 import re
30 packages = bb.data.getVar('PACKAGES', d, 1).split() 30 packages = d.getVar('PACKAGES', 1).split()
31 pkgdest = bb.data.getVar('PKGDEST', d, 1) 31 pkgdest = d.getVar('PKGDEST', 1)
32 32
33 for pkg in packages: 33 for pkg in packages:
34 schema_dir = '%s/%s/etc/gconf/schemas' % (pkgdest, pkg) 34 schema_dir = '%s/%s/etc/gconf/schemas' % (pkgdest, pkg)
@@ -41,15 +41,15 @@ python populate_packages_append () {
41 if schemas != []: 41 if schemas != []:
42 bb.note("adding gconf postinst and prerm scripts to %s" % pkg) 42 bb.note("adding gconf postinst and prerm scripts to %s" % pkg)
43 bb.data.setVar('SCHEMA_FILES', " ".join(schemas), d) 43 bb.data.setVar('SCHEMA_FILES', " ".join(schemas), d)
44 postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1) 44 postinst = d.getVar('pkg_postinst_%s' % pkg, 1) or d.getVar('pkg_postinst', 1)
45 if not postinst: 45 if not postinst:
46 postinst = '#!/bin/sh\n' 46 postinst = '#!/bin/sh\n'
47 postinst += bb.data.getVar('gconf_postinst', d, 1) 47 postinst += d.getVar('gconf_postinst', 1)
48 bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) 48 d.setVar('pkg_postinst_%s' % pkg, postinst)
49 prerm = bb.data.getVar('pkg_prerm_%s' % pkg, d, 1) or bb.data.getVar('pkg_prerm', d, 1) 49 prerm = d.getVar('pkg_prerm_%s' % pkg, 1) or d.getVar('pkg_prerm', 1)
50 if not prerm: 50 if not prerm:
51 prerm = '#!/bin/sh\n' 51 prerm = '#!/bin/sh\n'
52 prerm += bb.data.getVar('gconf_prerm', d, 1) 52 prerm += d.getVar('gconf_prerm', 1)
53 bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d) 53 d.setVar('pkg_prerm_%s' % pkg, prerm)
54 54
55} 55}
diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
index d0840d5..eac3061 100644
--- a/meta/classes/gtk-icon-cache.bbclass
+++ b/meta/classes/gtk-icon-cache.bbclass
@@ -28,31 +28,31 @@ done
28} 28}
29 29
30python populate_packages_append () { 30python populate_packages_append () {
31 packages = bb.data.getVar('PACKAGES', d, 1).split() 31 packages = d.getVar('PACKAGES', 1).split()
32 pkgdest = bb.data.getVar('PKGDEST', d, 1) 32 pkgdest = d.getVar('PKGDEST', 1)
33 33
34 for pkg in packages: 34 for pkg in packages:
35 icon_dir = '%s/%s/%s/icons' % (pkgdest, pkg, bb.data.getVar('datadir', d, 1)) 35 icon_dir = '%s/%s/%s/icons' % (pkgdest, pkg, d.getVar('datadir', 1))
36 if not os.path.exists(icon_dir): 36 if not os.path.exists(icon_dir):
37 continue 37 continue
38 38
39 bb.note("adding hicolor-icon-theme dependency to %s" % pkg) 39 bb.note("adding hicolor-icon-theme dependency to %s" % pkg)
40 rdepends = bb.data.getVar('RDEPENDS_%s' % pkg, d, 1) 40 rdepends = d.getVar('RDEPENDS_%s' % pkg, 1)
41 rdepends = rdepends + ' ' + bb.data.getVar('MLPREFIX', d) + "hicolor-icon-theme" 41 rdepends = rdepends + ' ' + d.getVar('MLPREFIX') + "hicolor-icon-theme"
42 bb.data.setVar('RDEPENDS_%s' % pkg, rdepends, d) 42 d.setVar('RDEPENDS_%s' % pkg, rdepends)
43 43
44 bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg) 44 bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg)
45 45
46 postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1) 46 postinst = d.getVar('pkg_postinst_%s' % pkg, 1) or d.getVar('pkg_postinst', 1)
47 if not postinst: 47 if not postinst:
48 postinst = '#!/bin/sh\n' 48 postinst = '#!/bin/sh\n'
49 postinst += bb.data.getVar('gtk_icon_cache_postinst', d, 1) 49 postinst += d.getVar('gtk_icon_cache_postinst', 1)
50 bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) 50 d.setVar('pkg_postinst_%s' % pkg, postinst)
51 51
52 postrm = bb.data.getVar('pkg_postrm_%s' % pkg, d, 1) or bb.data.getVar('pkg_postrm', d, 1) 52 postrm = d.getVar('pkg_postrm_%s' % pkg, 1) or d.getVar('pkg_postrm', 1)
53 if not postrm: 53 if not postrm:
54 postrm = '#!/bin/sh\n' 54 postrm = '#!/bin/sh\n'
55 postrm += bb.data.getVar('gtk_icon_cache_postrm', d, 1) 55 postrm += d.getVar('gtk_icon_cache_postrm', 1)
56 bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d) 56 d.setVar('pkg_postrm_%s' % pkg, postrm)
57} 57}
58 58
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index f8e9d88..7e3676a 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -32,7 +32,7 @@ def icecc_dep_prepend(d):
32 # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not 32 # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
33 # we need that built is the responsibility of the patch function / class, not 33 # we need that built is the responsibility of the patch function / class, not
34 # the application. 34 # the application.
35 if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d): 35 if not d.getVar('INHIBIT_DEFAULT_DEPS'):
36 return "icecc-create-env-native" 36 return "icecc-create-env-native"
37 return "" 37 return ""
38 38
@@ -54,7 +54,7 @@ def create_path(compilers, bb, d):
54 staging += "-kernel" 54 staging += "-kernel"
55 55
56 #check if the icecc path is set by the user 56 #check if the icecc path is set by the user
57 icecc = bb.data.getVar('ICECC_PATH', d) or os.popen("which icecc").read()[:-1] 57 icecc = d.getVar('ICECC_PATH') or os.popen("which icecc").read()[:-1]
58 58
59 # Create the dir if necessary 59 # Create the dir if necessary
60 try: 60 try:
@@ -81,7 +81,7 @@ def use_icc(bb,d):
81 package_tmp = bb.data.expand('${PN}', d) 81 package_tmp = bb.data.expand('${PN}', d)
82 82
83 system_class_blacklist = [ "none" ] 83 system_class_blacklist = [ "none" ]
84 user_class_blacklist = (bb.data.getVar('ICECC_USER_CLASS_BL', d) or "none").split() 84 user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL') or "none").split()
85 package_class_blacklist = system_class_blacklist + user_class_blacklist 85 package_class_blacklist = system_class_blacklist + user_class_blacklist
86 86
87 for black in package_class_blacklist: 87 for black in package_class_blacklist:
@@ -92,7 +92,7 @@ def use_icc(bb,d):
92 #"system" package blacklist contains a list of packages that can not distribute compile tasks 92 #"system" package blacklist contains a list of packages that can not distribute compile tasks
93 #for one reason or the other 93 #for one reason or the other
94 system_package_blacklist = [ "uclibc", "glibc", "gcc", "bind", "u-boot", "dhcp-forwarder", "enchant", "connman", "orbit2" ] 94 system_package_blacklist = [ "uclibc", "glibc", "gcc", "bind", "u-boot", "dhcp-forwarder", "enchant", "connman", "orbit2" ]
95 user_package_blacklist = (bb.data.getVar('ICECC_USER_PACKAGE_BL', d) or "").split() 95 user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL') or "").split()
96 package_blacklist = system_package_blacklist + user_package_blacklist 96 package_blacklist = system_package_blacklist + user_package_blacklist
97 97
98 for black in package_blacklist: 98 for black in package_blacklist:
@@ -100,7 +100,7 @@ def use_icc(bb,d):
100 #bb.note(package_tmp, ' found in blacklist, disable icecc') 100 #bb.note(package_tmp, ' found in blacklist, disable icecc')
101 return "no" 101 return "no"
102 102
103 if bb.data.getVar('PARALLEL_MAKE', d) == "": 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, " ", bb.data.expand('${PV}', d), " has empty PARALLEL_MAKE, disable icecc")
105 return "no" 105 return "no"
106 106
@@ -119,8 +119,8 @@ def icc_version(bb, d):
119 if use_icc(bb, d) == "no": 119 if use_icc(bb, d) == "no":
120 return "" 120 return ""
121 121
122 parallel = bb.data.getVar('ICECC_PARALLEL_MAKE', d) or "" 122 parallel = d.getVar('ICECC_PARALLEL_MAKE') or ""
123 bb.data.setVar("PARALLEL_MAKE", parallel, d) 123 d.setVar("PARALLEL_MAKE", parallel)
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"
@@ -130,7 +130,7 @@ def icc_version(bb, d):
130 prefix = bb.data.expand('${HOST_PREFIX}' , d) 130 prefix = bb.data.expand('${HOST_PREFIX}' , d)
131 distro = bb.data.expand('${DISTRO}', d) 131 distro = bb.data.expand('${DISTRO}', d)
132 target_sys = bb.data.expand('${TARGET_SYS}', d) 132 target_sys = bb.data.expand('${TARGET_SYS}', d)
133 float = bb.data.getVar('TARGET_FPU', d) 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"
diff --git a/meta/classes/image-swab.bbclass b/meta/classes/image-swab.bbclass
index b939ec4..23183b3 100644
--- a/meta/classes/image-swab.bbclass
+++ b/meta/classes/image-swab.bbclass
@@ -51,13 +51,13 @@ python() {
51 # and cross packages which aren't swabber-native or one of its dependencies 51 # and cross packages which aren't swabber-native or one of its dependencies
52 # I have ignored them for now... 52 # I have ignored them for now...
53 if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('nativesdk', d) and not bb.data.inherits_class('cross', d): 53 if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('nativesdk', d) and not bb.data.inherits_class('cross', d):
54 deps = (bb.data.getVarFlag('do_setscene', 'depends', d) 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 bb.data.setVarFlag('do_setscene', 'depends', " ".join(deps), d) 56 bb.data.setVarFlag('do_setscene', 'depends', " ".join(deps), d)
57 logdir = bb.data.expand("${TRACE_LOGDIR}", d) 57 logdir = bb.data.expand("${TRACE_LOGDIR}", d)
58 bb.utils.mkdirhier(logdir) 58 bb.utils.mkdirhier(logdir)
59 else: 59 else:
60 bb.data.setVar('STRACEFUNC', '', d) 60 d.setVar('STRACEFUNC', '')
61} 61}
62 62
63STRACEPID = "${@os.getpid()}" 63STRACEPID = "${@os.getpid()}"
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 14726d2..4642fa6 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -74,17 +74,17 @@ IMAGE_TYPE = ${@base_contains("IMAGE_FSTYPES", "live", "live", "empty", d)}
74inherit image-${IMAGE_TYPE} 74inherit image-${IMAGE_TYPE}
75 75
76python () { 76python () {
77 deps = bb.data.getVarFlag('do_rootfs', 'depends', d) or "" 77 deps = d.getVarFlag('do_rootfs', 'depends') or ""
78 for type in (bb.data.getVar('IMAGE_FSTYPES', d, True) or "").split(): 78 for type in (d.getVar('IMAGE_FSTYPES', True) or "").split():
79 for dep in ((bb.data.getVar('IMAGE_DEPENDS_%s' % type, d) or "").split() or []): 79 for dep in ((d.getVar('IMAGE_DEPENDS_%s' % type) or "").split() or []):
80 deps += " %s:do_populate_sysroot" % dep 80 deps += " %s:do_populate_sysroot" % dep
81 for dep in (bb.data.getVar('EXTRA_IMAGEDEPENDS', d, True) or "").split(): 81 for dep in (d.getVar('EXTRA_IMAGEDEPENDS', True) or "").split():
82 deps += " %s:do_populate_sysroot" % dep 82 deps += " %s:do_populate_sysroot" % dep
83 bb.data.setVarFlag('do_rootfs', 'depends', deps, d) 83 d.setVarFlag('do_rootfs', 'depends', deps)
84 84
85 # If we don't do this we try and run the mapping hooks while parsing which is slow 85 # If we don't do this we try and run the mapping hooks while parsing which is slow
86 # bitbake should really provide something to let us know this... 86 # bitbake should really provide something to let us know this...
87 if bb.data.getVar('BB_WORKERCONTEXT', d, True) is not None: 87 if d.getVar('BB_WORKERCONTEXT', True) is not None:
88 runtime_mapping_rename("PACKAGE_INSTALL", d) 88 runtime_mapping_rename("PACKAGE_INSTALL", d)
89 runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", d) 89 runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", d)
90} 90}
@@ -98,15 +98,15 @@ python () {
98# is searched for in the BBPATH (same as the old version.) 98# is searched for in the BBPATH (same as the old version.)
99# 99#
100def get_devtable_list(d): 100def get_devtable_list(d):
101 devtable = bb.data.getVar('IMAGE_DEVICE_TABLE', d, 1) 101 devtable = d.getVar('IMAGE_DEVICE_TABLE', 1)
102 if devtable != None: 102 if devtable != None:
103 return devtable 103 return devtable
104 str = "" 104 str = ""
105 devtables = bb.data.getVar('IMAGE_DEVICE_TABLES', d, 1) 105 devtables = d.getVar('IMAGE_DEVICE_TABLES', 1)
106 if devtables == None: 106 if devtables == None:
107 devtables = 'files/device_table-minimal.txt' 107 devtables = 'files/device_table-minimal.txt'
108 for devtable in devtables.split(): 108 for devtable in devtables.split():
109 str += " %s" % bb.which(bb.data.getVar('BBPATH', d, 1), devtable) 109 str += " %s" % bb.which(d.getVar('BBPATH', 1), devtable)
110 return str 110 return str
111 111
112IMAGE_CLASSES ?= "image_types" 112IMAGE_CLASSES ?= "image_types"
@@ -119,7 +119,7 @@ ROOTFS_POSTPROCESS_COMMAND ?= ""
119# some default locales 119# some default locales
120IMAGE_LINGUAS ?= "de-de fr-fr en-gb" 120IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
121 121
122LINGUAS_INSTALL = "${@" ".join(map(lambda s: "locale-base-%s" % s, bb.data.getVar('IMAGE_LINGUAS', d, 1).split()))}" 122LINGUAS_INSTALL = "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS', 1).split()))}"
123 123
124do_rootfs[nostamp] = "1" 124do_rootfs[nostamp] = "1"
125do_rootfs[dirs] = "${TOPDIR}" 125do_rootfs[dirs] = "${TOPDIR}"
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 9549a9e3..ea0d9a5 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -1,8 +1,8 @@
1def get_imagecmds(d): 1def get_imagecmds(d):
2 cmds = "\n" 2 cmds = "\n"
3 old_overrides = bb.data.getVar('OVERRIDES', d, 0) 3 old_overrides = d.getVar('OVERRIDES', 0)
4 4
5 types = bb.data.getVar('IMAGE_FSTYPES', d, True).split() 5 types = d.getVar('IMAGE_FSTYPES', True).split()
6 # Live images will be processed via inheriting bbclass and 6 # Live images will be processed via inheriting bbclass and
7 # does not get processed here. 7 # does not get processed here.
8 # live images also depend on ext3 so ensure its present 8 # live images also depend on ext3 so ensure its present
diff --git a/meta/classes/imagetest-qemu.bbclass b/meta/classes/imagetest-qemu.bbclass
index 4ea86c0..de142bc 100644
--- a/meta/classes/imagetest-qemu.bbclass
+++ b/meta/classes/imagetest-qemu.bbclass
@@ -35,12 +35,12 @@ def qemuimagetest_main(d):
35 35
36 casestr = re.compile(r'(?P<scen>\w+\b):(?P<case>\S+$)') 36 casestr = re.compile(r'(?P<scen>\w+\b):(?P<case>\S+$)')
37 resultstr = re.compile(r'\s*(?P<case>\w+)\s*(?P<pass>\d+)\s*(?P<fail>\d+)\s*(?P<noresult>\d+)') 37 resultstr = re.compile(r'\s*(?P<case>\w+)\s*(?P<pass>\d+)\s*(?P<fail>\d+)\s*(?P<noresult>\d+)')
38 machine = bb.data.getVar('MACHINE', d, 1) 38 machine = d.getVar('MACHINE', 1)
39 pname = bb.data.getVar('PN', d, 1) 39 pname = d.getVar('PN', 1)
40 40
41 """function to save test cases running status""" 41 """function to save test cases running status"""
42 def teststatus(test, status, index, length): 42 def teststatus(test, status, index, length):
43 test_status = bb.data.getVar('TEST_STATUS', d, 1) 43 test_status = d.getVar('TEST_STATUS', 1)
44 if not os.path.exists(test_status): 44 if not os.path.exists(test_status):
45 raise bb.build.FuncFailed("No test status file existing under TEST_TMP") 45 raise bb.build.FuncFailed("No test status file existing under TEST_TMP")
46 46
@@ -51,30 +51,30 @@ def qemuimagetest_main(d):
51 51
52 """funtion to run each case under scenario""" 52 """funtion to run each case under scenario"""
53 def runtest(scen, case, fulltestpath): 53 def runtest(scen, case, fulltestpath):
54 resultpath = bb.data.getVar('TEST_RESULT', d, 1) 54 resultpath = d.getVar('TEST_RESULT', 1)
55 tmppath = bb.data.getVar('TEST_TMP', d, 1) 55 tmppath = d.getVar('TEST_TMP', 1)
56 56
57 """initialize log file for testcase""" 57 """initialize log file for testcase"""
58 logpath = bb.data.getVar('TEST_LOG', d, 1) 58 logpath = d.getVar('TEST_LOG', 1)
59 bb.utils.mkdirhier("%s/%s" % (logpath, scen)) 59 bb.utils.mkdirhier("%s/%s" % (logpath, scen))
60 caselog = os.path.join(logpath, "%s/log_%s.%s" % (scen, case, bb.data.getVar('DATETIME', d, 1))) 60 caselog = os.path.join(logpath, "%s/log_%s.%s" % (scen, case, d.getVar('DATETIME', 1)))
61 os.system("touch %s" % caselog) 61 os.system("touch %s" % caselog)
62 62
63 """export TEST_TMP, TEST_RESULT, DEPLOY_DIR and QEMUARCH""" 63 """export TEST_TMP, TEST_RESULT, DEPLOY_DIR and QEMUARCH"""
64 os.environ["PATH"] = bb.data.getVar("PATH", d, True) 64 os.environ["PATH"] = d.getVar("PATH", True)
65 os.environ["TEST_TMP"] = tmppath 65 os.environ["TEST_TMP"] = tmppath
66 os.environ["TEST_RESULT"] = resultpath 66 os.environ["TEST_RESULT"] = resultpath
67 os.environ["DEPLOY_DIR"] = bb.data.getVar("DEPLOY_DIR", d, True) 67 os.environ["DEPLOY_DIR"] = d.getVar("DEPLOY_DIR", True)
68 os.environ["QEMUARCH"] = machine 68 os.environ["QEMUARCH"] = machine
69 os.environ["QEMUTARGET"] = pname 69 os.environ["QEMUTARGET"] = pname
70 os.environ["DISPLAY"] = bb.data.getVar("DISPLAY", d, True) 70 os.environ["DISPLAY"] = d.getVar("DISPLAY", True)
71 os.environ["COREBASE"] = bb.data.getVar("COREBASE", d, True) 71 os.environ["COREBASE"] = d.getVar("COREBASE", True)
72 os.environ["TOPDIR"] = bb.data.getVar("TOPDIR", d, True) 72 os.environ["TOPDIR"] = d.getVar("TOPDIR", True)
73 os.environ["OE_TMPDIR"] = bb.data.getVar("TMPDIR", d, True) 73 os.environ["OE_TMPDIR"] = d.getVar("TMPDIR", True)
74 os.environ["TEST_STATUS"] = bb.data.getVar("TEST_STATUS", d, True) 74 os.environ["TEST_STATUS"] = d.getVar("TEST_STATUS", True)
75 os.environ["TARGET_IPSAVE"] = bb.data.getVar("TARGET_IPSAVE", d, True) 75 os.environ["TARGET_IPSAVE"] = d.getVar("TARGET_IPSAVE", True)
76 os.environ["TEST_SERIALIZE"] = bb.data.getVar("TEST_SERIALIZE", d, True) 76 os.environ["TEST_SERIALIZE"] = d.getVar("TEST_SERIALIZE", True)
77 os.environ["SDK_NAME"] = bb.data.getVar("SDK_NAME", d, True) 77 os.environ["SDK_NAME"] = d.getVar("SDK_NAME", True)
78 78
79 """run Test Case""" 79 """run Test Case"""
80 bb.note("Run %s test in scenario %s" % (case, scen)) 80 bb.note("Run %s test in scenario %s" % (case, scen))
@@ -92,13 +92,13 @@ def qemuimagetest_main(d):
92 if n: 92 if n:
93 item = n.group('scen') 93 item = n.group('scen')
94 casefile = n.group('case') 94 casefile = n.group('case')
95 for dir in bb.data.getVar("QEMUIMAGETESTS", d, True).split(): 95 for dir in d.getVar("QEMUIMAGETESTS", True).split():
96 fulltestcase = os.path.join(dir, item, casefile) 96 fulltestcase = os.path.join(dir, item, casefile)
97 if not os.path.isfile(fulltestcase): 97 if not os.path.isfile(fulltestcase):
98 raise bb.build.FuncFailed("Testcase %s not found" % fulltestcase) 98 raise bb.build.FuncFailed("Testcase %s not found" % fulltestcase)
99 list.append((item, casefile, fulltestcase)) 99 list.append((item, casefile, fulltestcase))
100 else: 100 else:
101 for dir in bb.data.getVar("QEMUIMAGETESTS", d, True).split(): 101 for dir in d.getVar("QEMUIMAGETESTS", True).split():
102 scenlist = os.path.join(dir, "scenario", machine, pname) 102 scenlist = os.path.join(dir, "scenario", machine, pname)
103 if not os.path.isfile(scenlist): 103 if not os.path.isfile(scenlist):
104 raise bb.build.FuncFailed("No scenario list file named %s found" % scenlist) 104 raise bb.build.FuncFailed("No scenario list file named %s found" % scenlist)
@@ -118,7 +118,7 @@ def qemuimagetest_main(d):
118 118
119 """Clean tmp folder for testing""" 119 """Clean tmp folder for testing"""
120 def clean_tmp(): 120 def clean_tmp():
121 tmppath = bb.data.getVar('TEST_TMP', d, 1) 121 tmppath = d.getVar('TEST_TMP', 1)
122 122
123 if os.path.isdir(tmppath): 123 if os.path.isdir(tmppath):
124 for f in os.listdir(tmppath): 124 for f in os.listdir(tmppath):
@@ -132,28 +132,28 @@ def qemuimagetest_main(d):
132 clean_tmp() 132 clean_tmp()
133 133
134 """check testcase folder and create test log folder""" 134 """check testcase folder and create test log folder"""
135 testpath = bb.data.getVar('TEST_DIR', d, 1) 135 testpath = d.getVar('TEST_DIR', 1)
136 bb.utils.mkdirhier(testpath) 136 bb.utils.mkdirhier(testpath)
137 137
138 logpath = bb.data.getVar('TEST_LOG', d, 1) 138 logpath = d.getVar('TEST_LOG', 1)
139 bb.utils.mkdirhier(logpath) 139 bb.utils.mkdirhier(logpath)
140 140
141 tmppath = bb.data.getVar('TEST_TMP', d, 1) 141 tmppath = d.getVar('TEST_TMP', 1)
142 bb.utils.mkdirhier(tmppath) 142 bb.utils.mkdirhier(tmppath)
143 143
144 """initialize test status file""" 144 """initialize test status file"""
145 test_status = bb.data.getVar('TEST_STATUS', d, 1) 145 test_status = d.getVar('TEST_STATUS', 1)
146 if os.path.exists(test_status): 146 if os.path.exists(test_status):
147 os.remove(test_status) 147 os.remove(test_status)
148 os.system("touch %s" % test_status) 148 os.system("touch %s" % test_status)
149 149
150 """initialize result file""" 150 """initialize result file"""
151 resultpath = bb.data.getVar('TEST_RESULT', d, 1) 151 resultpath = d.getVar('TEST_RESULT', 1)
152 bb.utils.mkdirhier(resultpath) 152 bb.utils.mkdirhier(resultpath)
153 resultfile = os.path.join(resultpath, "testresult.%s" % bb.data.getVar('DATETIME', d, 1)) 153 resultfile = os.path.join(resultpath, "testresult.%s" % d.getVar('DATETIME', 1))
154 sresultfile = os.path.join(resultpath, "testresult.log") 154 sresultfile = os.path.join(resultpath, "testresult.log")
155 155
156 machine = bb.data.getVar('MACHINE', d, 1) 156 machine = d.getVar('MACHINE', 1)
157 157
158 if os.path.exists(sresultfile): 158 if os.path.exists(sresultfile):
159 os.remove(sresultfile) 159 os.remove(sresultfile)
@@ -165,7 +165,7 @@ def qemuimagetest_main(d):
165 f.close() 165 f.close()
166 166
167 """generate pre-defined testcase list""" 167 """generate pre-defined testcase list"""
168 testlist = bb.data.getVar('TEST_SCEN', d, 1) 168 testlist = d.getVar('TEST_SCEN', 1)
169 fulllist = generate_list(testlist) 169 fulllist = generate_list(testlist)
170 170
171 """Begin testing""" 171 """Begin testing"""
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 017f7be..a65f3ee 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -105,7 +105,7 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms"
105 105
106def package_qa_clean_path(path,d): 106def package_qa_clean_path(path,d):
107 """ Remove the common prefix from the path. In this case it is the TMPDIR""" 107 """ Remove the common prefix from the path. In this case it is the TMPDIR"""
108 return path.replace(bb.data.getVar('TMPDIR',d,True),"") 108 return path.replace(d.getVar('TMPDIR',True),"")
109 109
110def package_qa_write_error(error, d): 110def package_qa_write_error(error, d):
111 logfile = d.getVar('QA_LOGFILE', True) 111 logfile = d.getVar('QA_LOGFILE', True)
@@ -132,13 +132,13 @@ def package_qa_check_rpath(file,name, d, elf, messages):
132 if not elf: 132 if not elf:
133 return 133 return
134 134
135 scanelf = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'scanelf') 135 scanelf = os.path.join(d.getVar('STAGING_BINDIR_NATIVE',True),'scanelf')
136 bad_dirs = [bb.data.getVar('TMPDIR', d, True) + "/work", bb.data.getVar('STAGING_DIR_TARGET', d, True)] 136 bad_dirs = [d.getVar('TMPDIR', True) + "/work", d.getVar('STAGING_DIR_TARGET', True)]
137 bad_dir_test = bb.data.getVar('TMPDIR', d, True) 137 bad_dir_test = d.getVar('TMPDIR', True)
138 if not os.path.exists(scanelf): 138 if not os.path.exists(scanelf):
139 bb.fatal("Can not check RPATH, scanelf (part of pax-utils-native) not found") 139 bb.fatal("Can not check RPATH, scanelf (part of pax-utils-native) not found")
140 140
141 if not bad_dirs[0] in bb.data.getVar('WORKDIR', d, True): 141 if not bad_dirs[0] in d.getVar('WORKDIR', True):
142 bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") 142 bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check")
143 143
144 output = os.popen("%s -B -F%%r#F '%s'" % (scanelf,file)) 144 output = os.popen("%s -B -F%%r#F '%s'" % (scanelf,file))
@@ -156,11 +156,11 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages):
156 if not elf: 156 if not elf:
157 return 157 return
158 158
159 objdump = bb.data.getVar('OBJDUMP', d, True) 159 objdump = d.getVar('OBJDUMP', True)
160 env_path = bb.data.getVar('PATH', d, True) 160 env_path = d.getVar('PATH', True)
161 161
162 libdir = bb.data.getVar("libdir", d, True) 162 libdir = d.getVar("libdir", True)
163 base_libdir = bb.data.getVar("base_libdir", d, True) 163 base_libdir = d.getVar("base_libdir", True)
164 164
165 import re 165 import re
166 rpath_re = re.compile("\s+RPATH\s+(.*)") 166 rpath_re = re.compile("\s+RPATH\s+(.*)")
@@ -209,8 +209,8 @@ def package_qa_check_arch(path,name,d, elf, messages):
209 if not elf: 209 if not elf:
210 return 210 return
211 211
212 target_os = bb.data.getVar('TARGET_OS', d, True) 212 target_os = d.getVar('TARGET_OS', True)
213 target_arch = bb.data.getVar('TARGET_ARCH', d, True) 213 target_arch = d.getVar('TARGET_ARCH', True)
214 214
215 # FIXME: Cross package confuse this check, so just skip them 215 # FIXME: Cross package confuse this check, so just skip them
216 for s in ['cross', 'nativesdk', 'cross-canadian']: 216 for s in ['cross', 'nativesdk', 'cross-canadian']:
@@ -243,7 +243,7 @@ def package_qa_check_desktop(path, name, d, elf, messages):
243 Run all desktop files through desktop-file-validate. 243 Run all desktop files through desktop-file-validate.
244 """ 244 """
245 if path.endswith(".desktop"): 245 if path.endswith(".desktop"):
246 desktop_file_validate = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'desktop-file-validate') 246 desktop_file_validate = os.path.join(d.getVar('STAGING_BINDIR_NATIVE',True),'desktop-file-validate')
247 output = os.popen("%s %s" % (desktop_file_validate, path)) 247 output = os.popen("%s %s" % (desktop_file_validate, path))
248 # This only produces output on errors 248 # This only produces output on errors
249 for l in output: 249 for l in output:
@@ -261,14 +261,14 @@ def package_qa_hash_style(path, name, d, elf, messages):
261 if os.path.islink(path): 261 if os.path.islink(path):
262 return 262 return
263 263
264 gnu_hash = "--hash-style=gnu" in bb.data.getVar('LDFLAGS', d, True) 264 gnu_hash = "--hash-style=gnu" in d.getVar('LDFLAGS', True)
265 if not gnu_hash: 265 if not gnu_hash:
266 gnu_hash = "--hash-style=both" in bb.data.getVar('LDFLAGS', d, True) 266 gnu_hash = "--hash-style=both" in d.getVar('LDFLAGS', True)
267 if not gnu_hash: 267 if not gnu_hash:
268 return 268 return
269 269
270 objdump = bb.data.getVar('OBJDUMP', d, True) 270 objdump = d.getVar('OBJDUMP', True)
271 env_path = bb.data.getVar('PATH', d, True) 271 env_path = d.getVar('PATH', True)
272 272
273 sane = False 273 sane = False
274 has_syms = False 274 has_syms = False
@@ -299,7 +299,7 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
299 if os.path.islink(path): 299 if os.path.islink(path):
300 return 300 return
301 301
302 tmpdir = bb.data.getVar('TMPDIR', d, True) 302 tmpdir = d.getVar('TMPDIR', True)
303 file_content = open(path).read() 303 file_content = open(path).read()
304 if tmpdir in file_content: 304 if tmpdir in file_content:
305 messages.append("File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d)) 305 messages.append("File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d))
@@ -311,9 +311,9 @@ def package_qa_check_license(workdir, d):
311 import tempfile 311 import tempfile
312 sane = True 312 sane = True
313 313
314 lic_files = bb.data.getVar('LIC_FILES_CHKSUM', d, True) 314 lic_files = d.getVar('LIC_FILES_CHKSUM', True)
315 lic = bb.data.getVar('LICENSE', d, True) 315 lic = d.getVar('LICENSE', True)
316 pn = bb.data.getVar('PN', d, True) 316 pn = d.getVar('PN', True)
317 317
318 if lic == "CLOSED": 318 if lic == "CLOSED":
319 return True 319 return True
@@ -324,7 +324,7 @@ def package_qa_check_license(workdir, d):
324 bb.error(pn + ": Recipe file does not have license file information (LIC_FILES_CHKSUM)") 324 bb.error(pn + ": Recipe file does not have license file information (LIC_FILES_CHKSUM)")
325 return False 325 return False
326 326
327 srcdir = bb.data.getVar('S', d, True) 327 srcdir = d.getVar('S', True)
328 328
329 for url in lic_files.split(): 329 for url in lic_files.split():
330 (type, host, path, user, pswd, parm) = bb.decodeurl(url) 330 (type, host, path, user, pswd, parm) = bb.decodeurl(url)
@@ -384,7 +384,7 @@ def package_qa_check_staged(path,d):
384 """ 384 """
385 385
386 sane = True 386 sane = True
387 tmpdir = bb.data.getVar('TMPDIR', d, True) 387 tmpdir = d.getVar('TMPDIR', True)
388 workdir = os.path.join(tmpdir, "work") 388 workdir = os.path.join(tmpdir, "work")
389 389
390 installed = "installed=yes" 390 installed = "installed=yes"
@@ -417,8 +417,8 @@ def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d):
417 import oe.qa 417 import oe.qa
418 418
419 #if this will throw an exception, then fix the dict above 419 #if this will throw an exception, then fix the dict above
420 target_os = bb.data.getVar('TARGET_OS', d, True) 420 target_os = d.getVar('TARGET_OS', True)
421 target_arch = bb.data.getVar('TARGET_ARCH', d, True) 421 target_arch = d.getVar('TARGET_ARCH', True)
422 422
423 warnings = [] 423 warnings = []
424 errors = [] 424 errors = []
@@ -457,19 +457,19 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, d):
457 localdata = bb.data.createCopy(d) 457 localdata = bb.data.createCopy(d)
458 root = "%s/%s" % (pkgdest, pkg) 458 root = "%s/%s" % (pkgdest, pkg)
459 459
460 bb.data.setVar('ROOT', '', localdata) 460 localdata.setVar('ROOT', '')
461 bb.data.setVar('ROOT_%s' % pkg, root, localdata) 461 localdata.setVar('ROOT_%s' % pkg, root)
462 pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, True) 462 pkgname = localdata.getVar('PKG_%s' % pkg, True)
463 if not pkgname: 463 if not pkgname:
464 pkgname = pkg 464 pkgname = pkg
465 bb.data.setVar('PKG', pkgname, localdata) 465 localdata.setVar('PKG', pkgname)
466 466
467 bb.data.setVar('OVERRIDES', pkg, localdata) 467 localdata.setVar('OVERRIDES', pkg)
468 468
469 bb.data.update_data(localdata) 469 bb.data.update_data(localdata)
470 470
471 # Now check the RDEPENDS 471 # Now check the RDEPENDS
472 rdepends = bb.utils.explode_deps(bb.data.getVar('RDEPENDS', localdata, True) or "") 472 rdepends = bb.utils.explode_deps(localdata.getVar('RDEPENDS', True) or "")
473 473
474 474
475 # Now do the sanity check!!! 475 # Now do the sanity check!!!
@@ -487,8 +487,8 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, d):
487python do_package_qa () { 487python do_package_qa () {
488 bb.note("DO PACKAGE QA") 488 bb.note("DO PACKAGE QA")
489 489
490 logdir = bb.data.getVar('T', d, True) 490 logdir = d.getVar('T', True)
491 pkg = bb.data.getVar('PN', d, True) 491 pkg = d.getVar('PN', True)
492 492
493 # Check the compile log for host contamination 493 # Check the compile log for host contamination
494 compilelog = os.path.join(logdir,"log.do_compile") 494 compilelog = os.path.join(logdir,"log.do_compile")
@@ -508,8 +508,8 @@ python do_package_qa () {
508 (pkg, installlog)) 508 (pkg, installlog))
509 509
510 # Scan the packages... 510 # Scan the packages...
511 pkgdest = bb.data.getVar('PKGDEST', d, True) 511 pkgdest = d.getVar('PKGDEST', True)
512 packages = bb.data.getVar('PACKAGES',d, True) 512 packages = d.getVar('PACKAGES', True)
513 513
514 # no packages should be scanned 514 # no packages should be scanned
515 if not packages: 515 if not packages:
@@ -521,7 +521,7 @@ python do_package_qa () {
521 walk_sane = True 521 walk_sane = True
522 rdepends_sane = True 522 rdepends_sane = True
523 for package in packages.split(): 523 for package in packages.split():
524 skip = (bb.data.getVar('INSANE_SKIP_' + package, d, True) or "").split() 524 skip = (d.getVar('INSANE_SKIP_' + package, True) or "").split()
525 if skip: 525 if skip:
526 bb.note("Package %s skipping QA tests: %s" % (package, str(skip))) 526 bb.note("Package %s skipping QA tests: %s" % (package, str(skip)))
527 warnchecks = [] 527 warnchecks = []
@@ -560,7 +560,7 @@ python do_qa_staging() {
560 560
561python do_qa_configure() { 561python do_qa_configure() {
562 configs = [] 562 configs = []
563 workdir = bb.data.getVar('WORKDIR', d, True) 563 workdir = d.getVar('WORKDIR', True)
564 bb.note("Checking autotools environment for common misconfiguration") 564 bb.note("Checking autotools environment for common misconfiguration")
565 for root, dirs, files in os.walk(workdir): 565 for root, dirs, files in os.walk(workdir):
566 statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % \ 566 statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % \
@@ -575,8 +575,8 @@ Rerun configure task after fixing this. The path was '%s'""" % root)
575 if "configure.in" in files: 575 if "configure.in" in files:
576 configs.append(os.path.join(root, "configure.in")) 576 configs.append(os.path.join(root, "configure.in"))
577 577
578 cnf = bb.data.getVar('EXTRA_OECONF', d, True) or "" 578 cnf = d.getVar('EXTRA_OECONF', True) or ""
579 if "gettext" not in bb.data.getVar('P', d, True) and "gcc-runtime" not in bb.data.getVar('P', d, True) and "--disable-nls" not in cnf: 579 if "gettext" not in d.getVar('P', True) and "gcc-runtime" not in d.getVar('P', True) and "--disable-nls" not in cnf:
580 ml = d.getVar("MLPREFIX", True) or "" 580 ml = d.getVar("MLPREFIX", True) or ""
581 if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('nativesdk', d): 581 if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('nativesdk', d):
582 gt = "gettext-native" 582 gt = "gettext-native"
@@ -584,7 +584,7 @@ Rerun configure task after fixing this. The path was '%s'""" % root)
584 gt = "gettext-nativesdk" 584 gt = "gettext-nativesdk"
585 else: 585 else:
586 gt = "virtual/" + ml + "gettext" 586 gt = "virtual/" + ml + "gettext"
587 deps = bb.utils.explode_deps(bb.data.getVar('DEPENDS', d, True) or "") 587 deps = bb.utils.explode_deps(d.getVar('DEPENDS', True) or "")
588 if gt not in deps: 588 if gt not in deps:
589 for config in configs: 589 for config in configs:
590 gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % config 590 gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % config
diff --git a/meta/classes/kernel-arch.bbclass b/meta/classes/kernel-arch.bbclass
index 225d599..8693395 100644
--- a/meta/classes/kernel-arch.bbclass
+++ b/meta/classes/kernel-arch.bbclass
@@ -18,7 +18,7 @@ valid_archs = "alpha cris ia64 \
18def map_kernel_arch(a, d): 18def map_kernel_arch(a, d):
19 import re 19 import re
20 20
21 valid_archs = bb.data.getVar('valid_archs', d, 1).split() 21 valid_archs = d.getVar('valid_archs', 1).split()
22 22
23 if re.match('(i.86|athlon|x86.64)$', a): return 'x86' 23 if re.match('(i.86|athlon|x86.64)$', a): return 'x86'
24 elif re.match('arm26$', a): return 'arm26' 24 elif re.match('arm26$', a): return 'arm26'
@@ -32,7 +32,7 @@ def map_kernel_arch(a, d):
32 else: 32 else:
33 bb.error("cannot map '%s' to a linux kernel architecture" % a) 33 bb.error("cannot map '%s' to a linux kernel architecture" % a)
34 34
35export ARCH = "${@map_kernel_arch(bb.data.getVar('TARGET_ARCH', d, 1), d)}" 35export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH', 1), d)}"
36 36
37def map_uboot_arch(a, d): 37def map_uboot_arch(a, d):
38 import re 38 import re
@@ -41,5 +41,5 @@ def map_uboot_arch(a, d):
41 elif re.match('i.86$', a): return 'x86' 41 elif re.match('i.86$', a): return 'x86'
42 return a 42 return a
43 43
44export UBOOT_ARCH = "${@map_uboot_arch(bb.data.getVar('ARCH', d, 1), d)}" 44export UBOOT_ARCH = "${@map_uboot_arch(d.getVar('ARCH', 1), d)}"
45 45
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 2205686..d555fc0 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -104,7 +104,7 @@ python do_kernel_configcheck() {
104 104
105 bb.plain("NOTE: validating kernel configuration") 105 bb.plain("NOTE: validating kernel configuration")
106 106
107 pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True) 107 pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
108 cmd = bb.data.expand("cd ${B}/..; kconf_check -config- ${B} ${S} ${B} ${KBRANCH}",d ) 108 cmd = bb.data.expand("cd ${B}/..; kconf_check -config- ${B} ${S} ${B} ${KBRANCH}",d )
109 ret, result = commands.getstatusoutput("%s%s" % (pathprefix, cmd)) 109 ret, result = commands.getstatusoutput("%s%s" % (pathprefix, cmd))
110 110
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index dc711f2..12e0b83 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -11,15 +11,15 @@ INITRAMFS_IMAGE ?= ""
11INITRAMFS_TASK ?= "" 11INITRAMFS_TASK ?= ""
12 12
13python __anonymous () { 13python __anonymous () {
14 kerneltype = bb.data.getVar('KERNEL_IMAGETYPE', d, 1) or '' 14 kerneltype = d.getVar('KERNEL_IMAGETYPE', 1) or ''
15 if kerneltype == 'uImage': 15 if kerneltype == 'uImage':
16 depends = bb.data.getVar("DEPENDS", d, 1) 16 depends = d.getVar("DEPENDS", 1)
17 depends = "%s u-boot-mkimage-native" % depends 17 depends = "%s u-boot-mkimage-native" % depends
18 bb.data.setVar("DEPENDS", depends, d) 18 d.setVar("DEPENDS", depends)
19 19
20 image = bb.data.getVar('INITRAMFS_IMAGE', d, True) 20 image = d.getVar('INITRAMFS_IMAGE', True)
21 if image: 21 if image:
22 bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d) 22 d.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs')
23} 23}
24 24
25inherit kernel-arch deploy 25inherit kernel-arch deploy
@@ -31,7 +31,7 @@ PACKAGES_DYNAMIC += "kernel-firmware-*"
31export OS = "${TARGET_OS}" 31export OS = "${TARGET_OS}"
32export CROSS_COMPILE = "${TARGET_PREFIX}" 32export CROSS_COMPILE = "${TARGET_PREFIX}"
33 33
34KERNEL_PRIORITY = "${@bb.data.getVar('PV',d,1).split('-')[0].split('.')[-1]}" 34KERNEL_PRIORITY = "${@d.getVar('PV',1).split('-')[0].split('.')[-1]}"
35 35
36KERNEL_RELEASE ?= "${KERNEL_VERSION}" 36KERNEL_RELEASE ?= "${KERNEL_VERSION}"
37 37
@@ -56,7 +56,7 @@ KERNEL_IMAGEDEST = "boot"
56# 56#
57# configuration 57# configuration
58# 58#
59export CMDLINE_CONSOLE = "console=${@bb.data.getVar("KERNEL_CONSOLE",d,1) or "ttyS0"}" 59export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}"
60 60
61KERNEL_VERSION = "${@get_kernelversion('${B}')}" 61KERNEL_VERSION = "${@get_kernelversion('${B}')}"
62 62
@@ -75,7 +75,7 @@ EXTRA_OEMAKE = ""
75 75
76KERNEL_ALT_IMAGETYPE ??= "" 76KERNEL_ALT_IMAGETYPE ??= ""
77 77
78KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(bb.data.getVar('KERNEL_IMAGETYPE', d, 1))}" 78KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', 1))}"
79 79
80kernel_do_compile() { 80kernel_do_compile() {
81 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE 81 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
@@ -306,10 +306,10 @@ module_conf_rfcomm = "alias bt-proto-3 rfcomm"
306python populate_packages_prepend () { 306python populate_packages_prepend () {
307 def extract_modinfo(file): 307 def extract_modinfo(file):
308 import tempfile, re 308 import tempfile, re
309 tempfile.tempdir = bb.data.getVar("WORKDIR", d, 1) 309 tempfile.tempdir = d.getVar("WORKDIR", 1)
310 tf = tempfile.mkstemp() 310 tf = tempfile.mkstemp()
311 tmpfile = tf[1] 311 tmpfile = tf[1]
312 cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (bb.data.getVar("PATH", d, 1), bb.data.getVar("HOST_PREFIX", d, 1) or "", file, tmpfile) 312 cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("PATH", 1), d.getVar("HOST_PREFIX", 1) or "", file, tmpfile)
313 os.system(cmd) 313 os.system(cmd)
314 f = open(tmpfile) 314 f = open(tmpfile)
315 l = f.read().split("\000") 315 l = f.read().split("\000")
@@ -328,18 +328,18 @@ python populate_packages_prepend () {
328 def parse_depmod(): 328 def parse_depmod():
329 import re 329 import re
330 330
331 dvar = bb.data.getVar('PKGD', d, 1) 331 dvar = d.getVar('PKGD', 1)
332 if not dvar: 332 if not dvar:
333 bb.error("PKGD not defined") 333 bb.error("PKGD not defined")
334 return 334 return
335 335
336 kernelver = bb.data.getVar('KERNEL_VERSION', d, 1) 336 kernelver = d.getVar('KERNEL_VERSION', 1)
337 kernelver_stripped = kernelver 337 kernelver_stripped = kernelver
338 m = re.match('^(.*-hh.*)[\.\+].*$', kernelver) 338 m = re.match('^(.*-hh.*)[\.\+].*$', kernelver)
339 if m: 339 if m:
340 kernelver_stripped = m.group(1) 340 kernelver_stripped = m.group(1)
341 path = bb.data.getVar("PATH", d, 1) 341 path = d.getVar("PATH", 1)
342 host_prefix = bb.data.getVar("HOST_PREFIX", d, 1) or "" 342 host_prefix = d.getVar("HOST_PREFIX", 1) or ""
343 343
344 cmd = "PATH=\"%s\" %sdepmod -n -a -r -b %s -F %s/boot/System.map-%s %s" % (path, host_prefix, dvar, dvar, kernelver, kernelver_stripped) 344 cmd = "PATH=\"%s\" %sdepmod -n -a -r -b %s -F %s/boot/System.map-%s %s" % (path, host_prefix, dvar, dvar, kernelver, kernelver_stripped)
345 f = os.popen(cmd, 'r') 345 f = os.popen(cmd, 'r')
@@ -377,9 +377,9 @@ python populate_packages_prepend () {
377 377
378 def get_dependencies(file, pattern, format): 378 def get_dependencies(file, pattern, format):
379 # file no longer includes PKGD 379 # file no longer includes PKGD
380 file = file.replace(bb.data.getVar('PKGD', d, 1) or '', '', 1) 380 file = file.replace(d.getVar('PKGD', 1) or '', '', 1)
381 # instead is prefixed with /lib/modules/${KERNEL_VERSION} 381 # instead is prefixed with /lib/modules/${KERNEL_VERSION}
382 file = file.replace("/lib/modules/%s/" % bb.data.getVar('KERNEL_VERSION', d, 1) or '', '', 1) 382 file = file.replace("/lib/modules/%s/" % d.getVar('KERNEL_VERSION', 1) or '', '', 1)
383 383
384 if module_deps.has_key(file): 384 if module_deps.has_key(file):
385 import re 385 import re
@@ -398,40 +398,40 @@ python populate_packages_prepend () {
398 import re 398 import re
399 vals = extract_modinfo(file) 399 vals = extract_modinfo(file)
400 400
401 dvar = bb.data.getVar('PKGD', d, 1) 401 dvar = d.getVar('PKGD', 1)
402 402
403 # If autoloading is requested, output /etc/modutils/<name> and append 403 # If autoloading is requested, output /etc/modutils/<name> and append
404 # appropriate modprobe commands to the postinst 404 # appropriate modprobe commands to the postinst
405 autoload = bb.data.getVar('module_autoload_%s' % basename, d, 1) 405 autoload = d.getVar('module_autoload_%s' % basename, 1)
406 if autoload: 406 if autoload:
407 name = '%s/etc/modutils/%s' % (dvar, basename) 407 name = '%s/etc/modutils/%s' % (dvar, basename)
408 f = open(name, 'w') 408 f = open(name, 'w')
409 for m in autoload.split(): 409 for m in autoload.split():
410 f.write('%s\n' % m) 410 f.write('%s\n' % m)
411 f.close() 411 f.close()
412 postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) 412 postinst = d.getVar('pkg_postinst_%s' % pkg, 1)
413 if not postinst: 413 if not postinst:
414 bb.fatal("pkg_postinst_%s not defined" % pkg) 414 bb.fatal("pkg_postinst_%s not defined" % pkg)
415 postinst += bb.data.getVar('autoload_postinst_fragment', d, 1) % autoload 415 postinst += d.getVar('autoload_postinst_fragment', 1) % autoload
416 bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) 416 d.setVar('pkg_postinst_%s' % pkg, postinst)
417 417
418 # Write out any modconf fragment 418 # Write out any modconf fragment
419 modconf = bb.data.getVar('module_conf_%s' % basename, d, 1) 419 modconf = d.getVar('module_conf_%s' % basename, 1)
420 if modconf: 420 if modconf:
421 name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename) 421 name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename)
422 f = open(name, 'w') 422 f = open(name, 'w')
423 f.write("%s\n" % modconf) 423 f.write("%s\n" % modconf)
424 f.close() 424 f.close()
425 425
426 files = bb.data.getVar('FILES_%s' % pkg, d, 1) 426 files = d.getVar('FILES_%s' % pkg, 1)
427 files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename) 427 files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename)
428 bb.data.setVar('FILES_%s' % pkg, files, d) 428 d.setVar('FILES_%s' % pkg, files)
429 429
430 if vals.has_key("description"): 430 if vals.has_key("description"):
431 old_desc = bb.data.getVar('DESCRIPTION_' + pkg, d, 1) or "" 431 old_desc = d.getVar('DESCRIPTION_' + pkg, 1) or ""
432 bb.data.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"], d) 432 d.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"])
433 433
434 rdepends_str = bb.data.getVar('RDEPENDS_' + pkg, d, 1) 434 rdepends_str = d.getVar('RDEPENDS_' + pkg, 1)
435 if rdepends_str: 435 if rdepends_str:
436 rdepends = rdepends_str.split() 436 rdepends = rdepends_str.split()
437 else: 437 else:
@@ -443,29 +443,29 @@ python populate_packages_prepend () {
443 module_regex = '^(.*)\.k?o$' 443 module_regex = '^(.*)\.k?o$'
444 module_pattern = 'kernel-module-%s' 444 module_pattern = 'kernel-module-%s'
445 445
446 postinst = bb.data.getVar('pkg_postinst_modules', d, 1) 446 postinst = d.getVar('pkg_postinst_modules', 1)
447 postrm = bb.data.getVar('pkg_postrm_modules', d, 1) 447 postrm = d.getVar('pkg_postrm_modules', 1)
448 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') 448 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
449 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') 449 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
450 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') 450 do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
451 do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules kernel-%s' % bb.data.getVar("KERNEL_VERSION", d, 1)) 451 do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules kernel-%s' % d.getVar("KERNEL_VERSION", 1))
452 452
453 import re 453 import re
454 metapkg = "kernel-modules" 454 metapkg = "kernel-modules"
455 bb.data.setVar('ALLOW_EMPTY_' + metapkg, "1", d) 455 d.setVar('ALLOW_EMPTY_' + metapkg, "1")
456 bb.data.setVar('FILES_' + metapkg, "", d) 456 d.setVar('FILES_' + metapkg, "")
457 blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'perf', 'perf-dbg', 'kernel-misc' ] 457 blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'perf', 'perf-dbg', 'kernel-misc' ]
458 for l in module_deps.values(): 458 for l in module_deps.values():
459 for i in l: 459 for i in l:
460 pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1)) 460 pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1))
461 blacklist.append(pkg) 461 blacklist.append(pkg)
462 metapkg_rdepends = [] 462 metapkg_rdepends = []
463 packages = bb.data.getVar('PACKAGES', d, 1).split() 463 packages = d.getVar('PACKAGES', 1).split()
464 for pkg in packages[1:]: 464 for pkg in packages[1:]:
465 if not pkg in blacklist and not pkg in metapkg_rdepends: 465 if not pkg in blacklist and not pkg in metapkg_rdepends:
466 metapkg_rdepends.append(pkg) 466 metapkg_rdepends.append(pkg)
467 bb.data.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends), d) 467 bb.data.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends), d)
468 bb.data.setVar('DESCRIPTION_' + metapkg, 'Kernel modules meta package', d) 468 d.setVar('DESCRIPTION_' + metapkg, 'Kernel modules meta package')
469 packages.append(metapkg) 469 packages.append(metapkg)
470 bb.data.setVar('PACKAGES', ' '.join(packages), d) 470 bb.data.setVar('PACKAGES', ' '.join(packages), d)
471} 471}
diff --git a/meta/classes/libc-common.bbclass b/meta/classes/libc-common.bbclass
index 0ee9a55..ec33762 100644
--- a/meta/classes/libc-common.bbclass
+++ b/meta/classes/libc-common.bbclass
@@ -18,13 +18,13 @@ do_install() {
18} 18}
19 19
20def get_libc_fpu_setting(bb, d): 20def get_libc_fpu_setting(bb, d):
21 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: 21 if d.getVar('TARGET_FPU', 1) in [ 'soft' ]:
22 return "--without-fp" 22 return "--without-fp"
23 return "" 23 return ""
24 24
25python populate_packages_prepend () { 25python populate_packages_prepend () {
26 if bb.data.getVar('DEBIAN_NAMES', d, 1): 26 if d.getVar('DEBIAN_NAMES', 1):
27 bpn = bb.data.getVar('BPN', d, 1) 27 bpn = d.getVar('BPN', 1)
28 bb.data.setVar('PKG_'+bpn, 'libc6', d) 28 d.setVar('PKG_'+bpn, 'libc6')
29 bb.data.setVar('PKG_'+bpn+'-dev', 'libc6-dev', d) 29 d.setVar('PKG_'+bpn+'-dev', 'libc6-dev')
30} 30}
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index 6ef2f97..fc1a579 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -10,7 +10,7 @@
10GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "ondevice" 10GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "ondevice"
11 11
12python __anonymous () { 12python __anonymous () {
13 enabled = bb.data.getVar("ENABLE_BINARY_LOCALE_GENERATION", d, 1) 13 enabled = d.getVar("ENABLE_BINARY_LOCALE_GENERATION", 1)
14 14
15 pn = d.getVar("PN", True) 15 pn = d.getVar("PN", True)
16 if pn.endswith("-initial"): 16 if pn.endswith("-initial"):
@@ -19,21 +19,21 @@ python __anonymous () {
19 if enabled and int(enabled): 19 if enabled and int(enabled):
20 import re 20 import re
21 21
22 target_arch = bb.data.getVar("TARGET_ARCH", d, 1) 22 target_arch = d.getVar("TARGET_ARCH", 1)
23 binary_arches = bb.data.getVar("BINARY_LOCALE_ARCHES", d, 1) or "" 23 binary_arches = d.getVar("BINARY_LOCALE_ARCHES", 1) or ""
24 use_cross_localedef = bb.data.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF", d, 1) or "" 24 use_cross_localedef = d.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF", 1) or ""
25 25
26 for regexp in binary_arches.split(" "): 26 for regexp in binary_arches.split(" "):
27 r = re.compile(regexp) 27 r = re.compile(regexp)
28 28
29 if r.match(target_arch): 29 if r.match(target_arch):
30 depends = bb.data.getVar("DEPENDS", d, 1) 30 depends = d.getVar("DEPENDS", 1)
31 if use_cross_localedef == "1" : 31 if use_cross_localedef == "1" :
32 depends = "%s cross-localedef-native" % depends 32 depends = "%s cross-localedef-native" % depends
33 else: 33 else:
34 depends = "%s qemu-native" % depends 34 depends = "%s qemu-native" % depends
35 bb.data.setVar("DEPENDS", depends, d) 35 d.setVar("DEPENDS", depends)
36 bb.data.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile", d) 36 d.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile")
37 break 37 break
38} 38}
39 39
@@ -109,19 +109,19 @@ inherit qemu
109 109
110python package_do_split_gconvs () { 110python package_do_split_gconvs () {
111 import os, re 111 import os, re
112 if (bb.data.getVar('PACKAGE_NO_GCONV', d, 1) == '1'): 112 if (d.getVar('PACKAGE_NO_GCONV', 1) == '1'):
113 bb.note("package requested not splitting gconvs") 113 bb.note("package requested not splitting gconvs")
114 return 114 return
115 115
116 if not bb.data.getVar('PACKAGES', d, 1): 116 if not d.getVar('PACKAGES', 1):
117 return 117 return
118 118
119 bpn = bb.data.getVar('BPN', d, 1) 119 bpn = d.getVar('BPN', 1)
120 libdir = bb.data.getVar('libdir', d, 1) 120 libdir = d.getVar('libdir', 1)
121 if not libdir: 121 if not libdir:
122 bb.error("libdir not defined") 122 bb.error("libdir not defined")
123 return 123 return
124 datadir = bb.data.getVar('datadir', d, 1) 124 datadir = d.getVar('datadir', 1)
125 if not datadir: 125 if not datadir:
126 bb.error("datadir not defined") 126 bb.error("datadir not defined")
127 return 127 return
@@ -191,17 +191,17 @@ python package_do_split_gconvs () {
191 191
192 do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern=bpn+'-localedata-%s', \ 192 do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern=bpn+'-localedata-%s', \
193 description='locale definition for %s', hook=calc_locale_deps, extra_depends='') 193 description='locale definition for %s', hook=calc_locale_deps, extra_depends='')
194 bb.data.setVar('PACKAGES', bb.data.getVar('PACKAGES', d) + ' ' + bb.data.getVar('MLPREFIX', d) + bpn + '-gconv', d) 194 bb.data.setVar('PACKAGES', d.getVar('PACKAGES') + ' ' + d.getVar('MLPREFIX') + bpn + '-gconv', d)
195 195
196 use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1) 196 use_bin = d.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", 1)
197 197
198 dot_re = re.compile("(.*)\.(.*)") 198 dot_re = re.compile("(.*)\.(.*)")
199 199
200#GLIBC_GENERATE_LOCALES var specifies which locales to be supported, empty or "all" means all locales 200#GLIBC_GENERATE_LOCALES var specifies which locales to be supported, empty or "all" means all locales
201 if use_bin != "precompiled": 201 if use_bin != "precompiled":
202 supported = bb.data.getVar('GLIBC_GENERATE_LOCALES', d, 1) 202 supported = d.getVar('GLIBC_GENERATE_LOCALES', 1)
203 if not supported or supported == "all": 203 if not supported or supported == "all":
204 f = open(base_path_join(bb.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r") 204 f = open(base_path_join(d.getVar('WORKDIR', 1), "SUPPORTED"), "r")
205 supported = f.readlines() 205 supported = f.readlines()
206 f.close() 206 f.close()
207 else: 207 else:
@@ -209,7 +209,7 @@ python package_do_split_gconvs () {
209 supported = map(lambda s:s.replace(".", " ") + "\n", supported) 209 supported = map(lambda s:s.replace(".", " ") + "\n", supported)
210 else: 210 else:
211 supported = [] 211 supported = []
212 full_bin_path = bb.data.getVar('PKGD', d, True) + binary_locales_dir 212 full_bin_path = d.getVar('PKGD', True) + binary_locales_dir
213 for dir in os.listdir(full_bin_path): 213 for dir in os.listdir(full_bin_path):
214 dbase = dir.split(".") 214 dbase = dir.split(".")
215 d2 = " " 215 d2 = " "
@@ -218,7 +218,7 @@ python package_do_split_gconvs () {
218 supported.append(dbase[0] + d2) 218 supported.append(dbase[0] + d2)
219 219
220 # Collate the locales by base and encoding 220 # Collate the locales by base and encoding
221 utf8_only = int(bb.data.getVar('LOCALE_UTF8_ONLY', d, 1) or 0) 221 utf8_only = int(d.getVar('LOCALE_UTF8_ONLY', 1) or 0)
222 encodings = {} 222 encodings = {}
223 for l in supported: 223 for l in supported:
224 l = l[:-1] 224 l = l[:-1]
@@ -235,9 +235,9 @@ python package_do_split_gconvs () {
235 def output_locale_source(name, pkgname, locale, encoding): 235 def output_locale_source(name, pkgname, locale, encoding):
236 bb.data.setVar('RDEPENDS_%s' % pkgname, 'localedef %s-localedata-%s %s-charmap-%s' % \ 236 bb.data.setVar('RDEPENDS_%s' % pkgname, 'localedef %s-localedata-%s %s-charmap-%s' % \
237 (bpn, legitimize_package_name(locale), bpn, legitimize_package_name(encoding)), d) 237 (bpn, legitimize_package_name(locale), bpn, legitimize_package_name(encoding)), d)
238 bb.data.setVar('pkg_postinst_%s' % pkgname, bb.data.getVar('locale_base_postinst', d, 1) \ 238 bb.data.setVar('pkg_postinst_%s' % pkgname, d.getVar('locale_base_postinst', 1) \
239 % (locale, encoding, locale), d) 239 % (locale, encoding, locale), d)
240 bb.data.setVar('pkg_postrm_%s' % pkgname, bb.data.getVar('locale_base_postrm', d, 1) % \ 240 bb.data.setVar('pkg_postrm_%s' % pkgname, d.getVar('locale_base_postrm', 1) % \
241 (locale, encoding, locale), d) 241 (locale, encoding, locale), d)
242 242
243 def output_locale_binary_rdepends(name, pkgname, locale, encoding): 243 def output_locale_binary_rdepends(name, pkgname, locale, encoding):
@@ -248,23 +248,23 @@ python package_do_split_gconvs () {
248 libc_name = name 248 libc_name = name
249 bb.data.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('%s-binary-localedata-%s' \ 249 bb.data.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('%s-binary-localedata-%s' \
250 % (bpn, libc_name)), d) 250 % (bpn, libc_name)), d)
251 rprovides = (bb.data.getVar('RPROVIDES_%s' % pkgname, d, True) or "").split() 251 rprovides = (d.getVar('RPROVIDES_%s' % pkgname, True) or "").split()
252 rprovides.append(legitimize_package_name('%s-binary-localedata-%s' % (bpn, libc_name))) 252 rprovides.append(legitimize_package_name('%s-binary-localedata-%s' % (bpn, libc_name)))
253 bb.data.setVar('RPROVIDES_%s' % pkgname, " ".join(rprovides), d) 253 bb.data.setVar('RPROVIDES_%s' % pkgname, " ".join(rprovides), d)
254 254
255 commands = {} 255 commands = {}
256 256
257 def output_locale_binary(name, pkgname, locale, encoding): 257 def output_locale_binary(name, pkgname, locale, encoding):
258 treedir = base_path_join(bb.data.getVar("WORKDIR", d, 1), "locale-tree") 258 treedir = base_path_join(d.getVar("WORKDIR", 1), "locale-tree")
259 ldlibdir = base_path_join(treedir, bb.data.getVar("base_libdir", d, 1)) 259 ldlibdir = base_path_join(treedir, d.getVar("base_libdir", 1))
260 path = bb.data.getVar("PATH", d, 1) 260 path = d.getVar("PATH", 1)
261 i18npath = base_path_join(treedir, datadir, "i18n") 261 i18npath = base_path_join(treedir, datadir, "i18n")
262 gconvpath = base_path_join(treedir, "iconvdata") 262 gconvpath = base_path_join(treedir, "iconvdata")
263 outputpath = base_path_join(treedir, libdir, "locale") 263 outputpath = base_path_join(treedir, libdir, "locale")
264 264
265 use_cross_localedef = bb.data.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF", d, 1) or "0" 265 use_cross_localedef = d.getVar("LOCALE_GENERATION_WITH_CROSS-LOCALEDEF", 1) or "0"
266 if use_cross_localedef == "1": 266 if use_cross_localedef == "1":
267 target_arch = bb.data.getVar('TARGET_ARCH', d, True) 267 target_arch = d.getVar('TARGET_ARCH', True)
268 locale_arch_options = { \ 268 locale_arch_options = { \
269 "arm": " --uint32-align=4 --little-endian ", \ 269 "arm": " --uint32-align=4 --little-endian ", \
270 "powerpc": " --uint32-align=4 --big-endian ", \ 270 "powerpc": " --uint32-align=4 --big-endian ", \
@@ -292,9 +292,9 @@ python package_do_split_gconvs () {
292 --inputfile=%s/i18n/locales/%s --charmap=%s %s" \ 292 --inputfile=%s/i18n/locales/%s --charmap=%s %s" \
293 % (treedir, datadir, locale, encoding, name) 293 % (treedir, datadir, locale, encoding, name)
294 294
295 qemu_options = bb.data.getVar("QEMU_OPTIONS_%s" % bb.data.getVar('PACKAGE_ARCH', d, 1), d, 1) 295 qemu_options = bb.data.getVar("QEMU_OPTIONS_%s" % d.getVar('PACKAGE_ARCH', 1), d, 1)
296 if not qemu_options: 296 if not qemu_options:
297 qemu_options = bb.data.getVar('QEMU_OPTIONS', d, 1) 297 qemu_options = d.getVar('QEMU_OPTIONS', 1)
298 298
299 cmd = "PSEUDO_RELOADED=YES PATH=\"%s\" I18NPATH=\"%s\" %s -L %s \ 299 cmd = "PSEUDO_RELOADED=YES PATH=\"%s\" I18NPATH=\"%s\" %s -L %s \
300 -E LD_LIBRARY_PATH=%s %s %s/bin/localedef %s" % \ 300 -E LD_LIBRARY_PATH=%s %s %s/bin/localedef %s" % \
@@ -305,14 +305,14 @@ python package_do_split_gconvs () {
305 bb.note("generating locale %s (%s)" % (locale, encoding)) 305 bb.note("generating locale %s (%s)" % (locale, encoding))
306 306
307 def output_locale(name, locale, encoding): 307 def output_locale(name, locale, encoding):
308 pkgname = bb.data.getVar('MLPREFIX', d) + 'locale-base-' + legitimize_package_name(name) 308 pkgname = d.getVar('MLPREFIX') + 'locale-base-' + legitimize_package_name(name)
309 bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d) 309 d.setVar('ALLOW_EMPTY_%s' % pkgname, '1')
310 bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d) 310 bb.data.setVar('PACKAGES', '%s %s' % (pkgname, d.getVar('PACKAGES', 1)), d)
311 rprovides = ' virtual-locale-%s' % legitimize_package_name(name) 311 rprovides = ' virtual-locale-%s' % legitimize_package_name(name)
312 m = re.match("(.*)_(.*)", name) 312 m = re.match("(.*)_(.*)", name)
313 if m: 313 if m:
314 rprovides += ' virtual-locale-%s' % m.group(1) 314 rprovides += ' virtual-locale-%s' % m.group(1)
315 bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d) 315 d.setVar('RPROVIDES_%s' % pkgname, rprovides)
316 316
317 if use_bin == "compile": 317 if use_bin == "compile":
318 output_locale_binary_rdepends(name, pkgname, locale, encoding) 318 output_locale_binary_rdepends(name, pkgname, locale, encoding)
@@ -347,7 +347,7 @@ python package_do_split_gconvs () {
347 bb.note(" " + " ".join(non_utf8)) 347 bb.note(" " + " ".join(non_utf8))
348 348
349 if use_bin == "compile": 349 if use_bin == "compile":
350 makefile = base_path_join(bb.data.getVar("WORKDIR", d, 1), "locale-tree", "Makefile") 350 makefile = base_path_join(d.getVar("WORKDIR", 1), "locale-tree", "Makefile")
351 m = open(makefile, "w") 351 m = open(makefile, "w")
352 m.write("all: %s\n\n" % " ".join(commands.keys())) 352 m.write("all: %s\n\n" % " ".join(commands.keys()))
353 for cmd in commands: 353 for cmd in commands:
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index baf35f0..4d036b1 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -104,10 +104,10 @@ python do_populate_lic() {
104 104
105 # If the generic does not exist we need to check to see if there is an SPDX mapping to it 105 # If the generic does not exist we need to check to see if there is an SPDX mapping to it
106 if not os.path.isfile(os.path.join(generic_directory, license_type)): 106 if not os.path.isfile(os.path.join(generic_directory, license_type)):
107 if bb.data.getVarFlag('SPDXLICENSEMAP', license_type, d) != None: 107 if d.getVarFlag('SPDXLICENSEMAP', license_type) != None:
108 # Great, there is an SPDXLICENSEMAP. We can copy! 108 # Great, there is an SPDXLICENSEMAP. We can copy!
109 bb.note("We need to use a SPDXLICENSEMAP for %s" % (license_type)) 109 bb.note("We need to use a SPDXLICENSEMAP for %s" % (license_type))
110 spdx_generic = bb.data.getVarFlag('SPDXLICENSEMAP', license_type, d) 110 spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type)
111 copy_license(generic_directory, gen_lic_dest, spdx_generic) 111 copy_license(generic_directory, gen_lic_dest, spdx_generic)
112 link_license(gen_lic_dest, destdir, spdx_generic) 112 link_license(gen_lic_dest, destdir, spdx_generic)
113 else: 113 else:
@@ -120,16 +120,16 @@ python do_populate_lic() {
120 link_license(gen_lic_dest, destdir, license_type) 120 link_license(gen_lic_dest, destdir, license_type)
121 121
122 # All the license types for the package 122 # All the license types for the package
123 license_types = bb.data.getVar('LICENSE', d, True) 123 license_types = d.getVar('LICENSE', True)
124 # All the license files for the package 124 # All the license files for the package
125 lic_files = bb.data.getVar('LIC_FILES_CHKSUM', d, True) 125 lic_files = d.getVar('LIC_FILES_CHKSUM', True)
126 pn = bb.data.getVar('PN', d, True) 126 pn = d.getVar('PN', True)
127 # The base directory we wrangle licenses to 127 # The base directory we wrangle licenses to
128 destdir = os.path.join(bb.data.getVar('LICSSTATEDIR', d, True), pn) 128 destdir = os.path.join(d.getVar('LICSSTATEDIR', True), pn)
129 # The license files are located in S/LIC_FILE_CHECKSUM. 129 # The license files are located in S/LIC_FILE_CHECKSUM.
130 srcdir = bb.data.getVar('S', d, True) 130 srcdir = d.getVar('S', True)
131 # Directory we store the generic licenses as set in the distro configuration 131 # Directory we store the generic licenses as set in the distro configuration
132 generic_directory = bb.data.getVar('COMMON_LICENSE_DIR', d, True) 132 generic_directory = d.getVar('COMMON_LICENSE_DIR', True)
133 133
134 try: 134 try:
135 bb.mkdirhier(destdir) 135 bb.mkdirhier(destdir)
@@ -154,7 +154,7 @@ python do_populate_lic() {
154 if ret is False or ret == 0: 154 if ret is False or ret == 0:
155 bb.warn("%s could not be copied for some reason. It may not exist. WARN for now." % srclicfile) 155 bb.warn("%s could not be copied for some reason. It may not exist. WARN for now." % srclicfile)
156 156
157 gen_lic_dest = os.path.join(bb.data.getVar('LICENSE_DIRECTORY', d, True), "common-licenses") 157 gen_lic_dest = os.path.join(d.getVar('LICENSE_DIRECTORY', True), "common-licenses")
158 158
159 clean_licenses = "" 159 clean_licenses = ""
160 160
diff --git a/meta/classes/metadata_scm.bbclass b/meta/classes/metadata_scm.bbclass
index 99ac05c..57609ef 100644
--- a/meta/classes/metadata_scm.bbclass
+++ b/meta/classes/metadata_scm.bbclass
@@ -27,7 +27,7 @@ def base_detect_branch(d):
27 return "<unknown>" 27 return "<unknown>"
28 28
29def base_get_scmbasepath(d): 29def base_get_scmbasepath(d):
30 return bb.data.getVar( 'COREBASE', d, 1 ) 30 return d.getVar( 'COREBASE', 1 )
31 31
32def base_get_metadata_monotone_branch(path, d): 32def base_get_metadata_monotone_branch(path, d):
33 monotone_branch = "<unknown>" 33 monotone_branch = "<unknown>"
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index ba8b0bf..5f25bdd 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -98,18 +98,18 @@ python native_virtclass_handler () {
98 if not isinstance(e, bb.event.RecipePreFinalise): 98 if not isinstance(e, bb.event.RecipePreFinalise):
99 return 99 return
100 100
101 classextend = bb.data.getVar('BBCLASSEXTEND', e.data, True) or "" 101 classextend = e.data.getVar('BBCLASSEXTEND', True) or ""
102 if "native" not in classextend: 102 if "native" not in classextend:
103 return 103 return
104 104
105 pn = bb.data.getVar("PN", e.data, True) 105 pn = e.data.getVar("PN", True)
106 if not pn.endswith("-native"): 106 if not pn.endswith("-native"):
107 return 107 return
108 108
109 def map_dependencies(varname, d, suffix = ""): 109 def map_dependencies(varname, d, suffix = ""):
110 if suffix: 110 if suffix:
111 varname = varname + "_" + suffix 111 varname = varname + "_" + suffix
112 deps = bb.data.getVar(varname, d, True) 112 deps = d.getVar(varname, True)
113 if not deps: 113 if not deps:
114 return 114 return
115 deps = bb.utils.explode_deps(deps) 115 deps = bb.utils.explode_deps(deps)
@@ -131,15 +131,15 @@ python native_virtclass_handler () {
131 map_dependencies("RPROVIDES", e.data, pkg) 131 map_dependencies("RPROVIDES", e.data, pkg)
132 map_dependencies("RREPLACES", e.data, pkg) 132 map_dependencies("RREPLACES", e.data, pkg)
133 133
134 provides = bb.data.getVar("PROVIDES", e.data, True) 134 provides = e.data.getVar("PROVIDES", True)
135 for prov in provides.split(): 135 for prov in provides.split():
136 if prov.find(pn) != -1: 136 if prov.find(pn) != -1:
137 continue 137 continue
138 if not prov.endswith("-native"): 138 if not prov.endswith("-native"):
139 provides = provides.replace(prov, prov + "-native") 139 provides = provides.replace(prov, prov + "-native")
140 bb.data.setVar("PROVIDES", provides, e.data) 140 e.data.setVar("PROVIDES", provides)
141 141
142 bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", e.data, False) + ":virtclass-native", e.data) 142 bb.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-native", e.data)
143} 143}
144 144
145addhandler native_virtclass_handler 145addhandler native_virtclass_handler
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index bb59ac5..ca24efa 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -11,7 +11,7 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
11# 11#
12PACKAGE_ARCH = "${SDK_ARCH}-nativesdk" 12PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
13python () { 13python () {
14 archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split() 14 archs = d.getVar('PACKAGE_ARCHS', True).split()
15 sdkarchs = [] 15 sdkarchs = []
16 for arch in archs: 16 for arch in archs:
17 sdkarchs.append(arch + '-nativesdk') 17 sdkarchs.append(arch + '-nativesdk')
@@ -62,22 +62,22 @@ python nativesdk_virtclass_handler () {
62 if not isinstance(e, bb.event.RecipePreFinalise): 62 if not isinstance(e, bb.event.RecipePreFinalise):
63 return 63 return
64 64
65 pn = bb.data.getVar("PN", e.data, True) 65 pn = e.data.getVar("PN", True)
66 if not pn.endswith("-nativesdk"): 66 if not pn.endswith("-nativesdk"):
67 return 67 return
68 68
69 bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", e.data, False) + ":virtclass-nativesdk", e.data) 69 bb.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-nativesdk", e.data)
70} 70}
71 71
72python () { 72python () {
73 pn = bb.data.getVar("PN", d, True) 73 pn = d.getVar("PN", True)
74 if not pn.endswith("-nativesdk"): 74 if not pn.endswith("-nativesdk"):
75 return 75 return
76 76
77 def map_dependencies(varname, d, suffix = ""): 77 def map_dependencies(varname, d, suffix = ""):
78 if suffix: 78 if suffix:
79 varname = varname + "_" + suffix 79 varname = varname + "_" + suffix
80 deps = bb.data.getVar(varname, d, True) 80 deps = d.getVar(varname, True)
81 if not deps: 81 if not deps:
82 return 82 return
83 deps = bb.utils.explode_deps(deps) 83 deps = bb.utils.explode_deps(deps)
@@ -101,13 +101,13 @@ python () {
101 # map_dependencies("RPROVIDES", d, pkg) 101 # map_dependencies("RPROVIDES", d, pkg)
102 # map_dependencies("RREPLACES", d, pkg) 102 # map_dependencies("RREPLACES", d, pkg)
103 103
104 provides = bb.data.getVar("PROVIDES", d, True) 104 provides = d.getVar("PROVIDES", True)
105 for prov in provides.split(): 105 for prov in provides.split():
106 if prov.find(pn) != -1: 106 if prov.find(pn) != -1:
107 continue 107 continue
108 if not prov.endswith("-nativesdk"): 108 if not prov.endswith("-nativesdk"):
109 provides = provides.replace(prov, prov + "-nativesdk") 109 provides = provides.replace(prov, prov + "-nativesdk")
110 bb.data.setVar("PROVIDES", provides, d) 110 d.setVar("PROVIDES", provides)
111} 111}
112 112
113addhandler nativesdk_virtclass_handler 113addhandler nativesdk_virtclass_handler
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 0e1d8db..d01275f 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -88,9 +88,9 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
88 if newdeps: 88 if newdeps:
89 extra_depends = " ".join(newdeps) 89 extra_depends = " ".join(newdeps)
90 90
91 dvar = bb.data.getVar('PKGD', d, True) 91 dvar = d.getVar('PKGD', True)
92 92
93 packages = bb.data.getVar('PACKAGES', d, True).split() 93 packages = d.getVar('PACKAGES', True).split()
94 94
95 if postinst: 95 if postinst:
96 postinst = '#!/bin/sh\n' + postinst + '\n' 96 postinst = '#!/bin/sh\n' + postinst + '\n'
@@ -136,7 +136,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
136 packages = [pkg] + packages 136 packages = [pkg] + packages
137 else: 137 else:
138 packages.append(pkg) 138 packages.append(pkg)
139 oldfiles = bb.data.getVar('FILES_' + pkg, d, True) 139 oldfiles = d.getVar('FILES_' + pkg, True)
140 if not oldfiles: 140 if not oldfiles:
141 the_files = [os.path.join(root, o)] 141 the_files = [os.path.join(root, o)]
142 if aux_files_pattern: 142 if aux_files_pattern:
@@ -153,17 +153,17 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
153 the_files.append(aux_files_pattern_verbatim % m.group(1)) 153 the_files.append(aux_files_pattern_verbatim % m.group(1))
154 bb.data.setVar('FILES_' + pkg, " ".join(the_files), d) 154 bb.data.setVar('FILES_' + pkg, " ".join(the_files), d)
155 if extra_depends != '': 155 if extra_depends != '':
156 the_depends = bb.data.getVar('RDEPENDS_' + pkg, d, True) 156 the_depends = d.getVar('RDEPENDS_' + pkg, True)
157 if the_depends: 157 if the_depends:
158 the_depends = '%s %s' % (the_depends, extra_depends) 158 the_depends = '%s %s' % (the_depends, extra_depends)
159 else: 159 else:
160 the_depends = extra_depends 160 the_depends = extra_depends
161 bb.data.setVar('RDEPENDS_' + pkg, the_depends, d) 161 d.setVar('RDEPENDS_' + pkg, the_depends)
162 bb.data.setVar('DESCRIPTION_' + pkg, description % on, d) 162 d.setVar('DESCRIPTION_' + pkg, description % on)
163 if postinst: 163 if postinst:
164 bb.data.setVar('pkg_postinst_' + pkg, postinst, d) 164 d.setVar('pkg_postinst_' + pkg, postinst)
165 if postrm: 165 if postrm:
166 bb.data.setVar('pkg_postrm_' + pkg, postrm, d) 166 d.setVar('pkg_postrm_' + pkg, postrm)
167 else: 167 else:
168 bb.data.setVar('FILES_' + pkg, oldfiles + " " + os.path.join(root, o), d) 168 bb.data.setVar('FILES_' + pkg, oldfiles + " " + os.path.join(root, o), d)
169 if callable(hook): 169 if callable(hook):
@@ -174,13 +174,13 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
174PACKAGE_DEPENDS += "file-native" 174PACKAGE_DEPENDS += "file-native"
175 175
176python () { 176python () {
177 if bb.data.getVar('PACKAGES', d, True) != '': 177 if d.getVar('PACKAGES', True) != '':
178 deps = bb.data.getVarFlag('do_package', 'depends', d) or "" 178 deps = d.getVarFlag('do_package', 'depends') or ""
179 for dep in (bb.data.getVar('PACKAGE_DEPENDS', d, True) or "").split(): 179 for dep in (d.getVar('PACKAGE_DEPENDS', True) or "").split():
180 deps += " %s:do_populate_sysroot" % dep 180 deps += " %s:do_populate_sysroot" % dep
181 bb.data.setVarFlag('do_package', 'depends', deps, d) 181 d.setVarFlag('do_package', 'depends', deps)
182 182
183 deps = (bb.data.getVarFlag('do_package', 'deptask', d) or "").split() 183 deps = (d.getVarFlag('do_package', 'deptask') or "").split()
184 # shlibs requires any DEPENDS to have already packaged for the *.list files 184 # shlibs requires any DEPENDS to have already packaged for the *.list files
185 deps.append("do_package") 185 deps.append("do_package")
186 bb.data.setVarFlag('do_package', 'deptask', " ".join(deps), d) 186 bb.data.setVarFlag('do_package', 'deptask', " ".join(deps), d)
@@ -198,9 +198,9 @@ def splitfile(file, debugfile, debugsrcdir, d):
198 198
199 import commands, stat 199 import commands, stat
200 200
201 dvar = bb.data.getVar('PKGD', d, True) 201 dvar = d.getVar('PKGD', True)
202 pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True) 202 pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
203 objcopy = bb.data.getVar("OBJCOPY", d, True) 203 objcopy = d.getVar("OBJCOPY", True)
204 debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d) 204 debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d)
205 workdir = bb.data.expand("${WORKDIR}", d) 205 workdir = bb.data.expand("${WORKDIR}", d)
206 workparentdir = os.path.dirname(workdir) 206 workparentdir = os.path.dirname(workdir)
@@ -240,10 +240,10 @@ def splitfile2(debugsrcdir, d):
240 240
241 import commands, stat 241 import commands, stat
242 242
243 dvar = bb.data.getVar('PKGD', d, True) 243 dvar = d.getVar('PKGD', True)
244 pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True) 244 pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
245 strip = bb.data.getVar("STRIP", d, True) 245 strip = d.getVar("STRIP", True)
246 objcopy = bb.data.getVar("OBJCOPY", d, True) 246 objcopy = d.getVar("OBJCOPY", True)
247 debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d) 247 debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d)
248 workdir = bb.data.expand("${WORKDIR}", d) 248 workdir = bb.data.expand("${WORKDIR}", d)
249 workparentdir = os.path.dirname(workdir) 249 workparentdir = os.path.dirname(workdir)
@@ -279,8 +279,8 @@ def runstrip(file, elftype, d):
279 279
280 import commands, stat 280 import commands, stat
281 281
282 pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True) 282 pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
283 strip = bb.data.getVar("STRIP", d, True) 283 strip = d.getVar("STRIP", True)
284 284
285 # Handle kernel modules specifically - .debug directories here are pointless 285 # Handle kernel modules specifically - .debug directories here are pointless
286 if file.find("/lib/modules/") != -1 and file.endswith(".ko"): 286 if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
@@ -329,10 +329,10 @@ def get_package_mapping (pkg, d):
329 return pkg 329 return pkg
330 330
331def runtime_mapping_rename (varname, d): 331def runtime_mapping_rename (varname, d):
332 #bb.note("%s before: %s" % (varname, bb.data.getVar(varname, d, True))) 332 #bb.note("%s before: %s" % (varname, d.getVar(varname, True)))
333 333
334 new_depends = [] 334 new_depends = []
335 deps = bb.utils.explode_dep_versions(bb.data.getVar(varname, d, True) or "") 335 deps = bb.utils.explode_dep_versions(d.getVar(varname, True) or "")
336 for depend in deps: 336 for depend in deps:
337 # Have to be careful with any version component of the depend 337 # Have to be careful with any version component of the depend
338 new_depend = get_package_mapping(depend, d) 338 new_depend = get_package_mapping(depend, d)
@@ -343,7 +343,7 @@ def runtime_mapping_rename (varname, d):
343 343
344 bb.data.setVar(varname, " ".join(new_depends) or None, d) 344 bb.data.setVar(varname, " ".join(new_depends) or None, d)
345 345
346 #bb.note("%s after: %s" % (varname, bb.data.getVar(varname, d, True))) 346 #bb.note("%s after: %s" % (varname, d.getVar(varname, True)))
347 347
348# 348#
349# Package functions suitable for inclusion in PACKAGEFUNCS 349# Package functions suitable for inclusion in PACKAGEFUNCS
@@ -359,19 +359,19 @@ python package_get_auto_pr() {
359} 359}
360 360
361python package_do_split_locales() { 361python package_do_split_locales() {
362 if (bb.data.getVar('PACKAGE_NO_LOCALE', d, True) == '1'): 362 if (d.getVar('PACKAGE_NO_LOCALE', True) == '1'):
363 bb.debug(1, "package requested not splitting locales") 363 bb.debug(1, "package requested not splitting locales")
364 return 364 return
365 365
366 packages = (bb.data.getVar('PACKAGES', d, True) or "").split() 366 packages = (d.getVar('PACKAGES', True) or "").split()
367 367
368 datadir = bb.data.getVar('datadir', d, True) 368 datadir = d.getVar('datadir', True)
369 if not datadir: 369 if not datadir:
370 bb.note("datadir not defined") 370 bb.note("datadir not defined")
371 return 371 return
372 372
373 dvar = bb.data.getVar('PKGD', d, True) 373 dvar = d.getVar('PKGD', True)
374 pn = bb.data.getVar('PN', d, True) 374 pn = d.getVar('PN', True)
375 375
376 if pn + '-locale' in packages: 376 if pn + '-locale' in packages:
377 packages.remove(pn + '-locale') 377 packages.remove(pn + '-locale')
@@ -392,9 +392,9 @@ python package_do_split_locales() {
392 if mainpkg.find('-dev'): 392 if mainpkg.find('-dev'):
393 mainpkg = mainpkg.replace('-dev', '') 393 mainpkg = mainpkg.replace('-dev', '')
394 394
395 summary = bb.data.getVar('SUMMARY', d, True) or pn 395 summary = d.getVar('SUMMARY', True) or pn
396 description = bb.data.getVar('DESCRIPTION', d, True) or "" 396 description = d.getVar('DESCRIPTION', True) or ""
397 locale_section = bb.data.getVar('LOCALE_SECTION', d, True) 397 locale_section = d.getVar('LOCALE_SECTION', True)
398 for l in locales: 398 for l in locales:
399 ln = legitimize_package_name(l) 399 ln = legitimize_package_name(l)
400 pkg = pn + '-locale-' + ln 400 pkg = pn + '-locale-' + ln
@@ -405,7 +405,7 @@ python package_do_split_locales() {
405 bb.data.setVar('SUMMARY_' + pkg, '%s - %s translations' % (summary, l), d) 405 bb.data.setVar('SUMMARY_' + pkg, '%s - %s translations' % (summary, l), d)
406 bb.data.setVar('DESCRIPTION_' + pkg, '%s This package contains language translation files for the %s locale.' % (description, l), d) 406 bb.data.setVar('DESCRIPTION_' + pkg, '%s This package contains language translation files for the %s locale.' % (description, l), d)
407 if locale_section: 407 if locale_section:
408 bb.data.setVar('SECTION_' + pkg, locale_section, d) 408 d.setVar('SECTION_' + pkg, locale_section)
409 409
410 bb.data.setVar('PACKAGES', ' '.join(packages), d) 410 bb.data.setVar('PACKAGES', ' '.join(packages), d)
411 411
@@ -415,14 +415,14 @@ python package_do_split_locales() {
415 # glibc-localedata-translit* won't install as a dependency 415 # glibc-localedata-translit* won't install as a dependency
416 # for some other package which breaks meta-toolchain 416 # for some other package which breaks meta-toolchain
417 # Probably breaks since virtual-locale- isn't provided anywhere 417 # Probably breaks since virtual-locale- isn't provided anywhere
418 #rdep = (bb.data.getVar('RDEPENDS_%s' % mainpkg, d, True) or bb.data.getVar('RDEPENDS', d, True) or "").split() 418 #rdep = (d.getVar('RDEPENDS_%s' % mainpkg, True) or d.getVar('RDEPENDS', True) or "").split()
419 #rdep.append('%s-locale*' % pn) 419 #rdep.append('%s-locale*' % pn)
420 #bb.data.setVar('RDEPENDS_%s' % mainpkg, ' '.join(rdep), d) 420 #bb.data.setVar('RDEPENDS_%s' % mainpkg, ' '.join(rdep), d)
421} 421}
422 422
423python perform_packagecopy () { 423python perform_packagecopy () {
424 dest = bb.data.getVar('D', d, True) 424 dest = d.getVar('D', True)
425 dvar = bb.data.getVar('PKGD', d, True) 425 dvar = d.getVar('PKGD', True)
426 426
427 bb.mkdirhier(dvar) 427 bb.mkdirhier(dvar)
428 428
@@ -549,16 +549,16 @@ python fixup_perms () {
549 # paths are resolved via BBPATH 549 # paths are resolved via BBPATH
550 def get_fs_perms_list(d): 550 def get_fs_perms_list(d):
551 str = "" 551 str = ""
552 fs_perms_tables = bb.data.getVar('FILESYSTEM_PERMS_TABLES', d, True) 552 fs_perms_tables = d.getVar('FILESYSTEM_PERMS_TABLES', True)
553 if not fs_perms_tables: 553 if not fs_perms_tables:
554 fs_perms_tables = 'files/fs-perms.txt' 554 fs_perms_tables = 'files/fs-perms.txt'
555 for conf_file in fs_perms_tables.split(): 555 for conf_file in fs_perms_tables.split():
556 str += " %s" % bb.which(bb.data.getVar('BBPATH', d, True), conf_file) 556 str += " %s" % bb.which(d.getVar('BBPATH', True), conf_file)
557 return str 557 return str
558 558
559 559
560 560
561 dvar = bb.data.getVar('PKGD', d, True) 561 dvar = d.getVar('PKGD', True)
562 562
563 fs_perms_table = {} 563 fs_perms_table = {}
564 564
@@ -586,7 +586,7 @@ python fixup_perms () {
586 'oldincludedir' ] 586 'oldincludedir' ]
587 587
588 for path in target_path_vars: 588 for path in target_path_vars:
589 dir = bb.data.getVar(path, d, True) or "" 589 dir = d.getVar(path, True) or ""
590 if dir == "": 590 if dir == "":
591 continue 591 continue
592 fs_perms_table[dir] = fs_perms_entry(bb.data.expand("%s 0755 root root false - - -" % (dir), d)) 592 fs_perms_table[dir] = fs_perms_entry(bb.data.expand("%s 0755 root root false - - -" % (dir), d))
@@ -664,11 +664,11 @@ python fixup_perms () {
664python split_and_strip_files () { 664python split_and_strip_files () {
665 import commands, stat, errno 665 import commands, stat, errno
666 666
667 dvar = bb.data.getVar('PKGD', d, True) 667 dvar = d.getVar('PKGD', True)
668 pn = bb.data.getVar('PN', d, True) 668 pn = d.getVar('PN', True)
669 669
670 # We default to '.debug' style 670 # We default to '.debug' style
671 if bb.data.getVar('PACKAGE_DEBUG_SPLIT_STYLE', d, True) == 'debug-file-directory': 671 if d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 'debug-file-directory':
672 # Single debug-file-directory style debug info 672 # Single debug-file-directory style debug info
673 debugappend = ".debug" 673 debugappend = ".debug"
674 debugdir = "" 674 debugdir = ""
@@ -691,7 +691,7 @@ python split_and_strip_files () {
691 # 8 - shared library 691 # 8 - shared library
692 def isELF(path): 692 def isELF(path):
693 type = 0 693 type = 0
694 pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True) 694 pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
695 ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, path)) 695 ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, path))
696 696
697 if ret: 697 if ret:
@@ -715,8 +715,8 @@ python split_and_strip_files () {
715 # 715 #
716 file_list = {} 716 file_list = {}
717 file_links = {} 717 file_links = {}
718 if (bb.data.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', d, True) != '1') and \ 718 if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1') and \
719 (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'): 719 (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
720 for root, dirs, files in os.walk(dvar): 720 for root, dirs, files in os.walk(dvar):
721 for f in files: 721 for f in files:
722 file = os.path.join(root, f) 722 file = os.path.join(root, f)
@@ -764,7 +764,7 @@ python split_and_strip_files () {
764 # 764 #
765 # First lets process debug splitting 765 # First lets process debug splitting
766 # 766 #
767 if (bb.data.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', d, True) != '1'): 767 if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1'):
768 for file in file_list: 768 for file in file_list:
769 src = file[len(dvar):] 769 src = file[len(dvar):]
770 dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend 770 dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
@@ -842,7 +842,7 @@ python split_and_strip_files () {
842 # 842 #
843 # Now lets go back over things and strip them 843 # Now lets go back over things and strip them
844 # 844 #
845 if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'): 845 if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
846 for file in file_list: 846 for file in file_list:
847 if file_list[file].startswith("ELF: "): 847 if file_list[file].startswith("ELF: "):
848 elf_file = int(file_list[file][5:]) 848 elf_file = int(file_list[file][5:])
@@ -856,11 +856,11 @@ python split_and_strip_files () {
856python populate_packages () { 856python populate_packages () {
857 import glob, stat, errno, re 857 import glob, stat, errno, re
858 858
859 workdir = bb.data.getVar('WORKDIR', d, True) 859 workdir = d.getVar('WORKDIR', True)
860 outdir = bb.data.getVar('DEPLOY_DIR', d, True) 860 outdir = d.getVar('DEPLOY_DIR', True)
861 dvar = bb.data.getVar('PKGD', d, True) 861 dvar = d.getVar('PKGD', True)
862 packages = bb.data.getVar('PACKAGES', d, True) 862 packages = d.getVar('PACKAGES', True)
863 pn = bb.data.getVar('PN', d, True) 863 pn = d.getVar('PN', True)
864 864
865 bb.mkdirhier(outdir) 865 bb.mkdirhier(outdir)
866 os.chdir(dvar) 866 os.chdir(dvar)
@@ -877,7 +877,7 @@ python populate_packages () {
877 else: 877 else:
878 package_list.append(pkg) 878 package_list.append(pkg)
879 879
880 pkgdest = bb.data.getVar('PKGDEST', d, True) 880 pkgdest = d.getVar('PKGDEST', True)
881 os.system('rm -rf %s' % pkgdest) 881 os.system('rm -rf %s' % pkgdest)
882 882
883 seen = [] 883 seen = []
@@ -887,14 +887,14 @@ python populate_packages () {
887 root = os.path.join(pkgdest, pkg) 887 root = os.path.join(pkgdest, pkg)
888 bb.mkdirhier(root) 888 bb.mkdirhier(root)
889 889
890 bb.data.setVar('PKG', pkg, localdata) 890 localdata.setVar('PKG', pkg)
891 overrides = bb.data.getVar('OVERRIDES', localdata, True) 891 overrides = localdata.getVar('OVERRIDES', True)
892 if not overrides: 892 if not overrides:
893 raise bb.build.FuncFailed('OVERRIDES not defined') 893 raise bb.build.FuncFailed('OVERRIDES not defined')
894 bb.data.setVar('OVERRIDES', overrides + ':' + pkg, localdata) 894 localdata.setVar('OVERRIDES', overrides + ':' + pkg)
895 bb.data.update_data(localdata) 895 bb.data.update_data(localdata)
896 896
897 filesvar = bb.data.getVar('FILES', localdata, True) or "" 897 filesvar = localdata.getVar('FILES', True) or ""
898 files = filesvar.split() 898 files = filesvar.split()
899 file_links = {} 899 file_links = {}
900 for file in files: 900 for file in files:
@@ -973,9 +973,9 @@ python populate_packages () {
973 bb.build.exec_func("package_name_hook", d) 973 bb.build.exec_func("package_name_hook", d)
974 974
975 for pkg in package_list: 975 for pkg in package_list:
976 pkgname = bb.data.getVar('PKG_%s' % pkg, d, True) 976 pkgname = d.getVar('PKG_%s' % pkg, True)
977 if pkgname is None: 977 if pkgname is None:
978 bb.data.setVar('PKG_%s' % pkg, pkg, d) 978 d.setVar('PKG_%s' % pkg, pkg)
979 979
980 dangling_links = {} 980 dangling_links = {}
981 pkg_files = {} 981 pkg_files = {}
@@ -999,7 +999,7 @@ python populate_packages () {
999 dangling_links[pkg].append(os.path.normpath(target)) 999 dangling_links[pkg].append(os.path.normpath(target))
1000 1000
1001 for pkg in package_list: 1001 for pkg in package_list:
1002 rdepends = bb.utils.explode_dep_versions(bb.data.getVar('RDEPENDS_' + pkg, d, True) or bb.data.getVar('RDEPENDS', d, True) or "") 1002 rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
1003 1003
1004 for l in dangling_links[pkg]: 1004 for l in dangling_links[pkg]:
1005 found = False 1005 found = False
@@ -1040,9 +1040,9 @@ python emit_pkgdata() {
1040 f.write('%s: %s\n' % (var, encode(val))) 1040 f.write('%s: %s\n' % (var, encode(val)))
1041 return 1041 return
1042 1042
1043 packages = bb.data.getVar('PACKAGES', d, True) 1043 packages = d.getVar('PACKAGES', True)
1044 pkgdest = bb.data.getVar('PKGDEST', d, 1) 1044 pkgdest = d.getVar('PKGDEST', 1)
1045 pkgdatadir = bb.data.getVar('PKGDESTWORK', d, True) 1045 pkgdatadir = d.getVar('PKGDESTWORK', True)
1046 1046
1047 # Take shared lock since we're only reading, not writing 1047 # Take shared lock since we're only reading, not writing
1048 lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d), True) 1048 lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d), True)
@@ -1052,7 +1052,7 @@ python emit_pkgdata() {
1052 f.write("PACKAGES: %s\n" % packages) 1052 f.write("PACKAGES: %s\n" % packages)
1053 f.close() 1053 f.close()
1054 1054
1055 workdir = bb.data.getVar('WORKDIR', d, True) 1055 workdir = d.getVar('WORKDIR', True)
1056 1056
1057 for pkg in packages.split(): 1057 for pkg in packages.split():
1058 subdata_file = pkgdatadir + "/runtime/%s" % pkg 1058 subdata_file = pkgdatadir + "/runtime/%s" % pkg
@@ -1080,19 +1080,19 @@ python emit_pkgdata() {
1080 write_if_exists(sf, pkg, 'pkg_preinst') 1080 write_if_exists(sf, pkg, 'pkg_preinst')
1081 write_if_exists(sf, pkg, 'pkg_prerm') 1081 write_if_exists(sf, pkg, 'pkg_prerm')
1082 write_if_exists(sf, pkg, 'FILERPROVIDESFLIST') 1082 write_if_exists(sf, pkg, 'FILERPROVIDESFLIST')
1083 for dfile in (bb.data.getVar('FILERPROVIDESFLIST_' + pkg, d, True) or "").split(): 1083 for dfile in (d.getVar('FILERPROVIDESFLIST_' + pkg, True) or "").split():
1084 write_if_exists(sf, pkg, 'FILERPROVIDES_' + dfile) 1084 write_if_exists(sf, pkg, 'FILERPROVIDES_' + dfile)
1085 1085
1086 write_if_exists(sf, pkg, 'FILERDEPENDSFLIST') 1086 write_if_exists(sf, pkg, 'FILERDEPENDSFLIST')
1087 for dfile in (bb.data.getVar('FILERDEPENDSFLIST_' + pkg, d, True) or "").split(): 1087 for dfile in (d.getVar('FILERDEPENDSFLIST_' + pkg, True) or "").split():
1088 write_if_exists(sf, pkg, 'FILERDEPENDS_' + dfile) 1088 write_if_exists(sf, pkg, 'FILERDEPENDS_' + dfile)
1089 1089
1090 sf.close() 1090 sf.close()
1091 1091
1092 1092
1093 allow_empty = bb.data.getVar('ALLOW_EMPTY_%s' % pkg, d, True) 1093 allow_empty = d.getVar('ALLOW_EMPTY_%s' % pkg, True)
1094 if not allow_empty: 1094 if not allow_empty:
1095 allow_empty = bb.data.getVar('ALLOW_EMPTY', d, True) 1095 allow_empty = d.getVar('ALLOW_EMPTY', True)
1096 root = "%s/%s" % (pkgdest, pkg) 1096 root = "%s/%s" % (pkgdest, pkg)
1097 os.chdir(root) 1097 os.chdir(root)
1098 g = glob('*') 1098 g = glob('*')
@@ -1123,8 +1123,8 @@ RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/bin/rpmdeps"
1123python package_do_filedeps() { 1123python package_do_filedeps() {
1124 import os, re 1124 import os, re
1125 1125
1126 pkgdest = bb.data.getVar('PKGDEST', d, True) 1126 pkgdest = d.getVar('PKGDEST', True)
1127 packages = bb.data.getVar('PACKAGES', d, True) 1127 packages = d.getVar('PACKAGES', True)
1128 1128
1129 rpmdeps = bb.data.expand("${RPMDEPS}", d) 1129 rpmdeps = bb.data.expand("${RPMDEPS}", d)
1130 r = re.compile(r'[<>=]+ +[^ ]*') 1130 r = re.compile(r'[<>=]+ +[^ ]*')
@@ -1189,7 +1189,7 @@ SHLIBSWORKDIR = "${WORKDIR}/shlibs"
1189python package_do_shlibs() { 1189python package_do_shlibs() {
1190 import re 1190 import re
1191 1191
1192 exclude_shlibs = bb.data.getVar('EXCLUDE_FROM_SHLIBS', d, 0) 1192 exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', 0)
1193 if exclude_shlibs: 1193 if exclude_shlibs:
1194 bb.note("not generating shlibs") 1194 bb.note("not generating shlibs")
1195 return 1195 return
@@ -1197,27 +1197,27 @@ python package_do_shlibs() {
1197 lib_re = re.compile("^.*\.so") 1197 lib_re = re.compile("^.*\.so")
1198 libdir_re = re.compile(".*/lib$") 1198 libdir_re = re.compile(".*/lib$")
1199 1199
1200 packages = bb.data.getVar('PACKAGES', d, True) 1200 packages = d.getVar('PACKAGES', True)
1201 targetos = bb.data.getVar('TARGET_OS', d, True) 1201 targetos = d.getVar('TARGET_OS', True)
1202 1202
1203 workdir = bb.data.getVar('WORKDIR', d, True) 1203 workdir = d.getVar('WORKDIR', True)
1204 1204
1205 ver = bb.data.getVar('PKGV', d, True) 1205 ver = d.getVar('PKGV', True)
1206 if not ver: 1206 if not ver:
1207 bb.error("PKGV not defined") 1207 bb.error("PKGV not defined")
1208 return 1208 return
1209 1209
1210 pkgdest = bb.data.getVar('PKGDEST', d, True) 1210 pkgdest = d.getVar('PKGDEST', True)
1211 1211
1212 shlibs_dir = bb.data.getVar('SHLIBSDIR', d, True) 1212 shlibs_dir = d.getVar('SHLIBSDIR', True)
1213 shlibswork_dir = bb.data.getVar('SHLIBSWORKDIR', d, True) 1213 shlibswork_dir = d.getVar('SHLIBSWORKDIR', True)
1214 1214
1215 # Take shared lock since we're only reading, not writing 1215 # Take shared lock since we're only reading, not writing
1216 lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d)) 1216 lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d))
1217 1217
1218 def linux_so(root, path, file): 1218 def linux_so(root, path, file):
1219 cmd = bb.data.getVar('OBJDUMP', d, True) + " -p " + os.path.join(root, file) + " 2>/dev/null" 1219 cmd = d.getVar('OBJDUMP', True) + " -p " + os.path.join(root, file) + " 2>/dev/null"
1220 cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', d, True), cmd) 1220 cmd = "PATH=\"%s\" %s" % (d.getVar('PATH', True), cmd)
1221 fd = os.popen(cmd) 1221 fd = os.popen(cmd)
1222 lines = fd.readlines() 1222 lines = fd.readlines()
1223 fd.close() 1223 fd.close()
@@ -1264,7 +1264,7 @@ python package_do_shlibs() {
1264 if not combo in sonames: 1264 if not combo in sonames:
1265 sonames.append(combo) 1265 sonames.append(combo)
1266 if file.endswith('.dylib') or file.endswith('.so'): 1266 if file.endswith('.dylib') or file.endswith('.so'):
1267 lafile = fullpath.replace(os.path.join(pkgdest, pkg), bb.data.getVar('PKGD', d, True)) 1267 lafile = fullpath.replace(os.path.join(pkgdest, pkg), d.getVar('PKGD', True))
1268 # Drop suffix 1268 # Drop suffix
1269 lafile = lafile.rsplit(".",1)[0] 1269 lafile = lafile.rsplit(".",1)[0]
1270 lapath = os.path.dirname(lafile) 1270 lapath = os.path.dirname(lafile)
@@ -1299,26 +1299,26 @@ python package_do_shlibs() {
1299 needed[pkg].append(name) 1299 needed[pkg].append(name)
1300 #bb.note("Adding %s for %s" % (name, pkg)) 1300 #bb.note("Adding %s for %s" % (name, pkg))
1301 1301
1302 if bb.data.getVar('PACKAGE_SNAP_LIB_SYMLINKS', d, True) == "1": 1302 if d.getVar('PACKAGE_SNAP_LIB_SYMLINKS', True) == "1":
1303 snap_symlinks = True 1303 snap_symlinks = True
1304 else: 1304 else:
1305 snap_symlinks = False 1305 snap_symlinks = False
1306 1306
1307 if (bb.data.getVar('USE_LDCONFIG', d, True) or "1") == "1": 1307 if (d.getVar('USE_LDCONFIG', True) or "1") == "1":
1308 use_ldconfig = True 1308 use_ldconfig = True
1309 else: 1309 else:
1310 use_ldconfig = False 1310 use_ldconfig = False
1311 1311
1312 needed = {} 1312 needed = {}
1313 shlib_provider = {} 1313 shlib_provider = {}
1314 private_libs = bb.data.getVar('PRIVATE_LIBS', d, True) 1314 private_libs = d.getVar('PRIVATE_LIBS', True)
1315 for pkg in packages.split(): 1315 for pkg in packages.split():
1316 needs_ldconfig = False 1316 needs_ldconfig = False
1317 bb.debug(2, "calculating shlib provides for %s" % pkg) 1317 bb.debug(2, "calculating shlib provides for %s" % pkg)
1318 1318
1319 pkgver = bb.data.getVar('PKGV_' + pkg, d, True) 1319 pkgver = d.getVar('PKGV_' + pkg, True)
1320 if not pkgver: 1320 if not pkgver:
1321 pkgver = bb.data.getVar('PV_' + pkg, d, True) 1321 pkgver = d.getVar('PV_' + pkg, True)
1322 if not pkgver: 1322 if not pkgver:
1323 pkgver = ver 1323 pkgver = ver
1324 1324
@@ -1352,11 +1352,11 @@ python package_do_shlibs() {
1352 fd.close() 1352 fd.close()
1353 if needs_ldconfig and use_ldconfig: 1353 if needs_ldconfig and use_ldconfig:
1354 bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg) 1354 bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg)
1355 postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, True) or bb.data.getVar('pkg_postinst', d, True) 1355 postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)
1356 if not postinst: 1356 if not postinst:
1357 postinst = '#!/bin/sh\n' 1357 postinst = '#!/bin/sh\n'
1358 postinst += bb.data.getVar('ldconfig_postinst_fragment', d, True) 1358 postinst += d.getVar('ldconfig_postinst_fragment', True)
1359 bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) 1359 d.setVar('pkg_postinst_%s' % pkg, postinst)
1360 1360
1361 list_re = re.compile('^(.*)\.list$') 1361 list_re = re.compile('^(.*)\.list$')
1362 for dir in [shlibs_dir]: 1362 for dir in [shlibs_dir]:
@@ -1380,7 +1380,7 @@ python package_do_shlibs() {
1380 1380
1381 bb.utils.unlockfile(lf) 1381 bb.utils.unlockfile(lf)
1382 1382
1383 assumed_libs = bb.data.getVar('ASSUME_SHLIBS', d, True) 1383 assumed_libs = d.getVar('ASSUME_SHLIBS', True)
1384 if assumed_libs: 1384 if assumed_libs:
1385 for e in assumed_libs.split(): 1385 for e in assumed_libs.split():
1386 l, dep_pkg = e.split(":") 1386 l, dep_pkg = e.split(":")
@@ -1424,12 +1424,12 @@ python package_do_shlibs() {
1424python package_do_pkgconfig () { 1424python package_do_pkgconfig () {
1425 import re 1425 import re
1426 1426
1427 packages = bb.data.getVar('PACKAGES', d, True) 1427 packages = d.getVar('PACKAGES', True)
1428 workdir = bb.data.getVar('WORKDIR', d, True) 1428 workdir = d.getVar('WORKDIR', True)
1429 pkgdest = bb.data.getVar('PKGDEST', d, True) 1429 pkgdest = d.getVar('PKGDEST', True)
1430 1430
1431 shlibs_dir = bb.data.getVar('SHLIBSDIR', d, True) 1431 shlibs_dir = d.getVar('SHLIBSDIR', True)
1432 shlibswork_dir = bb.data.getVar('SHLIBSWORKDIR', d, True) 1432 shlibswork_dir = d.getVar('SHLIBSWORKDIR', True)
1433 1433
1434 pc_re = re.compile('(.*)\.pc$') 1434 pc_re = re.compile('(.*)\.pc$')
1435 var_re = re.compile('(.*)=(.*)') 1435 var_re = re.compile('(.*)=(.*)')
@@ -1515,9 +1515,9 @@ python package_do_pkgconfig () {
1515} 1515}
1516 1516
1517python read_shlibdeps () { 1517python read_shlibdeps () {
1518 packages = bb.data.getVar('PACKAGES', d, True).split() 1518 packages = d.getVar('PACKAGES', True).split()
1519 for pkg in packages: 1519 for pkg in packages:
1520 rdepends = bb.utils.explode_dep_versions(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "") 1520 rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, 0) or d.getVar('RDEPENDS', 0) or "")
1521 1521
1522 for extension in ".shlibdeps", ".pcdeps", ".clilibdeps": 1522 for extension in ".shlibdeps", ".pcdeps", ".clilibdeps":
1523 depsfile = bb.data.expand("${PKGDEST}/" + pkg + extension, d) 1523 depsfile = bb.data.expand("${PKGDEST}/" + pkg + extension, d)
@@ -1544,14 +1544,14 @@ python package_depchains() {
1544 package. 1544 package.
1545 """ 1545 """
1546 1546
1547 packages = bb.data.getVar('PACKAGES', d, True) 1547 packages = d.getVar('PACKAGES', True)
1548 postfixes = (bb.data.getVar('DEPCHAIN_POST', d, True) or '').split() 1548 postfixes = (d.getVar('DEPCHAIN_POST', True) or '').split()
1549 prefixes = (bb.data.getVar('DEPCHAIN_PRE', d, True) or '').split() 1549 prefixes = (d.getVar('DEPCHAIN_PRE', True) or '').split()
1550 1550
1551 def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d): 1551 def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d):
1552 1552
1553 #bb.note('depends for %s is %s' % (base, depends)) 1553 #bb.note('depends for %s is %s' % (base, depends))
1554 rreclist = bb.utils.explode_dep_versions(bb.data.getVar('RRECOMMENDS_' + pkg, d, True) or bb.data.getVar('RRECOMMENDS', d, True) or "") 1554 rreclist = bb.utils.explode_dep_versions(d.getVar('RRECOMMENDS_' + pkg, True) or d.getVar('RRECOMMENDS', True) or "")
1555 1555
1556 for depend in depends: 1556 for depend in depends:
1557 if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'): 1557 if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'):
@@ -1572,7 +1572,7 @@ python package_depchains() {
1572 def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d): 1572 def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d):