diff options
Diffstat (limited to 'poky/meta/classes/populate_sdk_ext.bbclass')
-rw-r--r-- | poky/meta/classes/populate_sdk_ext.bbclass | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/poky/meta/classes/populate_sdk_ext.bbclass b/poky/meta/classes/populate_sdk_ext.bbclass index e6bf27cf38..84232ed9f5 100644 --- a/poky/meta/classes/populate_sdk_ext.bbclass +++ b/poky/meta/classes/populate_sdk_ext.bbclass @@ -251,7 +251,9 @@ python copy_buildsystem () { # Create a layer for new recipes / appends bbpath = d.getVar('BBPATH') - bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')]) + 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) # Create bblayers.conf bb.utils.mkdirhier(baseoutpath + '/conf') @@ -364,12 +366,19 @@ python copy_buildsystem () { # Hide the config information from bitbake output (since it's fixed within the SDK) f.write('BUILDCFG_HEADER = ""\n\n') + # Write METADATA_REVISION + f.write('METADATA_REVISION = "%s"\n\n' % d.getVar('METADATA_REVISION')) + f.write('# Provide a flag to indicate we are in the EXT_SDK Context\n') f.write('WITHIN_EXT_SDK = "1"\n\n') # Map gcc-dependent uninative sstate cache for installer usage f.write('SSTATE_MIRRORS += " file://universal/(.*) file://universal-4.9/\\1 file://universal-4.9/(.*) file://universal-4.8/\\1"\n\n') + if d.getVar("PRSERV_HOST"): + # Override this, we now include PR data, so it should only point ot the local database + f.write('PRSERV_HOST = "localhost:0"\n\n') + # Allow additional config through sdk-extra.conf fn = bb.cookerdata.findConfigFile('sdk-extra.conf', d) if fn: @@ -393,6 +402,27 @@ python copy_buildsystem () { bb.utils.mkdirhier(os.path.join(baseoutpath, 'cache')) shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat') + # If PR Service is in use, we need to export this as well + bb.note('Do we have a pr database?') + if d.getVar("PRSERV_HOST"): + bb.note('Writing PR database...') + # Based on the code in classes/prexport.bbclass + import oe.prservice + #dump meta info of tables + localdata = d.createCopy() + localdata.setVar('PRSERV_DUMPOPT_COL', "1") + localdata.setVar('PRSERV_DUMPDIR', os.path.join(baseoutpath, 'conf')) + localdata.setVar('PRSERV_DUMPFILE', '${PRSERV_DUMPDIR}/prserv.inc') + + bb.note('PR Database write to %s' % (localdata.getVar('PRSERV_DUMPFILE'))) + + retval = oe.prservice.prserv_dump_db(localdata) + if not retval: + bb.error("prexport_handler: export failed!") + return + (metainfo, datainfo) = retval + oe.prservice.prserv_export_tofile(localdata, metainfo, datainfo, True) + # Use templateconf.cfg file from builddir if exists if os.path.exists(builddir + '/conf/templateconf.cfg') and use_custom_templateconf == '1': shutil.copyfile(builddir + '/conf/templateconf.cfg', baseoutpath + '/conf/templateconf.cfg') |