mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
meta: Manual override fixes
The automated conversion of OE-Core to use the new override sytax isn't perfect. This patches some mis-converted lines and some lines which were missed by the automation. (From OE-Core rev: 4e9a06b64b43131b731fb59a0305f78a98e27fbd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
bb6ddc3691
commit
65133015b1
|
@ -1306,7 +1306,7 @@ python () {
|
|||
# Checking ${FILESEXTRAPATHS}
|
||||
extrapaths = (d.getVar("FILESEXTRAPATHS") or "")
|
||||
if '__default' not in extrapaths.split(":"):
|
||||
msg = "FILESEXTRAPATHS-variable, must always use _prepend (or _append)\n"
|
||||
msg = "FILESEXTRAPATHS-variable, must always use :prepend (or :append)\n"
|
||||
msg += "type of assignment, and don't forget the colon.\n"
|
||||
msg += "Please assign it with the format of:\n"
|
||||
msg += " FILESEXTRAPATHS:append := \":${THISDIR}/Your_Files_Path\" or\n"
|
||||
|
|
|
@ -97,9 +97,9 @@ python __anonymous () {
|
|||
|
||||
for type in imagetypes.split():
|
||||
typelower = type.lower()
|
||||
preinst:append = preinst.replace('KERNEL_IMAGETYPE', type)
|
||||
postinst:prepend = postinst.replace('KERNEL_IMAGETYPE', type)
|
||||
d.setVar('pkg_preinst:kernel-image-' + typelower + '_append', preinst:append)
|
||||
d.setVar('pkg_postinst:kernel-image-' + typelower + '_prepend', postinst:prepend)
|
||||
preinst_append = preinst.replace('KERNEL_IMAGETYPE', type)
|
||||
postinst_prepend = postinst.replace('KERNEL_IMAGETYPE', type)
|
||||
d.setVar('pkg_preinst:kernel-image-' + typelower + ':append', preinst_append)
|
||||
d.setVar('pkg_postinst:kernel-image-' + typelower + ':prepend', postinst_prepend)
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ python native_virtclass_handler () {
|
|||
|
||||
def map_dependencies(varname, d, suffix = "", selfref=True):
|
||||
if suffix:
|
||||
varname = varname + "_" + suffix
|
||||
varname = varname + ":" + suffix
|
||||
deps = d.getVar(varname)
|
||||
if not deps:
|
||||
return
|
||||
|
|
|
@ -1583,7 +1583,7 @@ fi
|
|||
scriptlet = scriptlet_split[0] + "\nset -e\n" + "\n".join(scriptlet_split[1:])
|
||||
else:
|
||||
scriptlet = "set -e\n" + "\n".join(scriptlet_split[0:])
|
||||
d.setVar('%s_%s' % (scriptlet_name, pkg), scriptlet)
|
||||
d.setVar('%s:%s' % (scriptlet_name, pkg), scriptlet)
|
||||
|
||||
def write_if_exists(f, pkg, var):
|
||||
def encode(str):
|
||||
|
|
|
@ -147,7 +147,7 @@ def create_filtered_tasklist(d, sdkbasepath, tasklistfile, conf_initpath):
|
|||
try:
|
||||
with open(sdkbasepath + '/conf/local.conf', 'a') as f:
|
||||
# Force the use of sstate from the build system
|
||||
f.write('\nSSTATE_DIR_forcevariable = "%s"\n' % d.getVar('SSTATE_DIR'))
|
||||
f.write('\nSSTATE_DIR:forcevariable = "%s"\n' % d.getVar('SSTATE_DIR'))
|
||||
f.write('SSTATE_MIRRORS:forcevariable = "file://universal/(.*) file://universal-4.9/\\1 file://universal-4.9/(.*) file://universal-4.8/\\1"\n')
|
||||
# Ensure TMPDIR is the default so that clean_esdk_builddir() can delete it
|
||||
f.write('TMPDIR:forcevariable = "${TOPDIR}/tmp"\n')
|
||||
|
|
|
@ -122,6 +122,8 @@ python do_write_qemuboot_conf() {
|
|||
cf = configparser.ConfigParser()
|
||||
cf.add_section('config_bsp')
|
||||
for k in sorted(qemuboot_vars(d)):
|
||||
if ":" in k:
|
||||
continue
|
||||
# qemu-helper-native sysroot is not removed by rm_work and
|
||||
# contains all tools required by runqemu
|
||||
if k == 'STAGING_BINDIR_NATIVE':
|
||||
|
|
|
@ -199,7 +199,7 @@ def check_toolchain_tune_args(data, tune, multilib, errs):
|
|||
|
||||
def check_toolchain_args_present(data, tune, multilib, tune_errors, which):
|
||||
args_set = (data.getVar("TUNE_%s" % which) or "").split()
|
||||
args_wanted = (data.getVar("TUNEABI_REQUIRED_%s_tune-%s" % (which, tune)) or "").split()
|
||||
args_wanted = (data.getVar("TUNEABI_REQUIRED_%s:tune-%s" % (which, tune)) or "").split()
|
||||
args_missing = []
|
||||
|
||||
# If no args are listed/required, we are done.
|
||||
|
|
|
@ -70,7 +70,7 @@ python systemd_populate_packages() {
|
|||
return
|
||||
|
||||
def get_package_var(d, var, pkg):
|
||||
val = (d.getVar('%s_%s' % (var, pkg)) or "").strip()
|
||||
val = (d.getVar('%s:%s' % (var, pkg)) or "").strip()
|
||||
if val == "":
|
||||
val = (d.getVar(var) or "").strip()
|
||||
return val
|
||||
|
|
|
@ -199,7 +199,7 @@ python __anonymous() {
|
|||
def get_all_cmd_params(d, cmd_type):
|
||||
import string
|
||||
|
||||
param_type = cmd_type.upper() + "_PARAM_%s"
|
||||
param_type = cmd_type.upper() + "_PARAM:%s"
|
||||
params = []
|
||||
|
||||
useradd_packages = d.getVar('USERADD_PACKAGES') or ""
|
||||
|
|
|
@ -87,7 +87,7 @@ class ClassExtender(object):
|
|||
def map_depends_variable(self, varname, suffix = ""):
|
||||
# We need to preserve EXTENDPKGV so it can be expanded correctly later
|
||||
if suffix:
|
||||
varname = varname + "_" + suffix
|
||||
varname = varname + ":" + suffix
|
||||
orig = self.d.getVar("EXTENDPKGV", False)
|
||||
self.d.setVar("EXTENDPKGV", "EXTENDPKGV")
|
||||
deps = self.d.getVar(varname)
|
||||
|
@ -142,7 +142,7 @@ class ClassExtender(object):
|
|||
if pkg_mapping[0].startswith("${") and pkg_mapping[0].endswith("}"):
|
||||
continue
|
||||
for subs in variables:
|
||||
self.d.renameVar("%s_%s" % (subs, pkg_mapping[0]), "%s_%s" % (subs, pkg_mapping[1]))
|
||||
self.d.renameVar("%s:%s" % (subs, pkg_mapping[0]), "%s:%s" % (subs, pkg_mapping[1]))
|
||||
|
||||
class NativesdkClassExtender(ClassExtender):
|
||||
def map_depends(self, dep):
|
||||
|
|
|
@ -47,7 +47,7 @@ def simplify_history(history, d):
|
|||
continue
|
||||
has_set = True
|
||||
elif event['op'] in ('append', 'prepend', 'postdot', 'predot'):
|
||||
# Reminder: "append" and "prepend" mean += and =+ respectively, NOT _append / _prepend
|
||||
# Reminder: "append" and "prepend" mean += and =+ respectively, NOT :append / :prepend
|
||||
if has_set:
|
||||
continue
|
||||
ret_history.insert(0, event)
|
||||
|
@ -342,7 +342,7 @@ def patch_recipe(d, fn, varvalues, patch=False, relpath='', redirect_output=None
|
|||
def override_applicable(hevent):
|
||||
op = hevent['op']
|
||||
if '[' in op:
|
||||
opoverrides = op.split('[')[1].split(']')[0].split('_')
|
||||
opoverrides = op.split('[')[1].split(']')[0].split(':')
|
||||
for opoverride in opoverrides:
|
||||
if not opoverride in overrides:
|
||||
return False
|
||||
|
@ -368,13 +368,13 @@ def patch_recipe(d, fn, varvalues, patch=False, relpath='', redirect_output=None
|
|||
recipe_set = True
|
||||
if not recipe_set:
|
||||
for event in history:
|
||||
if event['op'].startswith('_remove'):
|
||||
if event['op'].startswith(':remove'):
|
||||
continue
|
||||
if not override_applicable(event):
|
||||
continue
|
||||
newvalue = value.replace(event['detail'], '')
|
||||
if newvalue == value and os.path.abspath(event['file']) == fn and event['op'].startswith('_'):
|
||||
op = event['op'].replace('[', '_').replace(']', '')
|
||||
if newvalue == value and os.path.abspath(event['file']) == fn and event['op'].startswith(':'):
|
||||
op = event['op'].replace('[', ':').replace(']', '')
|
||||
extravals[var + op] = None
|
||||
value = newvalue
|
||||
vals[var] = ('+=', value)
|
||||
|
@ -758,7 +758,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
|
|||
appendoverride = ''
|
||||
if machine:
|
||||
bbappendlines.append(('PACKAGE_ARCH', '=', '${MACHINE_ARCH}'))
|
||||
appendoverride = '_%s' % machine
|
||||
appendoverride = ':%s' % machine
|
||||
copyfiles = {}
|
||||
if srcfiles:
|
||||
instfunclines = []
|
||||
|
@ -853,11 +853,11 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
|
|||
newvalue = splitval
|
||||
if len(newvalue) == 1:
|
||||
# Ensure it's written out as one line
|
||||
if '_append' in varname:
|
||||
if ':append' in varname:
|
||||
newvalue = ' ' + newvalue[0]
|
||||
else:
|
||||
newvalue = newvalue[0]
|
||||
if not newvalue and (op in ['+=', '.='] or '_append' in varname):
|
||||
if not newvalue and (op in ['+=', '.='] or ':append' in varname):
|
||||
# There's no point appending nothing
|
||||
newvalue = None
|
||||
if varname.endswith('()'):
|
||||
|
|
|
@ -246,7 +246,7 @@ class SignatureGeneratorOEBasicHashMixIn(object):
|
|||
continue
|
||||
f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.get_unihash(tid) + " \\\n")
|
||||
f.write(' "\n')
|
||||
f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(l)))
|
||||
f.write('SIGGEN_LOCKEDSIGS_TYPES:%s = "%s"' % (self.machine, " ".join(l)))
|
||||
|
||||
def dump_siglist(self, sigfile, path_prefix_strip=None):
|
||||
def strip_fn(fn):
|
||||
|
|
|
@ -26,7 +26,7 @@ class GenericEFITest(OESelftestTestCase):
|
|||
self.write_config(self,
|
||||
"""
|
||||
EFI_PROVIDER = "%s"
|
||||
IMAGE_FSTYPES:pn-%s_append = " wic"
|
||||
IMAGE_FSTYPES:pn-%s:append = " wic"
|
||||
MACHINE = "%s"
|
||||
MACHINE_FEATURES:append = " efi"
|
||||
WKS_FILE = "efi-bootdisk.wks.in"
|
||||
|
|
|
@ -98,7 +98,7 @@ INCOMPATIBLE_LICENSE:pn-core-image-minimal = "GPL-3.0 LGPL-3.0"
|
|||
raise AssertionError(result.output)
|
||||
|
||||
def test_bash_and_license(self):
|
||||
self.write_config(self.default_config() + '\nLICENSE_append_pn-bash = " & SomeLicense"')
|
||||
self.write_config(self.default_config() + '\nLICENSE:append:pn-bash = " & SomeLicense"')
|
||||
error_msg = "ERROR: core-image-minimal-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0-or-later"
|
||||
|
||||
result = bitbake('core-image-minimal', ignore_status=True)
|
||||
|
@ -106,12 +106,12 @@ INCOMPATIBLE_LICENSE:pn-core-image-minimal = "GPL-3.0 LGPL-3.0"
|
|||
raise AssertionError(result.output)
|
||||
|
||||
def test_bash_or_license(self):
|
||||
self.write_config(self.default_config() + '\nLICENSE_append_pn-bash = " | SomeLicense"')
|
||||
self.write_config(self.default_config() + '\nLICENSE:append:pn-bash = " | SomeLicense"')
|
||||
|
||||
bitbake('core-image-minimal')
|
||||
|
||||
def test_bash_whitelist(self):
|
||||
self.write_config(self.default_config() + '\nWHITELIST_GPL-3.0_pn-core-image-minimal = "bash"')
|
||||
self.write_config(self.default_config() + '\nWHITELIST_GPL-3.0:pn-core-image-minimal = "bash"')
|
||||
|
||||
bitbake('core-image-minimal')
|
||||
|
||||
|
|
|
@ -183,9 +183,9 @@ class RecipetoolTests(RecipetoolBase):
|
|||
'\n',
|
||||
'PACKAGE_ARCH = "${MACHINE_ARCH}"\n',
|
||||
'\n',
|
||||
'SRC_URI:append_mymachine = " file://testfile"\n',
|
||||
'SRC_URI:append:mymachine = " file://testfile"\n',
|
||||
'\n',
|
||||
'do_install:append_mymachine() {\n',
|
||||
'do_install:append:mymachine() {\n',
|
||||
' install -d ${D}${datadir}\n',
|
||||
' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/something\n',
|
||||
'}\n']
|
||||
|
|
|
@ -1035,7 +1035,7 @@ class Wic2(WicTestCase):
|
|||
@only_for_arch(['i586', 'i686', 'x86_64'])
|
||||
def test_biosplusefi_plugin_qemu(self):
|
||||
"""Test biosplusefi plugin in qemu"""
|
||||
config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES_append = " efi"\n'
|
||||
config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES:append = " efi"\n'
|
||||
self.append_config(config)
|
||||
self.assertEqual(0, bitbake('core-image-minimal').status)
|
||||
self.remove_config(config)
|
||||
|
@ -1072,7 +1072,7 @@ class Wic2(WicTestCase):
|
|||
# If an image hasn't been built yet, directory ${STAGING_DATADIR}/syslinux won't exists and _get_bootimg_dir()
|
||||
# will raise with "Couldn't find correct bootimg_dir"
|
||||
# The easiest way to work-around this issue is to make sure we already built an image here, hence the bitbake call
|
||||
config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES_append = " efi"\n'
|
||||
config = 'IMAGE_FSTYPES = "wic"\nWKS_FILE = "test_biosplusefi_plugin.wks"\nMACHINE_FEATURES:append = " efi"\n'
|
||||
self.append_config(config)
|
||||
self.assertEqual(0, bitbake('core-image-minimal').status)
|
||||
self.remove_config(config)
|
||||
|
|
|
@ -68,7 +68,7 @@ do_install () {
|
|||
install -m 0755 mount-copybind ${D}${base_sbindir}/
|
||||
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
for service in ${SYSTEMD_SERVICE_${PN}}; do
|
||||
for service in ${SYSTEMD_SERVICE:${PN}}; do
|
||||
install -m 0644 $service ${D}${systemd_unitdir}/system/
|
||||
done
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ require gdb-common.inc
|
|||
|
||||
inherit gettext
|
||||
|
||||
#LDFLAGS_append = " -s"
|
||||
#LDFLAGS:append = " -s"
|
||||
#export CFLAGS:append=" -L${STAGING_LIBDIR}"
|
||||
|
||||
# cross-canadian must not see this
|
||||
|
|
|
@ -231,7 +231,7 @@ python __anonymous() {
|
|||
mlprefix = d.getVar("MLPREFIX")
|
||||
fullp = mlprefix + p[1] + "-mesa" + suffix
|
||||
mlprefix = d.getVar("MLPREFIX")
|
||||
pkgs = " ".join(mlprefix + x + suffix for x in p[1:])
|
||||
pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
|
||||
d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
|
||||
d.appendVar("RREPLACES:" + fullp, pkgs)
|
||||
d.appendVar("RPROVIDES:" + fullp, pkgs)
|
||||
|
@ -241,7 +241,7 @@ python __anonymous() {
|
|||
|
||||
# For -dev, the first element is both the Debian and original name
|
||||
fullp = mlprefix + p[1] + "-mesa-dev" + suffix
|
||||
pkgs = mlprefix + p[1] + "-dev" + suffix
|
||||
pkgs = " " + mlprefix + p[1] + "-dev" + suffix
|
||||
d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
|
||||
d.appendVar("RREPLACES:" + fullp, pkgs)
|
||||
d.appendVar("RPROVIDES:" + fullp, pkgs)
|
||||
|
|
|
@ -100,7 +100,7 @@ def read_workspace():
|
|||
_enable_workspace_layer(config.workspace_path, config, basepath)
|
||||
|
||||
logger.debug('Reading workspace in %s' % config.workspace_path)
|
||||
externalsrc_re = re.compile(r'^EXTERNALSRC(_pn-([^ =]+))? *= *"([^"]*)"$')
|
||||
externalsrc_re = re.compile(r'^EXTERNALSRC(:pn-([^ =]+))? *= *"([^"]*)"$')
|
||||
for fn in glob.glob(os.path.join(config.workspace_path, 'appends', '*.bbappend')):
|
||||
with open(fn, 'r') as f:
|
||||
pnvalues = {}
|
||||
|
|
|
@ -523,7 +523,7 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works
|
|||
history = d.varhistory.variable('SRC_URI')
|
||||
for event in history:
|
||||
if not 'flag' in event:
|
||||
if event['op'].startswith(('_append[', '_prepend[')):
|
||||
if event['op'].startswith((':append[', ':prepend[')):
|
||||
extra_overrides.append(event['op'].split('[')[1].split(']')[0])
|
||||
# We want to remove duplicate overrides. If a recipe had multiple
|
||||
# SRC_URI_override += values it would cause mulitple instances of
|
||||
|
@ -955,17 +955,17 @@ def modify(args, config, basepath, workspace):
|
|||
f.write('SRCTREECOVEREDTASKS = "do_validate_branches do_kernel_checkout '
|
||||
'do_fetch do_unpack do_kernel_configcheck"\n')
|
||||
f.write('\ndo_patch[noexec] = "1"\n')
|
||||
f.write('\ndo_configure_append() {\n'
|
||||
f.write('\ndo_configure:append() {\n'
|
||||
' cp ${B}/.config ${S}/.config.baseline\n'
|
||||
' ln -sfT ${B}/.config ${S}/.config.new\n'
|
||||
'}\n')
|
||||
f.write('\ndo_kernel_configme_prepend() {\n'
|
||||
f.write('\ndo_kernel_configme:prepend() {\n'
|
||||
' if [ -e ${S}/.config ]; then\n'
|
||||
' mv ${S}/.config ${S}/.config.old\n'
|
||||
' fi\n'
|
||||
'}\n')
|
||||
if rd.getVarFlag('do_menuconfig','task'):
|
||||
f.write('\ndo_configure_append() {\n'
|
||||
f.write('\ndo_configure:append() {\n'
|
||||
' if [ ! ${DEVTOOL_DISABLE_MENUCONFIG} ]; then\n'
|
||||
' cp ${B}/.config ${S}/.config.baseline\n'
|
||||
' ln -sfT ${B}/.config ${S}/.config.new\n'
|
||||
|
|
Loading…
Reference in New Issue
Block a user