1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 12:49:46 +00:00

meta: Add explict getVar param for (non) expansion

Rather than just use d.getVar(X), use the more explict d.getVar(X, False)
since at some point in the future, having the default of expansion would
be nice. This is the first step towards that.

This patch was mostly made using the command:

sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *`

(From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2015-06-18 15:14:16 +01:00
parent f98c849009
commit 86d30d756a
39 changed files with 93 additions and 93 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ PACKAGE_ARCH = "all"
python () { python () {
# Allow this class to be included but overridden - only set # Allow this class to be included but overridden - only set
# the values if we're still "all" package arch. # 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 # No need for virtual/libc or a cross compiler
d.setVar("INHIBIT_DEFAULT_DEPS","1") d.setVar("INHIBIT_DEFAULT_DEPS","1")
+1 -1
View File
@@ -136,7 +136,7 @@ ACLOCALDIR = "${B}/aclocal-copy"
python autotools_copy_aclocals () { python autotools_copy_aclocals () {
s = d.getVar("S", True) s = d.getVar("S", True)
if not os.path.exists(s + "/configure.in") and not os.path.exists(s + "/configure.ac"): 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 return
taskdepdata = d.getVar("BB_TASKDEPDATA", False) taskdepdata = d.getVar("BB_TASKDEPDATA", False)
+1 -1
View File
@@ -71,7 +71,7 @@ def base_dep_prepend(d):
# INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not # 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 # we need that built is the responsibility of the patch function / class, not
# the application. # 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)): if (d.getVar('HOST_SYS', True) != d.getVar('BUILD_SYS', True)):
deps += " virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc " deps += " virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc "
return deps return deps
+1 -1
View File
@@ -29,7 +29,7 @@ do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
mtools-native:do_populate_sysroot \ mtools-native:do_populate_sysroot \
cdrtools-native:do_populate_sysroot \ cdrtools-native:do_populate_sysroot \
virtual/kernel:do_deploy \ 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 = " " PACKAGES = " "
EXCLUDE_FROM_WORLD = "1" EXCLUDE_FROM_WORLD = "1"
+1 -1
View File
@@ -64,7 +64,7 @@ def process_dir (rootdir, directory, d):
rootdir = os.path.normpath(rootdir) rootdir = os.path.normpath(rootdir)
cmd = d.expand('${CHRPATH_BIN}') 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}')) baseprefix = os.path.normpath(d.expand('${base_prefix}'))
hostos = d.getVar("HOST_OS", True) hostos = d.getVar("HOST_OS", True)
+3 -3
View File
@@ -53,7 +53,7 @@ python debian_package_name_hook () {
return (s[stat.ST_MODE] & stat.S_IEXEC) return (s[stat.ST_MODE] & stat.S_IEXEC)
def add_rprovides(pkg, d): def add_rprovides(pkg, d):
newpkg = d.getVar('PKG_' + pkg) newpkg = d.getVar('PKG_' + pkg, False)
if newpkg and newpkg != pkg: if newpkg and newpkg != pkg:
provs = (d.getVar('RPROVIDES_' + pkg, True) or "").split() provs = (d.getVar('RPROVIDES_' + pkg, True) or "").split()
if pkg not in provs: if pkg not in provs:
@@ -105,10 +105,10 @@ python debian_package_name_hook () {
if soname_result: if soname_result:
(pkgname, devname) = soname_result (pkgname, devname) = soname_result
for pkg in packages.split(): 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) add_rprovides(pkg, d)
continue continue
debian_pn = d.getVar('DEBIANNAME_' + pkg) debian_pn = d.getVar('DEBIANNAME_' + pkg, False)
if debian_pn: if debian_pn:
newpkg = debian_pn newpkg = debian_pn
elif pkg == orig_pkg: elif pkg == orig_pkg:
+1 -1
View File
@@ -66,5 +66,5 @@ python populate_packages_append () {
prerm = '#!/bin/sh\n' prerm = '#!/bin/sh\n'
prerm += d.getVar('gconf_prerm', True) prerm += d.getVar('gconf_prerm', True)
d.setVar('pkg_prerm_%s' % pkg, prerm) 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')
} }
+1 -1
View File
@@ -42,7 +42,7 @@ python populate_packages_append () {
continue continue
bb.note("adding hicolor-icon-theme dependency to %s" % pkg) 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) d.appendVar('RDEPENDS_%s' % pkg, rdepends)
bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg) bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg)
+2 -2
View File
@@ -75,9 +75,9 @@ python populate_packages_append () {
python __anonymous() { python __anonymous() {
if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): 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: 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) raise bb.build.FuncFailed("ERROR: %s inherits gtk-immodules-cache but doesn't set GTKIMMODULES_PACKAGES" % bb_filename)
} }
+12 -12
View File
@@ -36,14 +36,14 @@ def icecc_dep_prepend(d):
# INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not # 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 # we need that built is the responsibility of the patch function / class, not
# the application. # the application.
if not d.getVar('INHIBIT_DEFAULT_DEPS'): if not d.getVar('INHIBIT_DEFAULT_DEPS', False):
return "icecc-create-env-native" return "icecc-create-env-native"
return "" return ""
DEPENDS_prepend += "${@icecc_dep_prepend(d)} " DEPENDS_prepend += "${@icecc_dep_prepend(d)} "
def get_cross_kernel_cc(bb,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 # evaluate the expression by the shell if necessary
if '`' in kernel_cc or '$(' in kernel_cc: if '`' in kernel_cc or '$(' in kernel_cc:
@@ -56,7 +56,7 @@ def get_cross_kernel_cc(bb,d):
return kernel_cc return kernel_cc
def get_icecc(d): 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): def create_path(compilers, bb, d):
""" """
@@ -91,7 +91,7 @@ def create_path(compilers, bb, d):
return staging return staging
def use_icc(bb,d): 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 # don't even try it, when explicitly disabled
return "no" return "no"
@@ -102,7 +102,7 @@ def use_icc(bb,d):
pn = d.getVar('PN', True) pn = d.getVar('PN', True)
system_class_blacklist = [] 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 package_class_blacklist = system_class_blacklist + user_class_blacklist
for black in package_class_blacklist: for black in package_class_blacklist:
@@ -119,8 +119,8 @@ def use_icc(bb,d):
# e.g. when there is new version # 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 # 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"] system_package_blacklist = ["libgcc-initial"]
user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL') or "").split() user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL', False) or "").split()
user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL') or "").split() user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL', False) or "").split()
package_blacklist = system_package_blacklist + user_package_blacklist package_blacklist = system_package_blacklist + user_package_blacklist
if pn in package_blacklist: if pn in package_blacklist:
@@ -131,14 +131,14 @@ def use_icc(bb,d):
bb.debug(1, "%s: found in whitelist, enable icecc" % pn) bb.debug(1, "%s: found in whitelist, enable icecc" % pn)
return "yes" return "yes"
if d.getVar('PARALLEL_MAKE') == "": if d.getVar('PARALLEL_MAKE', False) == "":
bb.debug(1, "%s: has empty PARALLEL_MAKE, disable icecc" % pn) bb.debug(1, "%s: has empty PARALLEL_MAKE, disable icecc" % pn)
return "no" return "no"
return "yes" return "yes"
def icc_is_allarch(bb, d): 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): def icc_is_kernel(bb, d):
return \ return \
@@ -155,8 +155,8 @@ def icc_version(bb, d):
if use_icc(bb, d) == "no": if use_icc(bb, d) == "no":
return "" return ""
parallel = d.getVar('ICECC_PARALLEL_MAKE') or "" parallel = d.getVar('ICECC_PARALLEL_MAKE', False) or ""
if not d.getVar('PARALLEL_MAKE') == "" and parallel: if not d.getVar('PARALLEL_MAKE', False) == "" and parallel:
d.setVar("PARALLEL_MAKE", parallel) d.setVar("PARALLEL_MAKE", parallel)
if icc_is_native(bb, d): if icc_is_native(bb, d):
@@ -167,7 +167,7 @@ def icc_version(bb, d):
prefix = d.expand('${HOST_PREFIX}' ) prefix = d.expand('${HOST_PREFIX}' )
distro = d.expand('${DISTRO}') distro = d.expand('${DISTRO}')
target_sys = d.expand('${TARGET_SYS}') 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 archive_name = prefix + distro + "-" + target_sys + "-" + float
if icc_is_kernel(bb, d): if icc_is_kernel(bb, d):
archive_name += "-kernel" archive_name += "-kernel"
+1 -1
View File
@@ -100,7 +100,7 @@ def command_variables(d):
python () { python () {
variables = command_variables(d) variables = command_variables(d)
for var in variables: for var in variables:
if d.getVar(var): if d.getVar(var, False):
d.setVarFlag(var, 'func', '1') d.setVarFlag(var, 'func', '1')
} }
+2 -2
View File
@@ -934,7 +934,7 @@ def package_qa_check_expanded_d(path,name,d,elf,messages):
for pak in packages: for pak in packages:
# Go through all variables and check if expanded D is found, warn the user accordingly # 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': 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: if bbvar:
# Bitbake expands ${D} within bbvar during the previous step, so we check for its expanded value # Bitbake expands ${D} within bbvar during the previous step, so we check for its expanded value
if expanded_d in bbvar: if expanded_d in bbvar:
@@ -1185,7 +1185,7 @@ python () {
for dep in (d.getVar('QADEPENDS', True) or "").split(): for dep in (d.getVar('QADEPENDS', True) or "").split():
d.appendVarFlag('do_package_qa', 'depends', " %s:do_populate_sysroot" % dep) 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': 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) issues.append(var)
else: else:
d.setVarFlag('do_package_qa', 'rdeptask', '') d.setVarFlag('do_package_qa', 'rdeptask', '')
+2 -2
View File
@@ -204,7 +204,7 @@ python package_do_split_gconvs () {
do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern=bpn+'-localedata-%s', \ do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern=bpn+'-localedata-%s', \
description='locale definition for %s', hook=calc_locale_deps, extra_depends='') 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) use_bin = d.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", True)
@@ -310,7 +310,7 @@ python package_do_split_gconvs () {
bb.note("generating locale %s (%s)" % (locale, encoding)) bb.note("generating locale %s (%s)" % (locale, encoding))
def output_locale(name, 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('ALLOW_EMPTY_%s' % pkgname, '1')
d.setVar('PACKAGES', '%s %s' % (pkgname, d.getVar('PACKAGES', True))) d.setVar('PACKAGES', '%s %s' % (pkgname, d.getVar('PACKAGES', True)))
rprovides = ' %svirtual-locale-%s' % (mlprefix, legitimize_package_name(name)) rprovides = ' %svirtual-locale-%s' % (mlprefix, legitimize_package_name(name))
+2 -2
View File
@@ -160,7 +160,7 @@ def add_package_and_files(d):
packages = d.getVar('PACKAGES', True) packages = d.getVar('PACKAGES', True)
files = d.getVar('LICENSE_FILES_DIRECTORY', True) files = d.getVar('LICENSE_FILES_DIRECTORY', True)
pn = d.getVar('PN', 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: if pn_lic in packages:
bb.warn("%s package already existed in %s." % (pn_lic, pn)) bb.warn("%s package already existed in %s." % (pn_lic, pn))
else: else:
@@ -348,7 +348,7 @@ def expand_wildcard_licenses(d, wildcard_licenses):
spdxflags = fnmatch.filter(spdxmapkeys, wld_lic) spdxflags = fnmatch.filter(spdxmapkeys, wld_lic)
licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags] 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: for wld_lic in wildcard_licenses:
licenses += fnmatch.filter(spdx_lics, wld_lic) licenses += fnmatch.filter(spdx_lics, wld_lic)
+5 -5
View File
@@ -6,7 +6,7 @@ python do_lint() {
############################## ##############################
# Test that DESCRIPTION exists # Test that DESCRIPTION exists
# #
description = d.getVar("DESCRIPTION") description = d.getVar("DESCRIPTION", False)
if description[1:10] == '{SUMMARY}': if description[1:10] == '{SUMMARY}':
bb.warn("%s: DESCRIPTION is not set" % pkgname) bb.warn("%s: DESCRIPTION is not set" % pkgname)
@@ -14,7 +14,7 @@ python do_lint() {
############################## ##############################
# Test that HOMEPAGE exists # Test that HOMEPAGE exists
# #
homepage = d.getVar("HOMEPAGE") homepage = d.getVar("HOMEPAGE", False)
if homepage == '': if homepage == '':
bb.warn("%s: HOMEPAGE is not set" % pkgname) bb.warn("%s: HOMEPAGE is not set" % pkgname)
elif not homepage.startswith("http://") and not homepage.startswith("https://"): elif not homepage.startswith("http://") and not homepage.startswith("https://"):
@@ -24,7 +24,7 @@ python do_lint() {
############################## ##############################
# Test for valid SECTION # Test for valid SECTION
# #
section = d.getVar("SECTION") section = d.getVar("SECTION", False)
if section == '': if section == '':
bb.warn("%s: SECTION is not set" % pkgname) bb.warn("%s: SECTION is not set" % pkgname)
elif not section.islower(): elif not section.islower():
@@ -34,7 +34,7 @@ python do_lint() {
############################## ##############################
# Check that all patches have Signed-off-by and Upstream-Status # 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(':') fpaths = (d.getVar('FILESPATH', True) or '').split(':')
def findPatch(patchname): def findPatch(patchname):
@@ -80,5 +80,5 @@ python do_lint() {
if not s.startswith("file://"): if not s.startswith("file://"):
checkPN(pkgname, 'SRC_URI', s) checkPN(pkgname, 'SRC_URI', s)
checkPN(pkgname, 'S', d.getVar('S')) checkPN(pkgname, 'S', d.getVar('S', False))
} }
+2 -2
View File
@@ -425,7 +425,7 @@ def get_package_mapping (pkg, basepkg, d):
def get_package_additional_metadata (pkg_type, d): def get_package_additional_metadata (pkg_type, d):
base_key = "PACKAGE_ADD_METADATA" base_key = "PACKAGE_ADD_METADATA"
for key in ("%s_%s" % (base_key, pkg_type.upper()), base_key): 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 continue
d.setVarFlag(key, "type", "list") d.setVarFlag(key, "type", "list")
if d.getVarFlag(key, "separator") is None: if d.getVarFlag(key, "separator") is None:
@@ -1154,7 +1154,7 @@ populate_packages[dirs] = "${D}"
python package_fixsymlinks () { python package_fixsymlinks () {
import errno import errno
pkgdest = d.getVar('PKGDEST', True) pkgdest = d.getVar('PKGDEST', True)
packages = d.getVar("PACKAGES").split() packages = d.getVar("PACKAGES", False).split()
dangling_links = {} dangling_links = {}
pkg_files = {} pkg_files = {}
+2 -2
View File
@@ -87,7 +87,7 @@ python do_package_deb () {
cleanupcontrol(root) cleanupcontrol(root)
from glob import glob from glob import glob
g = 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.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', True), localdata.getVar('PKGR', True)))
bb.utils.unlockfile(lf) bb.utils.unlockfile(lf)
continue continue
@@ -144,7 +144,7 @@ python do_package_deb () {
try: try:
for (c, fs) in fields: for (c, fs) in fields:
for f in fs: for f in fs:
if localdata.getVar(f) is None: if localdata.getVar(f, False) is None:
raise KeyError(f) raise KeyError(f)
# Special behavior for description... # Special behavior for description...
if 'DESCRIPTION' in fs: if 'DESCRIPTION' in fs:
+3 -3
View File
@@ -64,7 +64,7 @@ python do_package_ipk () {
basedir = os.path.join(os.path.dirname(root)) basedir = os.path.join(os.path.dirname(root))
arch = localdata.getVar('PACKAGE_ARCH', True) 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 # Spread packages across subdirectories so each isn't too crowded
if pkgname.startswith('lib'): if pkgname.startswith('lib'):
pkg_prefix = 'lib' + pkgname[3] pkg_prefix = 'lib' + pkgname[3]
@@ -94,7 +94,7 @@ python do_package_ipk () {
cleanupcontrol(root) cleanupcontrol(root)
from glob import glob from glob import glob
g = 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.note("Not creating empty archive for %s-%s-%s" % (pkg, localdata.getVar('PKGV', True), localdata.getVar('PKGR', True)))
bb.utils.unlockfile(lf) bb.utils.unlockfile(lf)
continue continue
@@ -134,7 +134,7 @@ python do_package_ipk () {
try: try:
for (c, fs) in fields: for (c, fs) in fields:
for f in fs: for f in fs:
if localdata.getVar(f) is None: if localdata.getVar(f, False) is None:
raise KeyError(f) raise KeyError(f)
# Special behavior for description... # Special behavior for description...
if 'DESCRIPTION' in fs: if 'DESCRIPTION' in fs:
+2 -2
View File
@@ -395,7 +395,7 @@ python write_specfile () {
file_list = [] file_list = []
walk_files(root, file_list, conffiles, dirfiles) 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) bb.note("Not creating empty RPM package for %s" % splitname)
else: else:
bb.note("Creating RPM package for %s" % splitname) bb.note("Creating RPM package for %s" % splitname)
@@ -504,7 +504,7 @@ python write_specfile () {
# Now process files # Now process files
file_list = [] file_list = []
walk_files(root, file_list, conffiles, dirfiles) 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) bb.note("Not creating empty RPM package for %s" % splitname)
else: else:
spec_files_bottom.append('%%files -n %s' % splitname) spec_files_bottom.append('%%files -n %s' % splitname)
+1 -1
View File
@@ -33,7 +33,7 @@ python do_package_tar () {
localdata = bb.data.createCopy(d) localdata = bb.data.createCopy(d)
root = "%s/%s" % (pkgdest, pkg) root = "%s/%s" % (pkgdest, pkg)
overrides = localdata.getVar('OVERRIDES') overrides = localdata.getVar('OVERRIDES', False)
localdata.setVar('OVERRIDES', '%s:%s' % (overrides, pkg)) localdata.setVar('OVERRIDES', '%s:%s' % (overrides, pkg))
bb.data.update_data(localdata) bb.data.update_data(localdata)
+2 -2
View File
@@ -98,7 +98,7 @@ python copy_buildsystem () {
f.write('# this configuration provides, it is strongly suggested that you set\n') 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('# 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('BBPATH = "$' + '{TOPDIR}"\n')
f.write('SDKBASEMETAPATH = "$' + '{TOPDIR}"\n') f.write('SDKBASEMETAPATH = "$' + '{TOPDIR}"\n')
f.write('BBLAYERS := " \\\n') f.write('BBLAYERS := " \\\n')
@@ -115,7 +115,7 @@ python copy_buildsystem () {
f.write('# up a proper instance of the full build system and use that instead.\n\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('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 # 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) # (we're including them in the SDK as nativesdk- versions instead)
+4 -4
View File
@@ -29,11 +29,11 @@ python errorreport_handler () {
if isinstance(e, bb.event.BuildStarted): if isinstance(e, bb.event.BuildStarted):
data = {} data = {}
machine = e.data.getVar("MACHINE") machine = e.data.getVar("MACHINE", False)
data['machine'] = machine data['machine'] = machine
data['build_sys'] = e.data.getVar("BUILD_SYS", True) data['build_sys'] = e.data.getVar("BUILD_SYS", True)
data['nativelsb'] = e.data.getVar("NATIVELSBSTRING") data['nativelsb'] = e.data.getVar("NATIVELSBSTRING", False)
data['distro'] = e.data.getVar("DISTRO") data['distro'] = e.data.getVar("DISTRO", False)
data['target_sys'] = e.data.getVar("TARGET_SYS", True) data['target_sys'] = e.data.getVar("TARGET_SYS", True)
data['failures'] = [] data['failures'] = []
data['component'] = e.getPkgs()[0] data['component'] = e.getPkgs()[0]
@@ -64,7 +64,7 @@ python errorreport_handler () {
jsondata = json.loads(errorreport_getdata(e)) jsondata = json.loads(errorreport_getdata(e))
failures = jsondata['failures'] failures = jsondata['failures']
if(len(failures) > 0): 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) 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 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.") 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.")
+1 -1
View File
@@ -209,7 +209,7 @@ def check_toolchain(data):
def check_conf_exists(fn, data): def check_conf_exists(fn, data):
bbpath = [] bbpath = []
fn = data.expand(fn) fn = data.expand(fn)
vbbpath = data.getVar("BBPATH") vbbpath = data.getVar("BBPATH", False)
if vbbpath: if vbbpath:
bbpath += vbbpath.split(":") bbpath += vbbpath.split(":")
for p in bbpath: for p in bbpath:
+2 -2
View File
@@ -66,7 +66,7 @@ sstate_hardcode_path[dirs] = "${SSTATE_BUILDDIR}"
python () { python () {
if bb.data.inherits_class('native', d): 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): elif bb.data.inherits_class('crosssdk', d):
d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}")) d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}"))
elif bb.data.inherits_class('cross', d): elif bb.data.inherits_class('cross', d):
@@ -895,7 +895,7 @@ python sstate_eventhandler2() {
import glob import glob
d = e.data d = e.data
stamps = e.stamps.values() stamps = e.stamps.values()
removeworkdir = (d.getVar("SSTATE_PRUNE_OBSOLETEWORKDIR") == "1") removeworkdir = (d.getVar("SSTATE_PRUNE_OBSOLETEWORKDIR", False) == "1")
seen = [] seen = []
for a in d.getVar("SSTATE_ARCHS", True).split(): for a in d.getVar("SSTATE_ARCHS", True).split():
toremove = [] toremove = []
+1 -1
View File
@@ -227,7 +227,7 @@ python populate_packages_updatealternatives () {
provider = d.getVar('VIRTUAL-RUNTIME_update-alternatives', True) provider = d.getVar('VIRTUAL-RUNTIME_update-alternatives', True)
if provider: if provider:
#bb.note('adding runtime requirement for update-alternatives for %s' % pkg) #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('adding update-alternatives calls to postinst/prerm for %s' % pkg)
bb.note('%s' % alt_setup_links) bb.note('%s' % alt_setup_links)
+5 -5
View File
@@ -56,11 +56,11 @@ fi
def update_rc_after_parse(d): def update_rc_after_parse(d):
if d.getVar('INITSCRIPT_PACKAGES') == None: if d.getVar('INITSCRIPT_PACKAGES', False) == None:
if d.getVar('INITSCRIPT_NAME') == 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')) raise bb.build.FuncFailed("%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % d.getVar('FILE', False))
if d.getVar('INITSCRIPT_PARAMS') == None: 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')) raise bb.build.FuncFailed("%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % d.getVar('FILE', False))
python __anonymous() { python __anonymous() {
update_rc_after_parse(d) update_rc_after_parse(d)
+5 -5
View File
@@ -150,11 +150,11 @@ def update_useradd_after_parse(d):
useradd_packages = d.getVar('USERADD_PACKAGES', True) useradd_packages = d.getVar('USERADD_PACKAGES', True)
if not useradd_packages: 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(): 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): 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() { python __anonymous() {
if not bb.data.inherits_class('nativesdk', d) \ if not bb.data.inherits_class('nativesdk', d) \
@@ -202,10 +202,10 @@ fakeroot python populate_packages_prepend () {
# RDEPENDS setup # RDEPENDS setup
rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or "" rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
rdepends += ' ' + d.getVar('MLPREFIX') + 'base-passwd' rdepends += ' ' + d.getVar('MLPREFIX', False) + 'base-passwd'
rdepends += ' ' + d.getVar('MLPREFIX') + 'shadow' rdepends += ' ' + d.getVar('MLPREFIX', False) + 'shadow'
# base-files is where the default /etc/skel is packaged # 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) d.setVar("RDEPENDS_%s" % pkg, rdepends)
# Add the user/group preinstall scripts and RDEPENDS requirements # Add the user/group preinstall scripts and RDEPENDS requirements
+1 -1
View File
@@ -28,7 +28,7 @@ python do_clean() {
bb.note("Removing " + dir) bb.note("Removing " + dir)
oe.path.remove(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) bb.note("Removing " + dir)
oe.path.remove(dir) oe.path.remove(dir)
+8 -8
View File
@@ -181,20 +181,20 @@ ASSUME_PROVIDED = "\
# Package default variables. # Package default variables.
################################################################## ##################################################################
PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}" 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'),d)[1] or '1.0'}" 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'),d)[2] or 'r0'}" PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}"
PF = "${PN}-${EXTENDPE}${PV}-${PR}" 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}" P = "${PN}-${PV}"
EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO',1) is None]}" EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO', True) is None]}"
PRAUTOINX = "${PF}" PRAUTOINX = "${PF}"
PKGV ?= "${PV}" PKGV ?= "${PV}"
PKGR ?= "${PR}${EXTENDPRAUTO}" PKGR ?= "${PR}${EXTENDPRAUTO}"
PKGE ?= "${@['','${PE\x7d'][int(d.getVar('PE',1) or 0) > 0]}" PKGE ?= "${@['','${PE\x7d'][int(d.getVar('PE', True) or 0) > 0]}"
EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE',1).strip() != '']}" EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE', True).strip() != '']}"
EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}" EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}"
# Base package name # Base package name
@@ -311,7 +311,7 @@ FILES_${PN}-locale = "${datadir}/locale"
# File manifest # 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 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}" #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 # This default was only used for checking
+1 -1
View File
@@ -1167,7 +1167,7 @@ class RpmPM(PackageManager):
return return
def save_rpmpostinst(self, pkg): 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 new_pkg = pkg
# Remove any multilib prefix from the package name # Remove any multilib prefix from the package name
+3 -3
View File
@@ -52,7 +52,7 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget):
# test rootfs + kernel # test rootfs + kernel
self.image_fstype = self.get_image_fstype(d) 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.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): 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 # 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 # the same as the config with which the image was build, ie
@@ -73,10 +73,10 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget):
# e.g: TEST_POWERCONTROL_CMD = "/home/user/myscripts/powercontrol.py ${MACHINE} what-ever-other-args-the-script-wants" # 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) # 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_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_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 self.origenv = os.environ
if self.powercontrol_cmd or self.serialcontrol_cmd: if self.powercontrol_cmd or self.serialcontrol_cmd:
+2 -2
View File
@@ -13,7 +13,7 @@ def setUpModule():
class SkeletonBasicTest(oeRuntimeTest): class SkeletonBasicTest(oeRuntimeTest):
@skipUnlessPassed('test_ssh') @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): def test_skeleton_availability(self):
(status, output) = self.target.run('ls /etc/init.d/skeleton') (status, output) = self.target.run('ls /etc/init.d/skeleton')
self.assertEqual(status, 0, msg = "skeleton init script not found. Output:\n%s " % output) self.assertEqual(status, 0, msg = "skeleton init script not found. Output:\n%s " % output)
@@ -22,7 +22,7 @@ class SkeletonBasicTest(oeRuntimeTest):
@testcase(284) @testcase(284)
@skipUnlessPassed('test_skeleton_availability') @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): def test_skeleton_script(self):
output1 = self.target.run("/etc/init.d/skeleton start")[1] output1 = self.target.run("/etc/init.d/skeleton start")[1]
(status, output2) = self.target.run(oeRuntimeTest.pscmd + ' | grep [s]keleton-test') (status, output2) = self.target.run(oeRuntimeTest.pscmd + ' | grep [s]keleton-test')
+2 -2
View File
@@ -29,7 +29,7 @@ class SyslogTestConfig(oeRuntimeTest):
@skipUnlessPassed("test_syslog_running") @skipUnlessPassed("test_syslog_running")
def test_syslog_restart(self): 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') (status,output) = self.target.run('/etc/init.d/syslog restart')
else: else:
(status,output) = self.target.run('systemctl restart syslog.service') (status,output) = self.target.run('systemctl restart syslog.service')
@@ -37,7 +37,7 @@ class SyslogTestConfig(oeRuntimeTest):
@testcase(202) @testcase(202)
@skipUnlessPassed("test_syslog_restart") @skipUnlessPassed("test_syslog_restart")
@skipUnlessPassed("test_syslog_logger") @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): def test_syslog_startup_config(self):
self.target.run('echo "LOGFILE=/var/log/test" >> /etc/syslog-startup.conf') self.target.run('echo "LOGFILE=/var/log/test" >> /etc/syslog-startup.conf')
(status,output) = self.target.run('/etc/init.d/syslog restart') (status,output) = self.target.run('/etc/init.d/syslog restart')
+1 -1
View File
@@ -121,7 +121,7 @@ class QemuTarget(BaseTarget):
self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % self.datetime) 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.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.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": if d.getVar("DISTRO", True) == "poky-tiny":
self.runner = QemuTinyRunner(machine=d.getVar("MACHINE", True), self.runner = QemuTinyRunner(machine=d.getVar("MACHINE", True),
@@ -71,9 +71,9 @@ RRECOMMENDS_packagegroup-core-sdk = "\
# if packaged('%s-dev' % name, d): # if packaged('%s-dev' % name, d):
# rreclist.append('%s-dev' % name) # 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)) # 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) # # bb.note('pkgs is %s' % pkgs)
# d.setVar('PACKAGES', ' '.join(pkgs)) # d.setVar('PACKAGES', ' '.join(pkgs))
+2 -2
View File
@@ -17,12 +17,12 @@ LIC_FILES_CHKSUM = "file://${S}/00README;beginline=645;endline=679;md5=964df275d
python do_unpack () { python do_unpack () {
# temporarily change S for unpack # temporarily change S for unpack
# of lsof_${PV} # of lsof_${PV}
s = d.getVar('S') s = d.getVar('S', False)
d.setVar('S', '${WORKDIR}/lsof_${PV}') d.setVar('S', '${WORKDIR}/lsof_${PV}')
bb.build.exec_func('base_do_unpack', d) bb.build.exec_func('base_do_unpack', d)
# temporarily change SRC_URI for unpack # temporarily change SRC_URI for unpack
# of lsof_${PV}_src # of lsof_${PV}_src
src_uri = d.getVar('SRC_URI') src_uri = d.getVar('SRC_URI', False)
d.setVar('SRC_URI', '${LOCALSRC}') d.setVar('SRC_URI', '${LOCALSRC}')
d.setVar('S', s) d.setVar('S', s)
bb.build.exec_func('base_do_unpack', d) bb.build.exec_func('base_do_unpack', d)
@@ -204,8 +204,8 @@ RDEPENDS_packagegroup-core-lsb-python = "\
" "
def get_libqt3(d): def get_libqt3(d):
if 'linuxstdbase' in d.getVar('DISTROOVERRIDES') or "": if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) or "":
if 'qt3' in d.getVar('BBFILE_COLLECTIONS') or "": if 'qt3' in d.getVar('BBFILE_COLLECTIONS', False) or "":
return 'libqt-mt3' return 'libqt-mt3'
bb.warn('The meta-qt3 layer should be added, this layer provides Qt 3.x' \ bb.warn('The meta-qt3 layer should be added, this layer provides Qt 3.x' \
+1 -1
View File
@@ -303,7 +303,7 @@ python populate_packages_prepend() {
do_split_packages(d, plugin_dir, glob, plugin_name, '${PN} %s for %%s' % name, extra_depends='', hook=dev_hook) 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 # Create a -dbg package as well
plugin_dir_dbg = d.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/.debug' % path) 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: for (file,package) in dev_packages:
packages = "%s %s-dbg" % (packages, package) packages = "%s %s-dbg" % (packages, package)
file_name = os.path.join(plugin_dir_dbg, os.path.basename(file)) file_name = os.path.join(plugin_dir_dbg, os.path.basename(file))
@@ -31,6 +31,6 @@ do_configure_prepend() {
python() { python() {
if incompatible_license_contains("GPLv3", "x", "", d) == "x" or bb.utils.contains("DISTRO_FEATURES", "x11", "x", "", d) == "": 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("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").split() if i != "gconf")) d.setVar("DEPENDS", " ".join(i for i in d.getVar("DEPENDS", False).split() if i != "gconf"))
} }