diff options
| -rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 25 | ||||
| -rw-r--r-- | meta/files/ext-sdk-prepare.py | 17 |
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index 14689ec6ac..84232ed9f5 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
| @@ -375,6 +375,10 @@ python copy_buildsystem () { | |||
| 375 | # Map gcc-dependent uninative sstate cache for installer usage | 375 | # Map gcc-dependent uninative sstate cache for installer usage |
| 376 | f.write('SSTATE_MIRRORS += " file://universal/(.*) file://universal-4.9/\\1 file://universal-4.9/(.*) file://universal-4.8/\\1"\n\n') | 376 | f.write('SSTATE_MIRRORS += " file://universal/(.*) file://universal-4.9/\\1 file://universal-4.9/(.*) file://universal-4.8/\\1"\n\n') |
| 377 | 377 | ||
| 378 | if d.getVar("PRSERV_HOST"): | ||
| 379 | # Override this, we now include PR data, so it should only point ot the local database | ||
| 380 | f.write('PRSERV_HOST = "localhost:0"\n\n') | ||
| 381 | |||
| 378 | # Allow additional config through sdk-extra.conf | 382 | # Allow additional config through sdk-extra.conf |
| 379 | fn = bb.cookerdata.findConfigFile('sdk-extra.conf', d) | 383 | fn = bb.cookerdata.findConfigFile('sdk-extra.conf', d) |
| 380 | if fn: | 384 | if fn: |
| @@ -398,6 +402,27 @@ python copy_buildsystem () { | |||
| 398 | bb.utils.mkdirhier(os.path.join(baseoutpath, 'cache')) | 402 | bb.utils.mkdirhier(os.path.join(baseoutpath, 'cache')) |
| 399 | shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat') | 403 | shutil.copyfile(builddir + '/cache/bb_unihashes.dat', baseoutpath + '/cache/bb_unihashes.dat') |
| 400 | 404 | ||
| 405 | # If PR Service is in use, we need to export this as well | ||
| 406 | bb.note('Do we have a pr database?') | ||
| 407 | if d.getVar("PRSERV_HOST"): | ||
| 408 | bb.note('Writing PR database...') | ||
| 409 | # Based on the code in classes/prexport.bbclass | ||
| 410 | import oe.prservice | ||
| 411 | #dump meta info of tables | ||
| 412 | localdata = d.createCopy() | ||
| 413 | localdata.setVar('PRSERV_DUMPOPT_COL', "1") | ||
| 414 | localdata.setVar('PRSERV_DUMPDIR', os.path.join(baseoutpath, 'conf')) | ||
| 415 | localdata.setVar('PRSERV_DUMPFILE', '${PRSERV_DUMPDIR}/prserv.inc') | ||
| 416 | |||
| 417 | bb.note('PR Database write to %s' % (localdata.getVar('PRSERV_DUMPFILE'))) | ||
| 418 | |||
| 419 | retval = oe.prservice.prserv_dump_db(localdata) | ||
| 420 | if not retval: | ||
| 421 | bb.error("prexport_handler: export failed!") | ||
| 422 | return | ||
| 423 | (metainfo, datainfo) = retval | ||
| 424 | oe.prservice.prserv_export_tofile(localdata, metainfo, datainfo, True) | ||
| 425 | |||
| 401 | # Use templateconf.cfg file from builddir if exists | 426 | # Use templateconf.cfg file from builddir if exists |
| 402 | if os.path.exists(builddir + '/conf/templateconf.cfg') and use_custom_templateconf == '1': | 427 | if os.path.exists(builddir + '/conf/templateconf.cfg') and use_custom_templateconf == '1': |
| 403 | shutil.copyfile(builddir + '/conf/templateconf.cfg', baseoutpath + '/conf/templateconf.cfg') | 428 | shutil.copyfile(builddir + '/conf/templateconf.cfg', baseoutpath + '/conf/templateconf.cfg') |
diff --git a/meta/files/ext-sdk-prepare.py b/meta/files/ext-sdk-prepare.py index 163d5e9912..d191e5e19c 100644 --- a/meta/files/ext-sdk-prepare.py +++ b/meta/files/ext-sdk-prepare.py | |||
| @@ -44,6 +44,23 @@ def main(): | |||
| 44 | sdk_targets = [] | 44 | sdk_targets = [] |
| 45 | else: | 45 | else: |
| 46 | sdk_targets = ' '.join(sys.argv[2:]).split() | 46 | sdk_targets = ' '.join(sys.argv[2:]).split() |
| 47 | |||
| 48 | prserv = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'conf', 'prserv.inc') | ||
| 49 | if os.path.isfile(prserv): | ||
| 50 | with open(logfile, 'a') as logf: | ||
| 51 | logf.write('Importing PR data...\n') | ||
| 52 | |||
| 53 | ret = run_command_interruptible('bitbake-prserv-tool import %s' % prserv) | ||
| 54 | |||
| 55 | lastlog = get_last_consolelog() | ||
| 56 | if lastlog: | ||
| 57 | with open(lastlog, 'r') as f: | ||
| 58 | for line in f: | ||
| 59 | logf.write(line) | ||
| 60 | if ret: | ||
| 61 | print('ERROR: PR data import failed: error log written to %s' % logfile) | ||
| 62 | return ret | ||
| 63 | |||
| 47 | if not sdk_targets: | 64 | if not sdk_targets: |
| 48 | # Just do a parse so the cache is primed | 65 | # Just do a parse so the cache is primed |
| 49 | ret = run_command_interruptible('bitbake -p --quiet') | 66 | ret = run_command_interruptible('bitbake -p --quiet') |
