toaster: cummulative 20082017 patch
cover toaster: cummulative 20082017 patch
From: David Reyna <[email protected]>
This is a summulative patch for Toaster for M3
WARNING: there is a new file added with this patch:
.../orm/fixtures/custom_toaster_append.sh_sample
1) 0001-toaster-custom-image-updates-and-original-creation.patch
This fixes an issue modifying custom images, specifically around the dependent packages.
2) 0002-Toaster-custom-start-and-stop-actions.patch
This enables customers and commercial partners to add custom actions when Toaster is started and stopped. A specific usage is to enable 'anspass" servers for git repositories that are behind name/password protection.
The following changes since commit 04dc76713b57f28457742dd863caa663591d4866:
devtool/copy_buildsystem: adds meta-skeleton layer in the eSDK installation. (2017-08-19 22:15:39 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib dreyna/submit/dreyna/toaster/cummulative_200817_patch
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=dreyna/submit/dreyna/toaster/cummulative_200817_patch
David Reyna (2):
toaster: custom image updates and original creation
Toaster: custom start and stop actions
bin/toaster | 22 ++++- .../orm/fixtures/custom_toaster_append.sh_sample | 49 +++++++++++ lib/toaster/orm/models.py | 2 +- lib/toaster/toastergui/api.py | 98 ++++++++++++++-------- 4 files changed, 131 insertions(+), 40 deletions(-) create mode 100755 bitbake/lib/toaster/orm/fixtures/custom_toaster_append.sh_sample
Signature · 1 line
1.9.1
PATCH 1/2 toaster: custom image updates and original creation
From: David Reyna <[email protected]>
When Toaster removes a package from a custom image, it must also always remove the advised reverse-dependent recipes. Similarly, when adding a package it must always add its advised the packages it depends on. This code must be un-indented so that it applies to all respective added or removed packages.
Toaster normally waits until a new custom image is built before creating the custom layer and the recipe. However, an intermediate different build can fail because the recipe has already been added to the project, so the image's default recipe must be created when the image is created.
[YOCTO #11915]
--- lib/toaster/orm/models.py | 2 +- lib/toaster/toastergui/api.py | 98 +++++++++++++++++++++++++++---------------- 2 files changed, 62 insertions(+), 38 deletions(-)
lib/toaster/orm/models.py +1 -1
@@ -1658,7 +1658,7 @@ class CustomImageRecipe(Recipe): def get_base_recipe_file(self): """Get the base recipe file path if it exists on the file system""" - path_schema_one = "%s/%s" % (self.base_recipe.layer_version.dirpath, + path_schema_one = "%s/%s" % (self.base_recipe.layer_version.local_path, self.base_recipe.file_path) path_schema_two = self.base_recipe.file_path
lib/toaster/toastergui/api.py +61 -37
135 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 2/2 Toaster: custom start and stop actions
In reply to David ReynaFrom: David Reyna <[email protected]>
Toaster needs the ability to allow custom extensions to execute when Toaster is started and stopped. Toaster will look for a custom extension script in the fixtures directory and execute any applicable hooks.
[YOCTO #11938]
--- bin/toaster | 22 +++++++++- .../orm/fixtures/custom_toaster_append.sh_sample | 49 ++++++++++++++++++++++ 2 files changed, 69 insertions(+), 2 deletions(-) create mode 100755 bitbake/lib/toaster/orm/fixtures/custom_toaster_append.sh_sample
bin/toaster +20 -2
@@ -24,6 +24,14 @@ Usage: source toaster start|stop [webport=<address:port>] [noweb] [webport] Set the development server (default: localhost:8000) " +custom_extention() +{ + custom_extension=$BBBASEDIR/lib/toaster/orm/fixtures/custom_toaster_append.sh + if [ -f $custom_extension ] ; then + $custom_extension $* + fi +} + databaseCheck() { retval=0
@@ -50,6 +58,11 @@ databaseCheck() webserverKillAll() { local pidfile + if [ -f ${BUILDDIR}/.toastermain.pid ] ; then + custom_extention web_stop_postpend + else + custom_extention noweb_stop_postpend + fi for pidfile in ${BUILDDIR}/.toastermain.pid ${BUILDDIR}/.runbuilds.pid; do if [ -f ${pidfile} ]; then pid=`cat ${pidfile}`
@@ -89,6 +102,7 @@ webserverStartAll() else echo "Toaster development webserver started at http://$ADDR_PORT" echo -e "\nYou can now run 'bitbake <target>' on the command line and monitor your build in Toaster.\nYou can also use a Toaster project to configure and run a build.\n" + custom_extention web_start_postpend $ADDR_PORT fi return $retval
@@ -168,7 +182,6 @@ fi unset OE_ROOT - WEBSERVER=1 ADDR_PORT="localhost:8000" unset CMD
@@ -241,6 +254,7 @@ fi echo "The system will $CMD." # Execute the commands +custom_extention toaster_prepend $CMD $ADDR_PORT case $CMD in start )
@@ -262,9 +276,10 @@ case $CMD in if [ ! -f "$TOASTER_DIR/toaster.sqlite" ] ; then if ! databaseCheck; then echo "Failed ${CMD}." - return 4 + return 4 fi fi + custom_extention noweb_start_postpend $ADDR_PORT fi if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then echo "Failed ${CMD}."
@@ -278,6 +293,7 @@ case $CMD in # set fail safe stop system on terminal exit trap stop_system SIGHUP echo "Successful ${CMD}." + custom_extention toaster_postpend $CMD $ADDR_PORT return 0 ;; stop )
@@ -285,3 +301,5 @@ case $CMD in echo "Successful ${CMD}." ;; esac +custom_extention toaster_postpend $CMD $ADDR_PORT +
lib/toaster/orm/fixtures/custom_toaster_append.sh_sample new file +49 -0
49 lines not on this page · raw message
Signature · 1 line
1.9.1