Locked sstate / SDK changes
cover Locked sstate / SDK changes
A couple of changes related to the developer workflow work (see
https://bugzilla.yoctoproject.org/show_bug.cgi?id=6662 ). Unfortunately the user facing parts of that are some way off being ready for submission but here are a couple of the minimal core pieces we need to make those work.
(Note that these are on top of Richard's locked sigs changes that are still in review.)
The following changes since commit 00e869965818a08cec1ec4f48c35dcf0fe0d6959:
sstatesig: Improve to handle locking of multiple machines (2014-09-10 18:15:41 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/sdkchanges
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/sdkchanges
Paul Eggleton (1):
classes/populate_sdk_base: enable adding custom commands to SDK
install script
Randy Witt (1):
sstatesig.py: Add a path argument to dump_lockedsigs()
meta/classes/populate_sdk_base.bbclass | 7 +++++++ meta/files/toolchain-shar-template.sh | 2 ++ meta/lib/oe/sstatesig.py | 7 ++++--- 3 files changed, 13 insertions(+), 3 deletions(-)
Signature · 1 line
1.9.3
PATCH 1/2 classes/populate_sdk_base: enable adding custom commands to SDK install script
Add an SDK_POST_INSTALL_COMMAND variable which allows additional commands to be added towards the end of the SDK install script, for e.g. additional processing that needs to be done as part of installing the SDK.
--- meta/classes/populate_sdk_base.bbclass | 7 +++++++ meta/files/toolchain-shar-template.sh | 2 ++ 2 files changed, 9 insertions(+)
meta/classes/populate_sdk_base.bbclass +7 -0
@@ -51,6 +51,7 @@ PID = "${@os.getpid()}" EXCLUDE_FROM_WORLD = "1" SDK_PACKAGING_FUNC ?= "create_shar" +SDK_POST_INSTALL_COMMAND ?= "" SDK_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.manifest" python write_target_sdk_manifest () {
@@ -142,10 +143,16 @@ fakeroot create_shar() { # copy in the template shar extractor script cp ${COREBASE}/meta/files/toolchain-shar-template.sh ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh + cat << "EOF" > ${T}/post_install_command +${SDK_POST_INSTALL_COMMAND} +EOF + sed -i -e '/@SDK_POST_INSTALL_COMMAND@/r ${T}/post_install_command' ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh + # substitute variables sed -i -e 's#@SDK_ARCH@#${SDK_ARCH}#g' \ -e 's#@SDKPATH@#${SDKPATH}#g' \ -e 's#@REAL_MULTIMACH_TARGET_SYS@#${REAL_MULTIMACH_TARGET_SYS}#g' \ + -e '/@SDK_POST_INSTALL_COMMAND@/d' \ ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh # add execution permission
meta/files/toolchain-shar-template.sh +2 -0
@@ -169,6 +169,8 @@ done echo done +@SDK_POST_INSTALL_COMMAND@ + # delete the relocating script, so that user is forced to re-run the installer # if he/she wants another location for the sdk if [ $savescripts = 0 ] ; then
Signature · 1 line
1.9.3
PATCH 2/2 sstatesig.py: Add a path argument to dump_lockedsigs()
In reply to Paul EggletonFrom: Randy Witt <[email protected]>
Previously the function always used os.getcwd() for the location to write the locked signatures file. However, that isn't easily used by calling tasks, so only use os.getcwd() if the caller doesn't specify a path.
--- meta/lib/oe/sstatesig.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
meta/lib/oe/sstatesig.py +4 -3
@@ -130,8 +130,9 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash): return super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigtask(fn, task, stampbase, runtime) - def dump_lockedsigs(self): - bb.plain("Writing locked sigs to " + os.getcwd() + "/locked-sigs.inc") + def dump_lockedsigs(self, path=os.getcwd()): + outfile = os.path.join(path, "locked-sigs.inc") + bb.plain("Writing locked sigs to %s" % outfile) types = {} for k in self.runtaskdeps: fn = k.rsplit(".",1)[0]
@@ -140,7 +141,7 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash): types[t] = [] types[t].append(k) - with open("locked-sigs.inc", "w") as f: + with open(outfile, "w") as f: for t in types: f.write('SIGGEN_LOCKEDSIGS_%s = "\\\n' % t) types[t].sort()
Signature · 1 line
1.9.3
Quoted 8 lines · Paul Eggleton
A couple of changes related to the developer workflow work (see
https://bugzilla.yoctoproject.org/show_bug.cgi?id=6662 ). Unfortunately the user facing parts of that are some way off being ready for submission but here are a couple of the minimal core pieces we need to make those work.(Note that these are on top of Richard's locked sigs changes that are still in review.)
These mails took a day to arrive, can you re-base them on top of Hongxu's series?
Ross