mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 17:39:31 +00:00
devtool/friends: Use LAYERSERIES_CORENAMES when generating LAYERSERIES_COMPAT entries
It seems some layers want to subvert the intent of LAYERSERIES_COMPAT so bitbake is going to have to become stricter about the values there. To work with this, use LAYERSERIES_CORENAMES to generate the entries in LAYERSERIES_COMPAT instead of the current magic LAYERSERIES_COMPAT_core value which may not continue to work. The downside to this is when migating between releases, people would need to update devtool workspace layer.conf files. I guess you could argue this is a feature! (From OE-Core rev: 96ff9baa8ead57504f40f362ed3a4aaa776d1b58) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -255,7 +255,7 @@ python copy_buildsystem () {
|
||||
bbpath = d.getVar('BBPATH')
|
||||
env = os.environ.copy()
|
||||
env['PYTHONDONTWRITEBYTECODE'] = '1'
|
||||
bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')], env=env)
|
||||
bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--layerseries', d.getVar("LAYERSERIES_CORENAMES"), '--create-only', os.path.join(baseoutpath, 'workspace')], env=env)
|
||||
|
||||
# Create bblayers.conf
|
||||
bb.utils.mkdirhier(baseoutpath + '/conf')
|
||||
@@ -498,7 +498,6 @@ python copy_buildsystem () {
|
||||
else:
|
||||
tasklistfn = None
|
||||
|
||||
|
||||
cachedir = os.path.join(baseoutpath, 'cache')
|
||||
bb.utils.mkdirhier(cachedir)
|
||||
bb.parse.siggen.copy_unitaskhashes(cachedir)
|
||||
|
||||
@@ -53,7 +53,7 @@ class CreatePlugin(LayerPlugin):
|
||||
shutil.copy(license_src, license_dst)
|
||||
|
||||
# Get the compat value for core layer.
|
||||
compat = self.tinfoil.config_data.getVar('LAYERSERIES_COMPAT_core') or ""
|
||||
compat = self.tinfoil.config_data.getVar('LAYERSERIES_CORENAMES') or ""
|
||||
|
||||
# Create the layer.conf from templates/layer.conf
|
||||
layerconf_template = read_template('layer.conf').format(
|
||||
|
||||
@@ -1076,9 +1076,10 @@ class DevtoolUpdateTests(DevtoolBase):
|
||||
def test_devtool_update_recipe_append_git(self):
|
||||
# Check preconditions
|
||||
testrecipe = 'mtd-utils-selftest'
|
||||
bb_vars = get_bb_vars(['FILE', 'SRC_URI'], testrecipe)
|
||||
bb_vars = get_bb_vars(['FILE', 'SRC_URI', 'LAYERSERIES_CORENAMES'], testrecipe)
|
||||
recipefile = bb_vars['FILE']
|
||||
src_uri = bb_vars['SRC_URI']
|
||||
corenames = bb_vars['LAYERSERIES_CORENAMES']
|
||||
self.assertIn('git://', src_uri, 'This test expects the %s recipe to be a git recipe' % testrecipe)
|
||||
for entry in src_uri.split():
|
||||
if entry.startswith('git://'):
|
||||
@@ -1109,7 +1110,7 @@ class DevtoolUpdateTests(DevtoolBase):
|
||||
f.write('BBFILE_PATTERN_oeselftesttemplayer = "^${LAYERDIR}/"\n')
|
||||
f.write('BBFILE_PRIORITY_oeselftesttemplayer = "999"\n')
|
||||
f.write('BBFILE_PATTERN_IGNORE_EMPTY_oeselftesttemplayer = "1"\n')
|
||||
f.write('LAYERSERIES_COMPAT_oeselftesttemplayer = "${LAYERSERIES_COMPAT_core}"\n')
|
||||
f.write('LAYERSERIES_COMPAT_oeselftesttemplayer = "%s"\n' % corenames)
|
||||
self.add_command_to_tearDown('bitbake-layers remove-layer %s || true' % templayerdir)
|
||||
result = runCmd('bitbake-layers add-layer %s' % templayerdir, cwd=self.builddir)
|
||||
# Create the bbappend
|
||||
|
||||
@@ -300,6 +300,7 @@ def get_test_layer():
|
||||
|
||||
def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec='recipes-*/*'):
|
||||
os.makedirs(os.path.join(templayerdir, 'conf'))
|
||||
corenames = get_bb_var('LAYERSERIES_CORENAMES')
|
||||
with open(os.path.join(templayerdir, 'conf', 'layer.conf'), 'w') as f:
|
||||
f.write('BBPATH .= ":${LAYERDIR}"\n')
|
||||
f.write('BBFILES += "${LAYERDIR}/%s/*.bb \\' % recipepathspec)
|
||||
@@ -308,7 +309,7 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec=
|
||||
f.write('BBFILE_PATTERN_%s = "^${LAYERDIR}/"\n' % templayername)
|
||||
f.write('BBFILE_PRIORITY_%s = "%d"\n' % (templayername, priority))
|
||||
f.write('BBFILE_PATTERN_IGNORE_EMPTY_%s = "1"\n' % templayername)
|
||||
f.write('LAYERSERIES_COMPAT_%s = "${LAYERSERIES_COMPAT_core}"\n' % templayername)
|
||||
f.write('LAYERSERIES_COMPAT_%s = "%s"\n' % (templayername, corenames))
|
||||
|
||||
@contextlib.contextmanager
|
||||
def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}, discard_writes=True):
|
||||
|
||||
Reference in New Issue
Block a user