mirror of
https://git.yoctoproject.org/poky
synced 2026-03-19 13:49:41 +01:00
Convert to new override syntax
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -101,7 +101,7 @@ def main():
|
||||
if name:
|
||||
print('SRCREV_%s_pn-%s%s = "%s"' % (name, pn, forcevariable, srcrev))
|
||||
else:
|
||||
print('SRCREV_pn-%s%s = "%s"' % (pn, forcevariable, srcrev))
|
||||
print('SRCREV:pn-%s%s = "%s"' % (pn, forcevariable, srcrev))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -365,13 +365,13 @@ IMAGE_FSTYPES_DEBUGFS = "tar.bz2"
|
||||
USER_CLASSES += "image-combined-dbg"
|
||||
|
||||
# enables kernel debug symbols
|
||||
KERNEL_EXTRA_FEATURES_append = " features/debug/debug-kernel.scc"
|
||||
KERNEL_EXTRA_FEATURES:append = " features/debug/debug-kernel.scc"
|
||||
|
||||
# minimal, just run-time systemtap configuration in target image
|
||||
PACKAGECONFIG_pn-systemtap = "monitor"
|
||||
PACKAGECONFIG:pn-systemtap = "monitor"
|
||||
|
||||
# add systemtap run-time into target image if it is not there yet
|
||||
IMAGE_INSTALL_append = " systemtap"
|
||||
IMAGE_INSTALL:append = " systemtap"
|
||||
"""
|
||||
option_parser = optparse.OptionParser(usage=usage)
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ def build_image_task(config, basepath, workspace, image, add_packages=None, task
|
||||
with open(appendfile, 'w') as afile:
|
||||
if packages:
|
||||
# include packages from workspace recipes into the image
|
||||
afile.write('IMAGE_INSTALL_append = " %s"\n' % ' '.join(packages))
|
||||
afile.write('IMAGE_INSTALL:append = " %s"\n' % ' '.join(packages))
|
||||
if not task:
|
||||
logger.info('Building image %s with the following '
|
||||
'additional packages: %s', image, ' '.join(packages))
|
||||
|
||||
@@ -207,7 +207,7 @@ def sdk_update(args, config, basepath, workspace):
|
||||
if not sstate_mirrors:
|
||||
with open(os.path.join(conf_dir, 'site.conf'), 'a') as f:
|
||||
f.write('SCONF_VERSION = "%s"\n' % site_conf_version)
|
||||
f.write('SSTATE_MIRRORS_append = " file://.* %s/sstate-cache/PATH \\n "\n' % updateserver)
|
||||
f.write('SSTATE_MIRRORS:append = " file://.* %s/sstate-cache/PATH \\n "\n' % updateserver)
|
||||
finally:
|
||||
shutil.rmtree(tmpsdk_dir)
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ def search(args, config, basepath, workspace):
|
||||
splitline = line.split(':', 1)
|
||||
key = splitline[0]
|
||||
value = splitline[1].strip()
|
||||
if key in ['PKG_%s' % pkg, 'DESCRIPTION', 'FILES_INFO'] or key.startswith('FILERPROVIDES_'):
|
||||
if key in ['PKG:%s' % pkg, 'DESCRIPTION', 'FILES_INFO'] or key.startswith('FILERPROVIDES_'):
|
||||
if keyword_rc.search(value):
|
||||
match = True
|
||||
break
|
||||
|
||||
@@ -254,13 +254,13 @@ def add(args, config, basepath, workspace):
|
||||
f.write('\n# initial_rev: %s\n' % initial_rev)
|
||||
|
||||
if args.binary:
|
||||
f.write('do_install_append() {\n')
|
||||
f.write('do_install:append() {\n')
|
||||
f.write(' rm -rf ${D}/.git\n')
|
||||
f.write(' rm -f ${D}/singletask.lock\n')
|
||||
f.write('}\n')
|
||||
|
||||
if bb.data.inherits_class('npm', rd):
|
||||
f.write('python do_configure_append() {\n')
|
||||
f.write('python do_configure:append() {\n')
|
||||
f.write(' pkgdir = d.getVar("NPM_PACKAGE")\n')
|
||||
f.write(' lockfile = os.path.join(pkgdir, "singletask.lock")\n')
|
||||
f.write(' bb.utils.remove(lockfile)\n')
|
||||
@@ -936,20 +936,20 @@ def modify(args, config, basepath, workspace):
|
||||
|
||||
bb.utils.mkdirhier(os.path.dirname(appendfile))
|
||||
with open(appendfile, 'w') as f:
|
||||
f.write('FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n')
|
||||
f.write('FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n')
|
||||
# Local files can be modified/tracked in separate subdir under srctree
|
||||
# Mostly useful for packages with S != WORKDIR
|
||||
f.write('FILESPATH_prepend := "%s:"\n' %
|
||||
f.write('FILESPATH:prepend := "%s:"\n' %
|
||||
os.path.join(srctreebase, 'oe-local-files'))
|
||||
f.write('# srctreebase: %s\n' % srctreebase)
|
||||
|
||||
f.write('\ninherit externalsrc\n')
|
||||
f.write('# NOTE: We use pn- overrides here to avoid affecting multiple variants in the case where the recipe uses BBCLASSEXTEND\n')
|
||||
f.write('EXTERNALSRC_pn-%s = "%s"\n' % (pn, srctree))
|
||||
f.write('EXTERNALSRC:pn-%s = "%s"\n' % (pn, srctree))
|
||||
|
||||
b_is_s = use_external_build(args.same_dir, args.no_same_dir, rd)
|
||||
if b_is_s:
|
||||
f.write('EXTERNALSRC_BUILD_pn-%s = "%s"\n' % (pn, srctree))
|
||||
f.write('EXTERNALSRC_BUILD:pn-%s = "%s"\n' % (pn, srctree))
|
||||
|
||||
if bb.data.inherits_class('kernel', rd):
|
||||
f.write('SRCTREECOVEREDTASKS = "do_validate_branches do_kernel_checkout '
|
||||
|
||||
@@ -103,14 +103,14 @@ def _write_append(rc, srctree, same_dir, no_same_dir, rev, copied, workspace, d)
|
||||
pn = d.getVar('PN')
|
||||
af = os.path.join(appendpath, '%s.bbappend' % brf)
|
||||
with open(af, 'w') as f:
|
||||
f.write('FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n\n')
|
||||
f.write('FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n\n')
|
||||
f.write('inherit externalsrc\n')
|
||||
f.write(('# NOTE: We use pn- overrides here to avoid affecting'
|
||||
'multiple variants in the case where the recipe uses BBCLASSEXTEND\n'))
|
||||
f.write('EXTERNALSRC_pn-%s = "%s"\n' % (pn, srctree))
|
||||
f.write('EXTERNALSRC:pn-%s = "%s"\n' % (pn, srctree))
|
||||
b_is_s = use_external_build(same_dir, no_same_dir, d)
|
||||
if b_is_s:
|
||||
f.write('EXTERNALSRC_BUILD_pn-%s = "%s"\n' % (pn, srctree))
|
||||
f.write('EXTERNALSRC_BUILD:pn-%s = "%s"\n' % (pn, srctree))
|
||||
f.write('\n')
|
||||
if rev:
|
||||
f.write('# initial_rev: %s\n' % rev)
|
||||
|
||||
@@ -49,7 +49,7 @@ def find_target_file(targetpath, d, pkglist=None):
|
||||
'/etc/group': '/etc/group should be managed through the useradd and extrausers classes',
|
||||
'/etc/shadow': '/etc/shadow should be managed through the useradd and extrausers classes',
|
||||
'/etc/gshadow': '/etc/gshadow should be managed through the useradd and extrausers classes',
|
||||
'${sysconfdir}/hostname': '${sysconfdir}/hostname contents should be set by setting hostname_pn-base-files = "value" in configuration',}
|
||||
'${sysconfdir}/hostname': '${sysconfdir}/hostname contents should be set by setting hostname:pn-base-files = "value" in configuration',}
|
||||
|
||||
for pthspec, message in invalidtargets.items():
|
||||
if fnmatch.fnmatchcase(targetpath, d.expand(pthspec)):
|
||||
@@ -79,7 +79,7 @@ def find_target_file(targetpath, d, pkglist=None):
|
||||
for fullpth in dictval.keys():
|
||||
if fnmatch.fnmatchcase(fullpth, targetpath):
|
||||
recipes[targetpath].append(pn)
|
||||
elif line.startswith('pkg_preinst_') or line.startswith('pkg_postinst_'):
|
||||
elif line.startswith('pkg_preinst:') or line.startswith('pkg_postinst:'):
|
||||
scriptval = line.split(':', 1)[1].strip().encode('utf-8').decode('unicode_escape')
|
||||
if 'update-alternatives --install %s ' % targetpath in scriptval:
|
||||
recipes[targetpath].append('?%s' % pn)
|
||||
|
||||
@@ -710,7 +710,7 @@ def create_recipe(args):
|
||||
lines_after.append('')
|
||||
|
||||
if args.binary:
|
||||
lines_after.append('INSANE_SKIP_${PN} += "already-stripped"')
|
||||
lines_after.append('INSANE_SKIP:${PN} += "already-stripped"')
|
||||
lines_after.append('')
|
||||
|
||||
if args.npm_dev:
|
||||
@@ -1177,7 +1177,7 @@ def split_pkg_licenses(licvalues, packages, outlines, fallback_licenses=None, pn
|
||||
license = ' '.join(list(set(pkglicenses.get(pkgname, ['Unknown'])))) or 'Unknown'
|
||||
if license == 'Unknown' and pkgname in fallback_licenses:
|
||||
license = fallback_licenses[pkgname]
|
||||
outlines.append('LICENSE_%s = "%s"' % (pkgname, license))
|
||||
outlines.append('LICENSE:%s = "%s"' % (pkgname, license))
|
||||
outlicenses[pkgname] = license.split()
|
||||
return outlicenses
|
||||
|
||||
|
||||
@@ -45,9 +45,9 @@ class PythonRecipeHandler(RecipeHandler):
|
||||
'Summary': 'SUMMARY',
|
||||
'Description': 'DESCRIPTION',
|
||||
'License': 'LICENSE',
|
||||
'Requires': 'RDEPENDS_${PN}',
|
||||
'Provides': 'RPROVIDES_${PN}',
|
||||
'Obsoletes': 'RREPLACES_${PN}',
|
||||
'Requires': 'RDEPENDS:${PN}',
|
||||
'Provides': 'RPROVIDES:${PN}',
|
||||
'Obsoletes': 'RREPLACES:${PN}',
|
||||
}
|
||||
# PN/PV are already set by recipetool core & desc can be extremely long
|
||||
excluded_fields = [
|
||||
@@ -301,7 +301,7 @@ class PythonRecipeHandler(RecipeHandler):
|
||||
inst_req_deps = ('python3-' + r.replace('.', '-').lower() for r in sorted(inst_reqs))
|
||||
lines_after.append('# WARNING: the following rdepends are from setuptools install_requires. These')
|
||||
lines_after.append('# upstream names may not correspond exactly to bitbake package names.')
|
||||
lines_after.append('RDEPENDS_${{PN}} += "{}"'.format(' '.join(inst_req_deps)))
|
||||
lines_after.append('RDEPENDS:${{PN}} += "{}"'.format(' '.join(inst_req_deps)))
|
||||
|
||||
if mapped_deps:
|
||||
name = info.get('Name')
|
||||
@@ -313,7 +313,7 @@ class PythonRecipeHandler(RecipeHandler):
|
||||
lines_after.append('')
|
||||
lines_after.append('# WARNING: the following rdepends are determined through basic analysis of the')
|
||||
lines_after.append('# python sources, and might not be 100% accurate.')
|
||||
lines_after.append('RDEPENDS_${{PN}} += "{}"'.format(' '.join(sorted(mapped_deps))))
|
||||
lines_after.append('RDEPENDS:${{PN}} += "{}"'.format(' '.join(sorted(mapped_deps))))
|
||||
|
||||
unmapped_deps -= set(extensions)
|
||||
unmapped_deps -= set(self.assume_provided)
|
||||
|
||||
@@ -113,7 +113,7 @@ class KernelModuleRecipeHandler(RecipeHandler):
|
||||
kdirpath, _ = check_target(compile_lines, install=False)
|
||||
|
||||
if manual_install or not install_lines:
|
||||
lines_after.append('EXTRA_OEMAKE_append_task-install = " -C ${STAGING_KERNEL_DIR} M=${S}"')
|
||||
lines_after.append('EXTRA_OEMAKE:append:task-install = " -C ${STAGING_KERNEL_DIR} M=${S}"')
|
||||
elif install_target and install_target != 'modules_install':
|
||||
lines_after.append('MODULES_INSTALL_TARGET = "install"')
|
||||
|
||||
|
||||
@@ -47,8 +47,8 @@ def check(args):
|
||||
try:
|
||||
env = os.environ.copy()
|
||||
if not args.same_tmpdir:
|
||||
env['BB_ENV_EXTRAWHITE'] = env.get('BB_ENV_EXTRAWHITE', '') + ' TMPDIR_forcevariable'
|
||||
env['TMPDIR_forcevariable'] = tmpdir
|
||||
env['BB_ENV_EXTRAWHITE'] = env.get('BB_ENV_EXTRAWHITE', '') + ' TMPDIR:forcevariable'
|
||||
env['TMPDIR:forcevariable'] = tmpdir
|
||||
|
||||
try:
|
||||
output = subprocess.check_output(
|
||||
|
||||
@@ -23,4 +23,4 @@ if __name__ == "__main__":
|
||||
subprocess.call(['bitbake', '-c', 'addto_recipe_sysroot', 'elfutils-native'])
|
||||
|
||||
subprocess.call(['oe-run-native', 'elfutils-native', 'debuginfod', '--verbose', '-R', '-U', feed_dir])
|
||||
print("\nTo use the debuginfod server please ensure that this variable PACKAGECONFIG_pn-elfutils-native = \"debuginfod libdebuginfod\" is set in the local.conf")
|
||||
print("\nTo use the debuginfod server please ensure that this variable PACKAGECONFIG:pn-elfutils-native = \"debuginfod libdebuginfod\" is set in the local.conf")
|
||||
|
||||
@@ -96,7 +96,7 @@ def glob(args):
|
||||
pn = os.path.basename(pkgdata_file)
|
||||
with open(pkgdata_file, 'r') as f:
|
||||
for line in f:
|
||||
if line.startswith("PKG_%s:" % pn):
|
||||
if line.startswith("PKG:%s:" % pn):
|
||||
renamed = line.split(': ')[1].rstrip()
|
||||
return renamed
|
||||
|
||||
@@ -213,7 +213,7 @@ def lookup_pkglist(pkgs, pkgdata_dir, reverse):
|
||||
with open(pkgfile, 'r') as f:
|
||||
for line in f:
|
||||
fields = line.rstrip().split(': ')
|
||||
if fields[0] == 'PKG_%s' % pkg:
|
||||
if fields[0] == 'PKG:%s' % pkg:
|
||||
mappings[pkg].append(fields[1])
|
||||
break
|
||||
return mappings
|
||||
|
||||
Reference in New Issue
Block a user