python () {
# Allow this class to be included but overridden - only set
# the values if we're still "all" package arch.
- if d.getVar("PACKAGE_ARCH") == "all":
+ if d.getVar("PACKAGE_ARCH", True) == "all":
# No need for virtual/libc or a cross compiler
d.setVar("INHIBIT_DEFAULT_DEPS","1")
python autotools_copy_aclocals () {
s = d.getVar("S", True)
if not os.path.exists(s + "/configure.in") and not os.path.exists(s + "/configure.ac"):
- if not d.getVar("AUTOTOOLS_COPYACLOCAL"):
+ if not d.getVar("AUTOTOOLS_COPYACLOCAL", False):
return
taskdepdata = d.getVar("BB_TASKDEPDATA", False)
# INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
# we need that built is the responsibility of the patch function / class, not
# the application.
- if not d.getVar('INHIBIT_DEFAULT_DEPS'):
+ if not d.getVar('INHIBIT_DEFAULT_DEPS', False):
if (d.getVar('HOST_SYS', True) != d.getVar('BUILD_SYS', True)):
deps += " virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc "
return deps
mtools-native:do_populate_sysroot \
cdrtools-native:do_populate_sysroot \
virtual/kernel:do_deploy \
- ${@oe.utils.ifelse(d.getVar('COMPRESSISO'),'zisofs-tools-native:do_populate_sysroot','')}"
+ ${@oe.utils.ifelse(d.getVar('COMPRESSISO', False),'zisofs-tools-native:do_populate_sysroot','')}"
PACKAGES = " "
EXCLUDE_FROM_WORLD = "1"
rootdir = os.path.normpath(rootdir)
cmd = d.expand('${CHRPATH_BIN}')
- tmpdir = os.path.normpath(d.getVar('TMPDIR'))
+ tmpdir = os.path.normpath(d.getVar('TMPDIR', False))
baseprefix = os.path.normpath(d.expand('${base_prefix}'))
hostos = d.getVar("HOST_OS", True)
return (s[stat.ST_MODE] & stat.S_IEXEC)
def add_rprovides(pkg, d):
- newpkg = d.getVar('PKG_' + pkg)
+ newpkg = d.getVar('PKG_' + pkg, False)
if newpkg and newpkg != pkg:
provs = (d.getVar('RPROVIDES_' + pkg, True) or "").split()
if pkg not in provs:
if soname_result:
(pkgname, devname) = soname_result
for pkg in packages.split():
- if (d.getVar('PKG_' + pkg) or d.getVar('DEBIAN_NOAUTONAME_' + pkg)):
+ if (d.getVar('PKG_' + pkg, False) or d.getVar('DEBIAN_NOAUTONAME_' + pkg, False)):
add_rprovides(pkg, d)
continue
- debian_pn = d.getVar('DEBIANNAME_' + pkg)
+ debian_pn = d.getVar('DEBIANNAME_' + pkg, False)
if debian_pn:
newpkg = debian_pn
elif pkg == orig_pkg:
prerm = '#!/bin/sh\n'
prerm += d.getVar('gconf_prerm', True)
d.setVar('pkg_prerm_%s' % pkg, prerm)
- d.appendVar("RDEPENDS_%s" % pkg, ' ' + d.getVar('MLPREFIX') + 'gconf')
+ d.appendVar("RDEPENDS_%s" % pkg, ' ' + d.getVar('MLPREFIX', False) + 'gconf')
}
continue
bb.note("adding hicolor-icon-theme dependency to %s" % pkg)
- rdepends = ' ' + d.getVar('MLPREFIX') + "hicolor-icon-theme"
+ rdepends = ' ' + d.getVar('MLPREFIX', False) + "hicolor-icon-theme"
d.appendVar('RDEPENDS_%s' % pkg, rdepends)
bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg)
python __anonymous() {
if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
- gtkimmodules_check = d.getVar('GTKIMMODULES_PACKAGES')
+ gtkimmodules_check = d.getVar('GTKIMMODULES_PACKAGES', False)
if not gtkimmodules_check:
- bb_filename = d.getVar('FILE')
+ bb_filename = d.getVar('FILE', False)
raise bb.build.FuncFailed("ERROR: %s inherits gtk-immodules-cache but doesn't set GTKIMMODULES_PACKAGES" % bb_filename)
}
# INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
# we need that built is the responsibility of the patch function / class, not
# the application.
- if not d.getVar('INHIBIT_DEFAULT_DEPS'):
+ if not d.getVar('INHIBIT_DEFAULT_DEPS', False):
return "icecc-create-env-native"
return ""
DEPENDS_prepend += "${@icecc_dep_prepend(d)} "
def get_cross_kernel_cc(bb,d):
- kernel_cc = d.getVar('KERNEL_CC')
+ kernel_cc = d.getVar('KERNEL_CC', False)
# evaluate the expression by the shell if necessary
if '`' in kernel_cc or '$(' in kernel_cc:
return kernel_cc
def get_icecc(d):
- return d.getVar('ICECC_PATH') or bb.utils.which(os.getenv("PATH"), "icecc")
+ return d.getVar('ICECC_PATH', False) or bb.utils.which(os.getenv("PATH"), "icecc")
def create_path(compilers, bb, d):
"""
return staging
def use_icc(bb,d):
- if d.getVar('ICECC_DISABLED') == "1":
+ if d.getVar('ICECC_DISABLED', False) == "1":
# don't even try it, when explicitly disabled
return "no"
pn = d.getVar('PN', True)
system_class_blacklist = []
- user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL') or "none").split()
+ user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL', False) or "none").split()
package_class_blacklist = system_class_blacklist + user_class_blacklist
for black in package_class_blacklist:
# e.g. when there is new version
# building libgcc-initial with icecc fails with CPP sanity check error if host sysroot contains cross gcc built for another target tune/variant
system_package_blacklist = ["libgcc-initial"]
- user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL') or "").split()
- user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL') or "").split()
+ user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL', False) or "").split()
+ user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL', False) or "").split()
package_blacklist = system_package_blacklist + user_package_blacklist
if pn in package_blacklist:
bb.debug(1, "%s: found in whitelist, enable icecc" % pn)
return "yes"
- if d.getVar('PARALLEL_MAKE') == "":
+ if d.getVar('PARALLEL_MAKE', False) == "":
bb.debug(1, "%s: has empty PARALLEL_MAKE, disable icecc" % pn)
return "no"
return "yes"
def icc_is_allarch(bb, d):
- return d.getVar("PACKAGE_ARCH") == "all"
+ return d.getVar("PACKAGE_ARCH", False) == "all"
def icc_is_kernel(bb, d):
return \
if use_icc(bb, d) == "no":
return ""
- parallel = d.getVar('ICECC_PARALLEL_MAKE') or ""
- if not d.getVar('PARALLEL_MAKE') == "" and parallel:
+ parallel = d.getVar('ICECC_PARALLEL_MAKE', False) or ""
+ if not d.getVar('PARALLEL_MAKE', False) == "" and parallel:
d.setVar("PARALLEL_MAKE", parallel)
if icc_is_native(bb, d):
prefix = d.expand('${HOST_PREFIX}' )
distro = d.expand('${DISTRO}')
target_sys = d.expand('${TARGET_SYS}')
- float = d.getVar('TARGET_FPU') or "hard"
+ float = d.getVar('TARGET_FPU', False) or "hard"
archive_name = prefix + distro + "-" + target_sys + "-" + float
if icc_is_kernel(bb, d):
archive_name += "-kernel"
python () {
variables = command_variables(d)
for var in variables:
- if d.getVar(var):
+ if d.getVar(var, False):
d.setVarFlag(var, 'func', '1')
}
for pak in packages:
# Go through all variables and check if expanded D is found, warn the user accordingly
for var in 'FILES','pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm':
- bbvar = d.getVar(var + "_" + pak)
+ bbvar = d.getVar(var + "_" + pak, False)
if bbvar:
# Bitbake expands ${D} within bbvar during the previous step, so we check for its expanded value
if expanded_d in bbvar:
for dep in (d.getVar('QADEPENDS', True) or "").split():
d.appendVarFlag('do_package_qa', 'depends', " %s:do_populate_sysroot" % dep)
for var in 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RCONFLICTS', 'RPROVIDES', 'RREPLACES', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm', 'ALLOW_EMPTY':
- if d.getVar(var):
+ if d.getVar(var, False):
issues.append(var)
else:
d.setVarFlag('do_package_qa', 'rdeptask', '')
do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern=bpn+'-localedata-%s', \
description='locale definition for %s', hook=calc_locale_deps, extra_depends='')
- d.setVar('PACKAGES', d.getVar('PACKAGES') + ' ' + d.getVar('MLPREFIX') + bpn + '-gconv')
+ d.setVar('PACKAGES', d.getVar('PACKAGES', False) + ' ' + d.getVar('MLPREFIX', False) + bpn + '-gconv')
use_bin = d.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", True)
bb.note("generating locale %s (%s)" % (locale, encoding))
def output_locale(name, locale, encoding):
- pkgname = d.getVar('MLPREFIX') + 'locale-base-' + legitimize_package_name(name)
+ pkgname = d.getVar('MLPREFIX', False) + 'locale-base-' + legitimize_package_name(name)
d.setVar('ALLOW_EMPTY_%s' % pkgname, '1')
d.setVar('PACKAGES', '%s %s' % (pkgname, d.getVar('PACKAGES', True)))
rprovides = ' %svirtual-locale-%s' % (mlprefix, legitimize_package_name(name))
packages = d.getVar('PACKAGES', True)
files = d.getVar('LICENSE_FILES_DIRECTORY', True)
pn = d.getVar('PN', True)
- pn_lic = "%s%s" % (pn, d.getVar('LICENSE_PACKAGE_SUFFIX'))
+ pn_lic = "%s%s" % (pn, d.getVar('LICENSE_PACKAGE_SUFFIX', False))
if pn_lic in packages:
bb.warn("%s package already existed in %s." % (pn_lic, pn))
else:
spdxflags = fnmatch.filter(spdxmapkeys, wld_lic)
licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags]
- spdx_lics = (d.getVar('SRC_DISTRIBUTE_LICENSES') or '').split()
+ spdx_lics = (d.getVar('SRC_DISTRIBUTE_LICENSES', False) or '').split()
for wld_lic in wildcard_licenses:
licenses += fnmatch.filter(spdx_lics, wld_lic)
##############################
# Test that DESCRIPTION exists
#
- description = d.getVar("DESCRIPTION")
+ description = d.getVar("DESCRIPTION", False)
if description[1:10] == '{SUMMARY}':
bb.warn("%s: DESCRIPTION is not set" % pkgname)
##############################
# Test that HOMEPAGE exists
#
- homepage = d.getVar("HOMEPAGE")
+ homepage = d.getVar("HOMEPAGE", False)
if homepage == '':
bb.warn("%s: HOMEPAGE is not set" % pkgname)
elif not homepage.startswith("http://") and not homepage.startswith("https://"):
##############################
# Test for valid SECTION
#
- section = d.getVar("SECTION")
+ section = d.getVar("SECTION", False)
if section == '':
bb.warn("%s: SECTION is not set" % pkgname)
elif not section.islower():
##############################
# Check that all patches have Signed-off-by and Upstream-Status
#
- srcuri = d.getVar("SRC_URI").split()
+ srcuri = d.getVar("SRC_URI", False).split()
fpaths = (d.getVar('FILESPATH', True) or '').split(':')
def findPatch(patchname):
if not s.startswith("file://"):
checkPN(pkgname, 'SRC_URI', s)
- checkPN(pkgname, 'S', d.getVar('S'))
+ checkPN(pkgname, 'S', d.getVar('S', False))
}
def get_package_additional_metadata (pkg_type, d):
base_key = "PACKAGE_ADD_METADATA"
for key in ("%s_%s" % (base_key, pkg_type.upper()), base_key):
- if d.getVar(key) is None:
+ if d.getVar(key, False) is None:
continue
d.setVarFlag(key, "type", "list")
if d.getVarFlag(key, "separator") is None:
python package_fixsymlinks () {
import errno
pkgdest = d.getVar('PKGDEST', True)
- packages = d.getVar("PACKAGES").split()
+ packages = d.getVar("PACKAGES", False).split()
dangling_links = {}
pkg_files = {}
cleanupcontrol(root)
from glob import glob
g = glob('*')
- if not g and localdata.getVar('ALLOW_EMPTY') != "1":
+ if not g and localdata.getVar('ALLOW_EMPTY', False) != "1":
bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', True), localdata.getVar('PKGR', True)))
bb.utils.unlockfile(lf)
continue
try:
for (c, fs) in fields:
for f in fs:
- if localdata.getVar(f) is None:
+ if localdata.getVar(f, False) is None:
raise KeyError(f)
# Special behavior for description...
if 'DESCRIPTION' in fs:
basedir = os.path.join(os.path.dirname(root))
arch = localdata.getVar('PACKAGE_ARCH', True)
- if localdata.getVar('IPK_HIERARCHICAL_FEED') == "1":
+ if localdata.getVar('IPK_HIERARCHICAL_FEED', False) == "1":
# Spread packages across subdirectories so each isn't too crowded
if pkgname.startswith('lib'):
pkg_prefix = 'lib' + pkgname[3]
cleanupcontrol(root)
from glob import glob
g = glob('*')
- if not g and localdata.getVar('ALLOW_EMPTY') != "1":
+ if not g and localdata.getVar('ALLOW_EMPTY', False) != "1":
bb.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', True), localdata.getVar('PKGR', True)))
bb.utils.unlockfile(lf)
continue
try:
for (c, fs) in fields:
for f in fs:
- if localdata.getVar(f) is None:
+ if localdata.getVar(f, False) is None:
raise KeyError(f)
# Special behavior for description...
if 'DESCRIPTION' in fs:
file_list = []
walk_files(root, file_list, conffiles, dirfiles)
- if not file_list and localdata.getVar('ALLOW_EMPTY') != "1":
+ if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1":
bb.note("Not creating empty RPM package for %s" % splitname)
else:
bb.note("Creating RPM package for %s" % splitname)
# Now process files
file_list = []
walk_files(root, file_list, conffiles, dirfiles)
- if not file_list and localdata.getVar('ALLOW_EMPTY') != "1":
+ if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1":
bb.note("Not creating empty RPM package for %s" % splitname)
else:
spec_files_bottom.append('%%files -n %s' % splitname)
localdata = bb.data.createCopy(d)
root = "%s/%s" % (pkgdest, pkg)
- overrides = localdata.getVar('OVERRIDES')
+ overrides = localdata.getVar('OVERRIDES', False)
localdata.setVar('OVERRIDES', '%s:%s' % (overrides, pkg))
bb.data.update_data(localdata)
f.write('# this configuration provides, it is strongly suggested that you set\n')
f.write('# up a proper instance of the full build system and use that instead.\n\n')
- f.write('LCONF_VERSION = "%s"\n\n' % d.getVar('LCONF_VERSION'))
+ f.write('LCONF_VERSION = "%s"\n\n' % d.getVar('LCONF_VERSION', False))
f.write('BBPATH = "$' + '{TOPDIR}"\n')
f.write('SDKBASEMETAPATH = "$' + '{TOPDIR}"\n')
f.write('BBLAYERS := " \\\n')
f.write('# up a proper instance of the full build system and use that instead.\n\n')
f.write('INHERIT += "%s"\n\n' % 'uninative')
- f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION'))
+ f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION', False))
# This is a bit of a hack, but we really don't want these dependencies
# (we're including them in the SDK as nativesdk- versions instead)
if isinstance(e, bb.event.BuildStarted):
data = {}
- machine = e.data.getVar("MACHINE")
+ machine = e.data.getVar("MACHINE", False)
data['machine'] = machine
data['build_sys'] = e.data.getVar("BUILD_SYS", True)
- data['nativelsb'] = e.data.getVar("NATIVELSBSTRING")
- data['distro'] = e.data.getVar("DISTRO")
+ data['nativelsb'] = e.data.getVar("NATIVELSBSTRING", False)
+ data['distro'] = e.data.getVar("DISTRO", False)
data['target_sys'] = e.data.getVar("TARGET_SYS", True)
data['failures'] = []
data['component'] = e.getPkgs()[0]
jsondata = json.loads(errorreport_getdata(e))
failures = jsondata['failures']
if(len(failures) > 0):
- filename = "error_report_" + e.data.getVar("BUILDNAME")+".txt"
+ filename = "error_report_" + e.data.getVar("BUILDNAME", False)+".txt"
datafile = errorreport_savedata(e, jsondata, filename)
bb.note("The errors for this build are stored in %s\nYou can send the errors to a reports server by running:\n send-error-report %s [-s server]" % (datafile, datafile))
bb.note("The contents of these logs will be posted in public if you use the above command with the default server. Please ensure you remove any identifying or proprietary information when prompted before sending.")
def check_conf_exists(fn, data):
bbpath = []
fn = data.expand(fn)
- vbbpath = data.getVar("BBPATH")
+ vbbpath = data.getVar("BBPATH", False)
if vbbpath:
bbpath += vbbpath.split(":")
for p in bbpath:
python () {
if bb.data.inherits_class('native', d):
- d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH'))
+ d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH', False))
elif bb.data.inherits_class('crosssdk', d):
d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}"))
elif bb.data.inherits_class('cross', d):
import glob
d = e.data
stamps = e.stamps.values()
- removeworkdir = (d.getVar("SSTATE_PRUNE_OBSOLETEWORKDIR") == "1")
+ removeworkdir = (d.getVar("SSTATE_PRUNE_OBSOLETEWORKDIR", False) == "1")
seen = []
for a in d.getVar("SSTATE_ARCHS", True).split():
toremove = []
provider = d.getVar('VIRTUAL-RUNTIME_update-alternatives', True)
if provider:
#bb.note('adding runtime requirement for update-alternatives for %s' % pkg)
- d.appendVar('RDEPENDS_%s' % pkg, ' ' + d.getVar('MLPREFIX') + provider)
+ d.appendVar('RDEPENDS_%s' % pkg, ' ' + d.getVar('MLPREFIX', False) + provider)
bb.note('adding update-alternatives calls to postinst/prerm for %s' % pkg)
bb.note('%s' % alt_setup_links)
def update_rc_after_parse(d):
- if d.getVar('INITSCRIPT_PACKAGES') == None:
- if d.getVar('INITSCRIPT_NAME') == None:
- raise bb.build.FuncFailed("%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % d.getVar('FILE'))
- if d.getVar('INITSCRIPT_PARAMS') == None:
- raise bb.build.FuncFailed("%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % d.getVar('FILE'))
+ if d.getVar('INITSCRIPT_PACKAGES', False) == None:
+ if d.getVar('INITSCRIPT_NAME', False) == None:
+ raise bb.build.FuncFailed("%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % d.getVar('FILE', False))
+ if d.getVar('INITSCRIPT_PARAMS', False) == None:
+ raise bb.build.FuncFailed("%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % d.getVar('FILE', False))
python __anonymous() {
update_rc_after_parse(d)
useradd_packages = d.getVar('USERADD_PACKAGES', True)
if not useradd_packages:
- raise bb.build.FuncFailed("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE'))
+ raise bb.build.FuncFailed("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE', False))
for pkg in useradd_packages.split():
if not d.getVar('USERADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPMEMS_PARAM_%s' % pkg, True):
- bb.fatal("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or GROUPMEMS_PARAM for package %s" % (d.getVar('FILE'), pkg))
+ bb.fatal("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or GROUPMEMS_PARAM for package %s" % (d.getVar('FILE', False), pkg))
python __anonymous() {
if not bb.data.inherits_class('nativesdk', d) \
# RDEPENDS setup
rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
- rdepends += ' ' + d.getVar('MLPREFIX') + 'base-passwd'
- rdepends += ' ' + d.getVar('MLPREFIX') + 'shadow'
+ rdepends += ' ' + d.getVar('MLPREFIX', False) + 'base-passwd'
+ rdepends += ' ' + d.getVar('MLPREFIX', False) + 'shadow'
# base-files is where the default /etc/skel is packaged
- rdepends += ' ' + d.getVar('MLPREFIX') + 'base-files'
+ rdepends += ' ' + d.getVar('MLPREFIX', False) + 'base-files'
d.setVar("RDEPENDS_%s" % pkg, rdepends)
# Add the user/group preinstall scripts and RDEPENDS requirements
bb.note("Removing " + dir)
oe.path.remove(dir)
- dir = "%s.*" % bb.data.expand(d.getVar('STAMP'), d)
+ dir = "%s.*" % bb.data.expand(d.getVar('STAMP', False), d)
bb.note("Removing " + dir)
oe.path.remove(dir)
# Package default variables.
##################################################################
-PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}"
-PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}"
-PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[2] or 'r0'}"
+PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
+PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
+PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}"
PF = "${PN}-${EXTENDPE}${PV}-${PR}"
-EXTENDPE = "${@['','${PE\x7d_'][int(d.getVar('PE',1) or 0) > 0]}"
+EXTENDPE = "${@['','${PE\x7d_'][int(d.getVar('PE', True) or 0) > 0]}"
P = "${PN}-${PV}"
-EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO',1) is None]}"
+EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO', True) is None]}"
PRAUTOINX = "${PF}"
PKGV ?= "${PV}"
PKGR ?= "${PR}${EXTENDPRAUTO}"
-PKGE ?= "${@['','${PE\x7d'][int(d.getVar('PE',1) or 0) > 0]}"
-EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE',1).strip() != '']}"
+PKGE ?= "${@['','${PE\x7d'][int(d.getVar('PE', True) or 0) > 0]}"
+EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE', True).strip() != '']}"
EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}"
# Base package name
# File manifest
-FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE'))}"
+FILE_DIRNAME = "${@os.path.dirname(d.getVar('FILE', False))}"
# FILESPATH is set in base.bbclass
#FILESPATH = "${FILE_DIRNAME}/${PF}:${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/${BP}:${FILE_DIRNAME}/${BPN}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
# This default was only used for checking
return
def save_rpmpostinst(self, pkg):
- mlibs = (self.d.getVar('MULTILIB_GLOBAL_VARIANTS') or "").split()
+ mlibs = (self.d.getVar('MULTILIB_GLOBAL_VARIANTS', False) or "").split()
new_pkg = pkg
# Remove any multilib prefix from the package name
# test rootfs + kernel
self.image_fstype = self.get_image_fstype(d)
self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype)
- self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE") + '-' + d.getVar('MACHINE') + '.bin')
+ self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin')
if not os.path.isfile(self.rootfs):
# we could've checked that IMAGE_FSTYPES contains tar.gz but the config for running testimage might not be
# the same as the config with which the image was build, ie
# e.g: TEST_POWERCONTROL_CMD = "/home/user/myscripts/powercontrol.py ${MACHINE} what-ever-other-args-the-script-wants"
# the command should take as the last argument "off" and "on" and "cycle" (off, on)
self.powercontrol_cmd = d.getVar("TEST_POWERCONTROL_CMD", True) or None
- self.powercontrol_args = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS") or ""
+ self.powercontrol_args = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS", False) or ""
self.serialcontrol_cmd = d.getVar("TEST_SERIALCONTROL_CMD", True) or None
- self.serialcontrol_args = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS") or ""
+ self.serialcontrol_args = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS", False) or ""
self.origenv = os.environ
if self.powercontrol_cmd or self.serialcontrol_cmd:
class SkeletonBasicTest(oeRuntimeTest):
@skipUnlessPassed('test_ssh')
- @unittest.skipIf("systemd" == oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager"), "Not appropiate for systemd image")
+ @unittest.skipIf("systemd" == oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", False), "Not appropiate for systemd image")
def test_skeleton_availability(self):
(status, output) = self.target.run('ls /etc/init.d/skeleton')
self.assertEqual(status, 0, msg = "skeleton init script not found. Output:\n%s " % output)
@testcase(284)
@skipUnlessPassed('test_skeleton_availability')
- @unittest.skipIf("systemd" == oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager"), "Not appropiate for systemd image")
+ @unittest.skipIf("systemd" == oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", False), "Not appropiate for systemd image")
def test_skeleton_script(self):
output1 = self.target.run("/etc/init.d/skeleton start")[1]
(status, output2) = self.target.run(oeRuntimeTest.pscmd + ' | grep [s]keleton-test')
@skipUnlessPassed("test_syslog_running")
def test_syslog_restart(self):
- if "systemd" != oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager"):
+ if "systemd" != oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", False):
(status,output) = self.target.run('/etc/init.d/syslog restart')
else:
(status,output) = self.target.run('systemctl restart syslog.service')
@testcase(202)
@skipUnlessPassed("test_syslog_restart")
@skipUnlessPassed("test_syslog_logger")
- @unittest.skipIf("systemd" == oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager"), "Not appropiate for systemd image")
+ @unittest.skipIf("systemd" == oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", False), "Not appropiate for systemd image")
def test_syslog_startup_config(self):
self.target.run('echo "LOGFILE=/var/log/test" >> /etc/syslog-startup.conf')
(status,output) = self.target.run('/etc/init.d/syslog restart')
self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % self.datetime)
self.origrootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype)
self.rootfs = os.path.join(self.testdir, d.getVar("IMAGE_LINK_NAME", True) + '-testimage.' + self.image_fstype)
- self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE") + '-' + d.getVar('MACHINE') + '.bin')
+ self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin')
if d.getVar("DISTRO", True) == "poky-tiny":
self.runner = QemuTinyRunner(machine=d.getVar("MACHINE", True),
# if packaged('%s-dev' % name, d):
# rreclist.append('%s-dev' % name)
#
-# oldrrec = d.getVar('RRECOMMENDS_%s' % newpkg) or ''
+# oldrrec = d.getVar('RRECOMMENDS_%s' % newpkg, False) or ''
# d.setVar('RRECOMMENDS_%s' % newpkg, oldrrec + ' ' + ' '.join(rreclist))
-# # bb.note('RRECOMMENDS_%s = "%s"' % (newpkg, d.getVar('RRECOMMENDS_%s' % newpkg)))
+# # bb.note('RRECOMMENDS_%s = "%s"' % (newpkg, d.getVar('RRECOMMENDS_%s' % newpkg, False)))
#
# # bb.note('pkgs is %s' % pkgs)
# d.setVar('PACKAGES', ' '.join(pkgs))
python do_unpack () {
# temporarily change S for unpack
# of lsof_${PV}
- s = d.getVar('S')
+ s = d.getVar('S', False)
d.setVar('S', '${WORKDIR}/lsof_${PV}')
bb.build.exec_func('base_do_unpack', d)
# temporarily change SRC_URI for unpack
# of lsof_${PV}_src
- src_uri = d.getVar('SRC_URI')
+ src_uri = d.getVar('SRC_URI', False)
d.setVar('SRC_URI', '${LOCALSRC}')
d.setVar('S', s)
bb.build.exec_func('base_do_unpack', d)
"
def get_libqt3(d):
- if 'linuxstdbase' in d.getVar('DISTROOVERRIDES') or "":
- if 'qt3' in d.getVar('BBFILE_COLLECTIONS') or "":
+ if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) or "":
+ if 'qt3' in d.getVar('BBFILE_COLLECTIONS', False) or "":
return 'libqt-mt3'
bb.warn('The meta-qt3 layer should be added, this layer provides Qt 3.x' \
do_split_packages(d, plugin_dir, glob, plugin_name, '${PN} %s for %%s' % name, extra_depends='', hook=dev_hook)
# Create a -dbg package as well
plugin_dir_dbg = d.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/.debug' % path)
- packages = d.getVar('PACKAGES')
+ packages = d.getVar('PACKAGES', False)
for (file,package) in dev_packages:
packages = "%s %s-dbg" % (packages, package)
file_name = os.path.join(plugin_dir_dbg, os.path.basename(file))
python() {
if incompatible_license_contains("GPLv3", "x", "", d) == "x" or bb.utils.contains("DISTRO_FEATURES", "x11", "x", "", d) == "":
- d.setVar("EXTRA_OECMAKE", d.getVar("EXTRA_OECMAKE").replace("-DWITH_GNOME=yes", "-DWITH_GNOME=no"))
- d.setVar("DEPENDS", " ".join(i for i in d.getVar("DEPENDS").split() if i != "gconf"))
+ d.setVar("EXTRA_OECMAKE", d.getVar("EXTRA_OECMAKE", False).replace("-DWITH_GNOME=yes", "-DWITH_GNOME=no"))
+ d.setVar("DEPENDS", " ".join(i for i in d.getVar("DEPENDS", False).split() if i != "gconf"))
}