summaryrefslogtreecommitdiffstats
path: root/meta/files
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@xilinx.com>2021-03-25 19:16:44 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-31 00:06:23 +0100
commit3edc458cb9ebe6a2b07dfa3e4769a30425397377 (patch)
treef086015a8be313594beedb26485740fe5ba07ea4 /meta/files
parenteba2ca9aef130535fede2a6dfcaea16fcb860f50 (diff)
downloadpoky-3edc458cb9ebe6a2b07dfa3e4769a30425397377.tar.gz
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>
Diffstat (limited to 'meta/files')
-rw-r--r--meta/files/ext-sdk-prepare.py17
1 files changed, 17 insertions, 0 deletions
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')