1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

populate_sdk_ext: Add support for PR service

In the classes/populate_sdk_ext.bbclass the system already copies a number
of configurations, such as the hash equivalency data.  However, the PR
service was being handled.

The new code works by checking if PRSERV_HOST is defined, if it is, use
the existing export functions to write out a conf/prserv.inc file into
the eSDK.  On eSDK install, if a conf/prserv.inc file is present we then
import this file into the system.

This mechanism will work if the PRSERV_HOST is local or remote, as it pulls
the necessary data from the server and then imports it to a local database
on eSDK installation.

Note: the conf/prserv.inc file is not deleted at this time.  It was left
for possible debugging purposes, but removing it is something we could decide
to do in the future.

(From OE-Core rev: e207dabdfaa07cd5ebba1cd7dd58610f7185c7e2)

Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Mark Hatle
2021-03-25 19:16:44 -05:00
committed by Richard Purdie
parent eba2ca9aef
commit 3edc458cb9
2 changed files with 42 additions and 0 deletions
+17
View File
@@ -44,6 +44,23 @@ def main():
sdk_targets = []
else:
sdk_targets = ' '.join(sys.argv[2:]).split()
prserv = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'conf', 'prserv.inc')
if os.path.isfile(prserv):
with open(logfile, 'a') as logf:
logf.write('Importing PR data...\n')
ret = run_command_interruptible('bitbake-prserv-tool import %s' % prserv)
lastlog = get_last_consolelog()
if lastlog:
with open(lastlog, 'r') as f:
for line in f:
logf.write(line)
if ret:
print('ERROR: PR data import failed: error log written to %s' % logfile)
return ret
if not sdk_targets:
# Just do a parse so the cache is primed
ret = run_command_interruptible('bitbake -p --quiet')