summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-01-23 00:59:51 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-24 09:40:32 +0000
commit44d1a2a45c4d92f331aef1a95adb6b12743d24cd (patch)
treebd4d1c53ca62bb40c14eee04c6a40141ac01169c /meta/classes
parent3360baa96bb2ebd54efaba0fb9aa9a1c9093c233 (diff)
downloadpoky-44d1a2a45c4d92f331aef1a95adb6b12743d24cd.tar.gz
devtool: sdk-update: improve SDK update process robustness
Make the following improvements to the SDK update process: * Use a manifest file with sha256sums to track files other than sstate and metadata that we need to update - e.g. conf files. This allows us to handle where files such as auto.conf may or may not be present, as well as the configuration changing without affecting task signatures - we still want the config files copied in that case rather than it saying nothing needs to be done. * Write the SSTATE_MIRRORS_append to site.conf rather than local.conf so that local.conf remains static (since we don't want to trigger an update every time). Also, If there is an SSTATE_MIRRORS value already set in the configuration we can skip this and assume it contains the needed packages. * Allow the update process to be run in any directory, don't assume we're already at the base of the SDK * Where practical, fetch remote files into a temporary location and then move them to the desired location at the end, to avoid a failed update leaving the SDK in a broken state. * Update all installed do_populate_sysroot / do_packagedata tasks instead of using the SDK targets. This ensures any item installed through dependencies after installation (e.g. when running "devtool build") won't go stale. (From OE-Core rev: 3d35631121f0e030bc8151f5c23d84008d06f44b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/populate_sdk_ext.bbclass16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index ebb57bba6b..bb8831bf31 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -47,6 +47,7 @@ SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME', True) or d.getVar(
47python copy_buildsystem () { 47python copy_buildsystem () {
48 import re 48 import re
49 import shutil 49 import shutil
50 import glob
50 import oe.copy_buildsystem 51 import oe.copy_buildsystem
51 52
52 oe_init_env_script = d.getVar('OE_INIT_ENV_SCRIPT', True) 53 oe_init_env_script = d.getVar('OE_INIT_ENV_SCRIPT', True)
@@ -224,6 +225,21 @@ python copy_buildsystem () {
224 if name.endswith("_package.tgz"): 225 if name.endswith("_package.tgz"):
225 f = os.path.join(root, name) 226 f = os.path.join(root, name)
226 os.remove(f) 227 os.remove(f)
228
229 # Write manifest file
230 # Note: at the moment we cannot include the env setup script here to keep
231 # it updated, since it gets modified during SDK installation (see
232 # sdk_ext_postinst() below) thus the checksum we take here would always
233 # be different.
234 manifest_file_list = ['conf/*']
235 manifest_file = os.path.join(baseoutpath, 'conf', 'sdk-conf-manifest')
236 with open(manifest_file, 'w') as f:
237 for item in manifest_file_list:
238 for fn in glob.glob(os.path.join(baseoutpath, item)):
239 if fn == manifest_file:
240 continue
241 chksum = bb.utils.sha256_file(fn)
242 f.write('%s\t%s\n' % (chksum, os.path.relpath(fn, baseoutpath)))
227} 243}
228 244
229def extsdk_get_buildtools_filename(d): 245def extsdk_get_buildtools_filename(d):