* [PATCH 0/4] Fixes for toaster script
@ 2015-10-14 12:33 Ed Bartosh
2015-10-14 12:33 ` [PATCH 1/4] toaster: use path to the script to guess config path Ed Bartosh
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: Ed Bartosh @ 2015-10-14 12:33 UTC (permalink / raw)
To: toaster
Hi,
This patchset should make toaster script working in both modes.
It was not possible due to the way TOASTER_CONF variable was set.
The following changes since commit c1ba977bf55424bf9f9e899db89eafa338edccb4:
toaster: importlayer Update property names for importlayer api calls (2015-10-14 14:11:23 +0300)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ed/toaster/fixes-for-toaster-script
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/fixes-for-toaster-script
Ed Bartosh (4):
toaster: use path to the script to guess config path
toaster: get rid of SRCFILE
toaster: set TOASTER_MANAGED variable
toaster: exit or return depending on the mode
bitbake/bin/toaster | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH 1/4] toaster: use path to the script to guess config path 2015-10-14 12:33 [PATCH 0/4] Fixes for toaster script Ed Bartosh @ 2015-10-14 12:33 ` Ed Bartosh 2015-10-14 12:33 ` [PATCH 2/4] toaster: get rid of SRCFILE Ed Bartosh ` (3 subsequent siblings) 4 siblings, 0 replies; 14+ messages in thread From: Ed Bartosh @ 2015-10-14 12:33 UTC (permalink / raw) To: toaster Used $TOASTER variable(path to the toaster script) instead of current directory name to get path to the toasterconf.json This way script should work in both modes and it doesn't depend on the current directory. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> --- bitbake/bin/toaster | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index bc439e6..241d546 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster @@ -173,11 +173,11 @@ fi # in the local layers that currently prevent using an arbitrary # toasterconf.json if [ "$TOASTER_CONF" = "" ]; then - BIN_DIR=$(dirname -- "$0") - export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" + TOASTER_CONF="$(dirname $TOASTER)/../../meta/conf/toasterconf.json" + export TOASTER_CONF=$(realpath $TOASTER_CONF) fi if [ ! -f $TOASTER_CONF ]; then - echo "$TOASTER_CONF configuration file not found, exiting..." + echo "$TOASTER_CONF configuration file not found. set TOASTER_CONF to specify a path" exit 1; fi # this defines the dir toaster will use for -- 2.1.4 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/4] toaster: get rid of SRCFILE 2015-10-14 12:33 [PATCH 0/4] Fixes for toaster script Ed Bartosh 2015-10-14 12:33 ` [PATCH 1/4] toaster: use path to the script to guess config path Ed Bartosh @ 2015-10-14 12:33 ` Ed Bartosh 2015-10-14 12:33 ` [PATCH 3/4] toaster: set TOASTER_MANAGED variable Ed Bartosh ` (2 subsequent siblings) 4 siblings, 0 replies; 14+ messages in thread From: Ed Bartosh @ 2015-10-14 12:33 UTC (permalink / raw) To: toaster Used TOASTER variable instead of SRCFILE as they're essentially the same. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> --- bitbake/bin/toaster | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index 241d546..9201a33 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster @@ -211,9 +211,7 @@ for param in $*; do esac done -[ -n "${BASH_SOURCE}" ] && SRCFILE=${BASH_SOURCE} || SRCFILE=$_ - -if [ `basename \"$0\"` = `basename \"${SRCFILE}\"` ]; then +if [ `basename \"$0\"` = `basename \"${TOASTER}\"` ]; then # We are called as standalone. We refuse to run in a build environment - we need the interactive mode for that. # Start just the web server, point the web browser to the interface, and start any Django services. -- 2.1.4 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/4] toaster: set TOASTER_MANAGED variable 2015-10-14 12:33 [PATCH 0/4] Fixes for toaster script Ed Bartosh 2015-10-14 12:33 ` [PATCH 1/4] toaster: use path to the script to guess config path Ed Bartosh 2015-10-14 12:33 ` [PATCH 2/4] toaster: get rid of SRCFILE Ed Bartosh @ 2015-10-14 12:33 ` Ed Bartosh 2015-10-14 12:33 ` [PATCH 4/4] toaster: exit or return depending on the mode Ed Bartosh 2015-10-14 13:10 ` [PATCH 0/4] Fixes for toaster script Barros Pena, Belen 4 siblings, 0 replies; 14+ messages in thread From: Ed Bartosh @ 2015-10-14 12:33 UTC (permalink / raw) To: toaster Set TOASTER_MANAGED to 1 if toaster is run as a script. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> --- bitbake/bin/toaster | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index 9201a33..2f6fed9 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster @@ -155,6 +155,8 @@ else TOASTER=$0 fi +[ `basename \"$0\"` = `basename \"${TOASTER}\"` ] && TOASTER_MANAGED=1 + BBBASEDIR=`dirname $TOASTER`/.. RUNNING=0 @@ -211,7 +213,7 @@ for param in $*; do esac done -if [ `basename \"$0\"` = `basename \"${TOASTER}\"` ]; then +if [ "$TOASTER_MANAGED" = '1' ]; then # We are called as standalone. We refuse to run in a build environment - we need the interactive mode for that. # Start just the web server, point the web browser to the interface, and start any Django services. @@ -258,8 +260,6 @@ if [ `basename \"$0\"` = `basename \"${TOASTER}\"` ]; then do_cleanup fi } - TOASTER_MANAGED=1 - export TOASTER_MANAGED=1 if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then echo "Failed to start the web server, stopping" 1>&2 cleanup -- 2.1.4 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/4] toaster: exit or return depending on the mode 2015-10-14 12:33 [PATCH 0/4] Fixes for toaster script Ed Bartosh ` (2 preceding siblings ...) 2015-10-14 12:33 ` [PATCH 3/4] toaster: set TOASTER_MANAGED variable Ed Bartosh @ 2015-10-14 12:33 ` Ed Bartosh 2015-10-14 13:10 ` [PATCH 0/4] Fixes for toaster script Barros Pena, Belen 4 siblings, 0 replies; 14+ messages in thread From: Ed Bartosh @ 2015-10-14 12:33 UTC (permalink / raw) To: toaster When toaster script is sourced 'return' should be used as using 'exit' will cause script to exit the shell and close terminal window. If script is called 'exit' should be used. Otherwise shell will throw and error: return: can only `return' from a function or sourced script Used 'return' or 'exit' depending on the toaster mode using TOASTER_MANAGED variable. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> --- bitbake/bin/toaster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index 2f6fed9..2571714 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster @@ -180,7 +180,7 @@ if [ "$TOASTER_CONF" = "" ]; then fi if [ ! -f $TOASTER_CONF ]; then echo "$TOASTER_CONF configuration file not found. set TOASTER_CONF to specify a path" - exit 1; + [ "$TOASTER_MANAGED" = '1' ] && exit 1 || return 1 fi # this defines the dir toaster will use for # 1) clones of layers (in _toaster_clones ) -- 2.1.4 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] Fixes for toaster script 2015-10-14 12:33 [PATCH 0/4] Fixes for toaster script Ed Bartosh ` (3 preceding siblings ...) 2015-10-14 12:33 ` [PATCH 4/4] toaster: exit or return depending on the mode Ed Bartosh @ 2015-10-14 13:10 ` Barros Pena, Belen 2015-10-14 20:00 ` Brian Avery 4 siblings, 1 reply; 14+ messages in thread From: Barros Pena, Belen @ 2015-10-14 13:10 UTC (permalink / raw) To: Ed Bartosh, toaster@yoctoproject.org On 14/10/2015 13:33, "toaster-bounces@yoctoproject.org on behalf of Ed Bartosh" <toaster-bounces@yoctoproject.org on behalf of ed.bartosh@linux.intel.com> wrote: >Hi, > >This patchset should make toaster script working in both modes. >It was not possible due to the way TOASTER_CONF variable was set. > >The following changes since commit >c1ba977bf55424bf9f9e899db89eafa338edccb4: > > toaster: importlayer Update property names for importlayer api calls >(2015-10-14 14:11:23 +0300) > >are available in the git repository at: > > git://git.yoctoproject.org/poky-contrib >ed/toaster/fixes-for-toaster-script > >http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/fixes- >for-toaster-script Pending code review, this works for me. I can start toaster in 'build' mode the usual way (bitbake/bin/toaster) and I can start toaster in 'analysis' mode by sourcing the build environment script, then sourcing the toaster script (. ../bitbake/bin/toaster). Both modes build for me, and cli builds are picked up by Toaster. Cheers Belén > >Ed Bartosh (4): > toaster: use path to the script to guess config path > toaster: get rid of SRCFILE > toaster: set TOASTER_MANAGED variable > toaster: exit or return depending on the mode > > bitbake/bin/toaster | 16 +++++++--------- > 1 file changed, 7 insertions(+), 9 deletions(-) > >-- >2.1.4 > >-- >_______________________________________________ >toaster mailing list >toaster@yoctoproject.org >https://lists.yoctoproject.org/listinfo/toaster ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] Fixes for toaster script 2015-10-14 13:10 ` [PATCH 0/4] Fixes for toaster script Barros Pena, Belen @ 2015-10-14 20:00 ` Brian Avery 2015-10-14 23:55 ` Brian Avery 0 siblings, 1 reply; 14+ messages in thread From: Brian Avery @ 2015-10-14 20:00 UTC (permalink / raw) To: Barros Pena, Belen; +Cc: toaster@yoctoproject.org Tried it but had an issue. To replicate issue be in a directory that is *not* poky > ~/src/poky/bitbake/bin/toaster then make a new project. you will see that it does not have enough layers. (missing meta and meta-yocto) building bash then fails with ShellCmdException: command: git clone "" "/home/bavery/src/intel/yocto-builds/TOASTER/myBugs2/elliot-cli-8231/managed/_toaster_clones/__master" fatal: repository '' does not exist Note, if this is done from the poky directory, it works, but it needs to work from a build dir as well so people do not *have* to dirty up their src dir. -b On Wed, Oct 14, 2015 at 6:10 AM, Barros Pena, Belen <belen.barros.pena@intel.com> wrote: > > > On 14/10/2015 13:33, "toaster-bounces@yoctoproject.org on behalf of Ed > Bartosh" <toaster-bounces@yoctoproject.org on behalf of > ed.bartosh@linux.intel.com> wrote: > >>Hi, >> >>This patchset should make toaster script working in both modes. >>It was not possible due to the way TOASTER_CONF variable was set. >> >>The following changes since commit >>c1ba977bf55424bf9f9e899db89eafa338edccb4: >> >> toaster: importlayer Update property names for importlayer api calls >>(2015-10-14 14:11:23 +0300) >> >>are available in the git repository at: >> >> git://git.yoctoproject.org/poky-contrib >>ed/toaster/fixes-for-toaster-script >> >>http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/fixes- >>for-toaster-script > > Pending code review, this works for me. I can start toaster in 'build' > mode the usual way (bitbake/bin/toaster) and I can start toaster in > 'analysis' mode by sourcing the build environment script, then sourcing > the toaster script (. ../bitbake/bin/toaster). > > Both modes build for me, and cli builds are picked up by Toaster. > > Cheers > > Belén > >> >>Ed Bartosh (4): >> toaster: use path to the script to guess config path >> toaster: get rid of SRCFILE >> toaster: set TOASTER_MANAGED variable >> toaster: exit or return depending on the mode >> >> bitbake/bin/toaster | 16 +++++++--------- >> 1 file changed, 7 insertions(+), 9 deletions(-) >> >>-- >>2.1.4 >> >>-- >>_______________________________________________ >>toaster mailing list >>toaster@yoctoproject.org >>https://lists.yoctoproject.org/listinfo/toaster > > -- > _______________________________________________ > toaster mailing list > toaster@yoctoproject.org > https://lists.yoctoproject.org/listinfo/toaster ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] Fixes for toaster script 2015-10-14 20:00 ` Brian Avery @ 2015-10-14 23:55 ` Brian Avery 2015-10-15 0:55 ` Brian Avery 0 siblings, 1 reply; 14+ messages in thread From: Brian Avery @ 2015-10-14 23:55 UTC (permalink / raw) To: Barros Pena, Belen; +Cc: toaster@yoctoproject.org The source of the problem is that you switched from the meta-yocto toasterconf to the meta toasterconf as the default. The meta/conf/toasterconf.json is only for pure open embedded (non poky) runs. It shouldn't be the default as it can't build anything unless you add some layers by hand. - export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" + TOASTER_CONF="$(dirname $TOASTER)/../../meta/conf/toasterconf.json" On the assumption that this was a typo, I amended your git 8d7023f41 to be meta-yocto and signed off on it. I also signed off on the other 3 commits. If you agree that this amend makes sense, go ahead and upstream it and add it to toaster-next. It already has 2 signoffs on it so it's good to go. the branch with the 2 signoffs is on bavery/submit/ed/2015-10-14_fix-script-for-2-modes on poky-contrib. -b On Wed, Oct 14, 2015 at 1:00 PM, Brian Avery <avery.brian@gmail.com> wrote: > Tried it but had an issue. > To replicate issue > be in a directory that is *not* poky >> ~/src/poky/bitbake/bin/toaster > then make a new project. > you will see that it does not have enough layers. (missing meta and meta-yocto) > building bash then fails with > ShellCmdException: command: git clone "" > "/home/bavery/src/intel/yocto-builds/TOASTER/myBugs2/elliot-cli-8231/managed/_toaster_clones/__master" > > fatal: repository '' does not exist > > > Note, if this is done from the poky directory, it works, but it needs > to work from a build dir as well so people do not *have* to dirty up > their src dir. > -b > > On Wed, Oct 14, 2015 at 6:10 AM, Barros Pena, Belen > <belen.barros.pena@intel.com> wrote: >> >> >> On 14/10/2015 13:33, "toaster-bounces@yoctoproject.org on behalf of Ed >> Bartosh" <toaster-bounces@yoctoproject.org on behalf of >> ed.bartosh@linux.intel.com> wrote: >> >>>Hi, >>> >>>This patchset should make toaster script working in both modes. >>>It was not possible due to the way TOASTER_CONF variable was set. >>> >>>The following changes since commit >>>c1ba977bf55424bf9f9e899db89eafa338edccb4: >>> >>> toaster: importlayer Update property names for importlayer api calls >>>(2015-10-14 14:11:23 +0300) >>> >>>are available in the git repository at: >>> >>> git://git.yoctoproject.org/poky-contrib >>>ed/toaster/fixes-for-toaster-script >>> >>>http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/fixes- >>>for-toaster-script >> >> Pending code review, this works for me. I can start toaster in 'build' >> mode the usual way (bitbake/bin/toaster) and I can start toaster in >> 'analysis' mode by sourcing the build environment script, then sourcing >> the toaster script (. ../bitbake/bin/toaster). >> >> Both modes build for me, and cli builds are picked up by Toaster. >> >> Cheers >> >> Belén >> >>> >>>Ed Bartosh (4): >>> toaster: use path to the script to guess config path >>> toaster: get rid of SRCFILE >>> toaster: set TOASTER_MANAGED variable >>> toaster: exit or return depending on the mode >>> >>> bitbake/bin/toaster | 16 +++++++--------- >>> 1 file changed, 7 insertions(+), 9 deletions(-) >>> >>>-- >>>2.1.4 >>> >>>-- >>>_______________________________________________ >>>toaster mailing list >>>toaster@yoctoproject.org >>>https://lists.yoctoproject.org/listinfo/toaster >> >> -- >> _______________________________________________ >> toaster mailing list >> toaster@yoctoproject.org >> https://lists.yoctoproject.org/listinfo/toaster ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] Fixes for toaster script 2015-10-14 23:55 ` Brian Avery @ 2015-10-15 0:55 ` Brian Avery 2015-10-15 8:13 ` Ed Bartosh 0 siblings, 1 reply; 14+ messages in thread From: Brian Avery @ 2015-10-15 0:55 UTC (permalink / raw) To: Barros Pena, Belen; +Cc: toaster@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 4053 bytes --] Also, Michael mentioned that he didn't have realpath installed (on ubuntu it is a separate dpkg). This patch will check for realpath and if it doesn't find it, it will look for readlink (readlink -f will accomplish the same thing as realpath) and if it doesn't find that it will complain and exit. -b On Wed, Oct 14, 2015 at 4:55 PM, Brian Avery <avery.brian@gmail.com> wrote: > The source of the problem is that you switched from the meta-yocto > toasterconf to the meta toasterconf as the default. The > meta/conf/toasterconf.json is only for pure open embedded (non poky) > runs. It shouldn't be the default as it can't build anything unless > you add some layers by hand. > > - export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" > > + TOASTER_CONF="$(dirname $TOASTER)/../../meta/conf/toasterconf.json" > > On the assumption that this was a typo, I amended your git 8d7023f41 > to be meta-yocto and signed off on it. I also signed off on the other > 3 commits. > > If you agree that this amend makes sense, go ahead and upstream it and > add it to toaster-next. It already has 2 signoffs on it so it's good > to go. > > the branch with the 2 signoffs is on > bavery/submit/ed/2015-10-14_fix-script-for-2-modes on poky-contrib. > > -b > > On Wed, Oct 14, 2015 at 1:00 PM, Brian Avery <avery.brian@gmail.com> wrote: >> Tried it but had an issue. >> To replicate issue >> be in a directory that is *not* poky >>> ~/src/poky/bitbake/bin/toaster >> then make a new project. >> you will see that it does not have enough layers. (missing meta and meta-yocto) >> building bash then fails with >> ShellCmdException: command: git clone "" >> "/home/bavery/src/intel/yocto-builds/TOASTER/myBugs2/elliot-cli-8231/managed/_toaster_clones/__master" >> >> fatal: repository '' does not exist >> >> >> Note, if this is done from the poky directory, it works, but it needs >> to work from a build dir as well so people do not *have* to dirty up >> their src dir. >> -b >> >> On Wed, Oct 14, 2015 at 6:10 AM, Barros Pena, Belen >> <belen.barros.pena@intel.com> wrote: >>> >>> >>> On 14/10/2015 13:33, "toaster-bounces@yoctoproject.org on behalf of Ed >>> Bartosh" <toaster-bounces@yoctoproject.org on behalf of >>> ed.bartosh@linux.intel.com> wrote: >>> >>>>Hi, >>>> >>>>This patchset should make toaster script working in both modes. >>>>It was not possible due to the way TOASTER_CONF variable was set. >>>> >>>>The following changes since commit >>>>c1ba977bf55424bf9f9e899db89eafa338edccb4: >>>> >>>> toaster: importlayer Update property names for importlayer api calls >>>>(2015-10-14 14:11:23 +0300) >>>> >>>>are available in the git repository at: >>>> >>>> git://git.yoctoproject.org/poky-contrib >>>>ed/toaster/fixes-for-toaster-script >>>> >>>>http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/fixes- >>>>for-toaster-script >>> >>> Pending code review, this works for me. I can start toaster in 'build' >>> mode the usual way (bitbake/bin/toaster) and I can start toaster in >>> 'analysis' mode by sourcing the build environment script, then sourcing >>> the toaster script (. ../bitbake/bin/toaster). >>> >>> Both modes build for me, and cli builds are picked up by Toaster. >>> >>> Cheers >>> >>> Belén >>> >>>> >>>>Ed Bartosh (4): >>>> toaster: use path to the script to guess config path >>>> toaster: get rid of SRCFILE >>>> toaster: set TOASTER_MANAGED variable >>>> toaster: exit or return depending on the mode >>>> >>>> bitbake/bin/toaster | 16 +++++++--------- >>>> 1 file changed, 7 insertions(+), 9 deletions(-) >>>> >>>>-- >>>>2.1.4 >>>> >>>>-- >>>>_______________________________________________ >>>>toaster mailing list >>>>toaster@yoctoproject.org >>>>https://lists.yoctoproject.org/listinfo/toaster >>> >>> -- >>> _______________________________________________ >>> toaster mailing list >>> toaster@yoctoproject.org >>> https://lists.yoctoproject.org/listinfo/toaster [-- Attachment #2: realpath_check.patch --] [-- Type: application/octet-stream, Size: 979 bytes --] diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index c81aa31..a7572ad 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster @@ -178,6 +178,18 @@ fi [ `basename \"$0\"` = `basename \"${TOASTER}\"` ] && TOASTER_MANAGED=1 +if [ `command -v realpath` >/dev/null ]; then + echo "rp" + PATHBIN="realpath" +elif [ `command -v readlink` >/dev/null ]; then + echo "rl" + PATHBIN="readlink -f" +fi +if [ "$PATHBIN" = "" ] ; then + echo "you need to install either readlink or realpath to start toaster" + exit 1 +fi + BBBASEDIR=`dirname $TOASTER`/.. RUNNING=0 @@ -197,7 +209,7 @@ fi # toasterconf.json if [ "$TOASTER_CONF" = "" ]; then TOASTER_CONF="$(dirname $TOASTER)/../../meta-yocto/conf/toasterconf.json" - export TOASTER_CONF=$(realpath $TOASTER_CONF) + export TOASTER_CONF=$(${PATHBIN} $TOASTER_CONF) fi if [ ! -f $TOASTER_CONF ]; then echo "$TOASTER_CONF configuration file not found. set TOASTER_CONF to specify a path" ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] Fixes for toaster script 2015-10-15 0:55 ` Brian Avery @ 2015-10-15 8:13 ` Ed Bartosh 2015-10-15 10:50 ` Barros Pena, Belen 0 siblings, 1 reply; 14+ messages in thread From: Ed Bartosh @ 2015-10-15 8:13 UTC (permalink / raw) To: Brian Avery; +Cc: toaster@yoctoproject.org On Wed, Oct 14, 2015 at 05:55:46PM -0700, Brian Avery wrote: > Also, > > Michael mentioned that he didn't have realpath installed (on ubuntu it > is a separate dpkg). This patch will check for realpath and if it > doesn't find it, it will look for readlink (readlink -f will > accomplish the same thing as realpath) and if it doesn't find that it > will complain and exit. > -b > Thank you for review and testing! Fixed both issues and updated ed/toaster/fixes-for-toaster-script please review and submit > > On Wed, Oct 14, 2015 at 4:55 PM, Brian Avery <avery.brian@gmail.com> wrote: > > The source of the problem is that you switched from the meta-yocto > > toasterconf to the meta toasterconf as the default. The > > meta/conf/toasterconf.json is only for pure open embedded (non poky) > > runs. It shouldn't be the default as it can't build anything unless > > you add some layers by hand. > > > > - export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" > > > > + TOASTER_CONF="$(dirname $TOASTER)/../../meta/conf/toasterconf.json" > > > > On the assumption that this was a typo, I amended your git 8d7023f41 > > to be meta-yocto and signed off on it. I also signed off on the other > > 3 commits. > > > > If you agree that this amend makes sense, go ahead and upstream it and > > add it to toaster-next. It already has 2 signoffs on it so it's good > > to go. > > > > the branch with the 2 signoffs is on > > bavery/submit/ed/2015-10-14_fix-script-for-2-modes on poky-contrib. > > > > -b > > > > On Wed, Oct 14, 2015 at 1:00 PM, Brian Avery <avery.brian@gmail.com> wrote: > >> Tried it but had an issue. > >> To replicate issue > >> be in a directory that is *not* poky > >>> ~/src/poky/bitbake/bin/toaster > >> then make a new project. > >> you will see that it does not have enough layers. (missing meta and meta-yocto) > >> building bash then fails with > >> ShellCmdException: command: git clone "" > >> "/home/bavery/src/intel/yocto-builds/TOASTER/myBugs2/elliot-cli-8231/managed/_toaster_clones/__master" > >> > >> fatal: repository '' does not exist > >> > >> > >> Note, if this is done from the poky directory, it works, but it needs > >> to work from a build dir as well so people do not *have* to dirty up > >> their src dir. > >> -b > >> > >> On Wed, Oct 14, 2015 at 6:10 AM, Barros Pena, Belen > >> <belen.barros.pena@intel.com> wrote: > >>> > >>> > >>> On 14/10/2015 13:33, "toaster-bounces@yoctoproject.org on behalf of Ed > >>> Bartosh" <toaster-bounces@yoctoproject.org on behalf of > >>> ed.bartosh@linux.intel.com> wrote: > >>> > >>>>Hi, > >>>> > >>>>This patchset should make toaster script working in both modes. > >>>>It was not possible due to the way TOASTER_CONF variable was set. > >>>> > >>>>The following changes since commit > >>>>c1ba977bf55424bf9f9e899db89eafa338edccb4: > >>>> > >>>> toaster: importlayer Update property names for importlayer api calls > >>>>(2015-10-14 14:11:23 +0300) > >>>> > >>>>are available in the git repository at: > >>>> > >>>> git://git.yoctoproject.org/poky-contrib > >>>>ed/toaster/fixes-for-toaster-script > >>>> > >>>>http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/fixes- > >>>>for-toaster-script > >>> > >>> Pending code review, this works for me. I can start toaster in 'build' > >>> mode the usual way (bitbake/bin/toaster) and I can start toaster in > >>> 'analysis' mode by sourcing the build environment script, then sourcing > >>> the toaster script (. ../bitbake/bin/toaster). > >>> > >>> Both modes build for me, and cli builds are picked up by Toaster. > >>> > >>> Cheers > >>> > >>> Belén > >>> > >>>> > >>>>Ed Bartosh (4): > >>>> toaster: use path to the script to guess config path > >>>> toaster: get rid of SRCFILE > >>>> toaster: set TOASTER_MANAGED variable > >>>> toaster: exit or return depending on the mode > >>>> > >>>> bitbake/bin/toaster | 16 +++++++--------- > >>>> 1 file changed, 7 insertions(+), 9 deletions(-) > >>>> > >>>>-- > >>>>2.1.4 > >>>> > >>>>-- > >>>>_______________________________________________ > >>>>toaster mailing list > >>>>toaster@yoctoproject.org > >>>>https://lists.yoctoproject.org/listinfo/toaster > >>> > >>> -- > >>> _______________________________________________ > >>> toaster mailing list > >>> toaster@yoctoproject.org > >>> https://lists.yoctoproject.org/listinfo/toaster -- -- Regards, Ed ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] Fixes for toaster script 2015-10-15 8:13 ` Ed Bartosh @ 2015-10-15 10:50 ` Barros Pena, Belen 2015-10-15 12:31 ` Ed Bartosh 0 siblings, 1 reply; 14+ messages in thread From: Barros Pena, Belen @ 2015-10-15 10:50 UTC (permalink / raw) To: ed.bartosh@linux.intel.com, Brian Avery; +Cc: toaster@yoctoproject.org On 15/10/2015 09:13, "Ed Bartosh" <ed.bartosh@linux.intel.com> wrote: >On Wed, Oct 14, 2015 at 05:55:46PM -0700, Brian Avery wrote: >> Also, >> >> Michael mentioned that he didn't have realpath installed (on ubuntu it >> is a separate dpkg). This patch will check for realpath and if it >> doesn't find it, it will look for readlink (readlink -f will >> accomplish the same thing as realpath) and if it doesn't find that it >> will complain and exit. >> -b >> > >Thank you for review and testing! > >Fixed both issues and updated ed/toaster/fixes-for-toaster-script >please review and submit I've been playing with this for a bit. To make sure nothing in my tree was making things magically work, I made a clean clone of Ed's branch. Everything works like a charm as long as I issue the commands from inside the poky directory. I can source the environment script, then source the toaster script and Toaster starts in analysis mode, although without importing any toasterconf.json file (which is probably ok, since I don't need any releases or layer information from the layer index if I am running builds from cli). I can then do source toaster stop and toaster stops. From a clean shell, I can then do bitbake/bin/toaster and start Toaster in build mode. The meta-yocto/conf/toasterconf.json file is imported, the data from the layer index is fetched, and I can happily run a build. However, if I try to source the toaster script from outside the poky directory, I get this error: Installed 0 object(s) from 0 fixture(s) Starting webserver... Webserver address: http://0.0.0.0:8000/ The BBPATH variable is not set and bitbake did not find a conf/bblayers.conf file in the expected location. Maybe you accidentally invoked bitbake from the wrong directory? DEBUG: Removed the following variables from the environment: LESSOPEN, SSH_CLIENT, VIRTUALENVWRAPPER_SCRIPT, TOASTER_CONF, LANG, LANGUAGE, SHLVL, QT_QPA_PLATFORMTHEME, _VIRTUALENVWRAPPER_API, XDG_RUNTIME_DIR, SSH_SOCKS_SERVER, socks_proxy, TOASTER_DIR, XDG_SESSION_ID, _, SSH_CONNECTION, LESSCLOSE, BUILDDIR, SSH_TTY, OLDPWD, MAIL, LS_COLORS Bitbake server start failed Failed to read bitbake.lock ([Errno 2] No such file or directory: './bitbake.lock'), invalid port [1]+ Terminated python $BBBASEDIR/lib/toaster/manage.py runserver "0.0.0.0:$WEB_PORT" < /dev/null >> ${BUILDDIR}/toaster_web.log 2>&1 lsof: status error on bitbake.lock: No such file or directory lsof 4.86 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man usage: [-?abhKlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[gG]] [+|-e s] [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s] [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names] Use the ``-h'' option to get more help information. Failed start. > >> >> On Wed, Oct 14, 2015 at 4:55 PM, Brian Avery <avery.brian@gmail.com> >>wrote: >> > The source of the problem is that you switched from the meta-yocto >> > toasterconf to the meta toasterconf as the default. The >> > meta/conf/toasterconf.json is only for pure open embedded (non poky) >> > runs. It shouldn't be the default as it can't build anything unless >> > you add some layers by hand. >> > >> > - export >>TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" >> > >> > + TOASTER_CONF="$(dirname >>$TOASTER)/../../meta/conf/toasterconf.json" >> > >> > On the assumption that this was a typo, I amended your git 8d7023f41 >> > to be meta-yocto and signed off on it. I also signed off on the other >> > 3 commits. >> > >> > If you agree that this amend makes sense, go ahead and upstream it and >> > add it to toaster-next. It already has 2 signoffs on it so it's good >> > to go. >> > >> > the branch with the 2 signoffs is on >> > bavery/submit/ed/2015-10-14_fix-script-for-2-modes on poky-contrib. >> > >> > -b >> > >> > On Wed, Oct 14, 2015 at 1:00 PM, Brian Avery <avery.brian@gmail.com> >>wrote: >> >> Tried it but had an issue. >> >> To replicate issue >> >> be in a directory that is *not* poky >> >>> ~/src/poky/bitbake/bin/toaster >> >> then make a new project. >> >> you will see that it does not have enough layers. (missing meta and >>meta-yocto) >> >> building bash then fails with >> >> ShellCmdException: command: git clone "" >> >> >>"/home/bavery/src/intel/yocto-builds/TOASTER/myBugs2/elliot-cli-8231/mana >>ged/_toaster_clones/__master" >> >> >> >> fatal: repository '' does not exist >> >> >> >> >> >> Note, if this is done from the poky directory, it works, but it needs >> >> to work from a build dir as well so people do not *have* to dirty up >> >> their src dir. >> >> -b >> >> >> >> On Wed, Oct 14, 2015 at 6:10 AM, Barros Pena, Belen >> >> <belen.barros.pena@intel.com> wrote: >> >>> >> >>> >> >>> On 14/10/2015 13:33, "toaster-bounces@yoctoproject.org on behalf of >>Ed >> >>> Bartosh" <toaster-bounces@yoctoproject.org on behalf of >> >>> ed.bartosh@linux.intel.com> wrote: >> >>> >> >>>>Hi, >> >>>> >> >>>>This patchset should make toaster script working in both modes. >> >>>>It was not possible due to the way TOASTER_CONF variable was set. >> >>>> >> >>>>The following changes since commit >> >>>>c1ba977bf55424bf9f9e899db89eafa338edccb4: >> >>>> >> >>>> toaster: importlayer Update property names for importlayer api >>calls >> >>>>(2015-10-14 14:11:23 +0300) >> >>>> >> >>>>are available in the git repository at: >> >>>> >> >>>> git://git.yoctoproject.org/poky-contrib >> >>>>ed/toaster/fixes-for-toaster-script >> >>>> >> >>>>>>http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/f >>>>>>ixes- >> >>>>for-toaster-script >> >>> >> >>> Pending code review, this works for me. I can start toaster in >>'build' >> >>> mode the usual way (bitbake/bin/toaster) and I can start toaster in >> >>> 'analysis' mode by sourcing the build environment script, then >>sourcing >> >>> the toaster script (. ../bitbake/bin/toaster). >> >>> >> >>> Both modes build for me, and cli builds are picked up by Toaster. >> >>> >> >>> Cheers >> >>> >> >>> Belén >> >>> >> >>>> >> >>>>Ed Bartosh (4): >> >>>> toaster: use path to the script to guess config path >> >>>> toaster: get rid of SRCFILE >> >>>> toaster: set TOASTER_MANAGED variable >> >>>> toaster: exit or return depending on the mode >> >>>> >> >>>> bitbake/bin/toaster | 16 +++++++--------- >> >>>> 1 file changed, 7 insertions(+), 9 deletions(-) >> >>>> >> >>>>-- >> >>>>2.1.4 >> >>>> >> >>>>-- >> >>>>_______________________________________________ >> >>>>toaster mailing list >> >>>>toaster@yoctoproject.org >> >>>>https://lists.yoctoproject.org/listinfo/toaster >> >>> >> >>> -- >> >>> _______________________________________________ >> >>> toaster mailing list >> >>> toaster@yoctoproject.org >> >>> https://lists.yoctoproject.org/listinfo/toaster > > > >-- >-- >Regards, >Ed ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] Fixes for toaster script 2015-10-15 10:50 ` Barros Pena, Belen @ 2015-10-15 12:31 ` Ed Bartosh 2015-10-15 12:53 ` Barros Pena, Belen 0 siblings, 1 reply; 14+ messages in thread From: Ed Bartosh @ 2015-10-15 12:31 UTC (permalink / raw) To: Barros Pena, Belen; +Cc: toaster@yoctoproject.org On Thu, Oct 15, 2015 at 10:50:02AM +0000, Barros Pena, Belen wrote: > Everything works like a charm as long as I issue the commands from inside > the poky directory. I can source the environment script, then source the > toaster script and Toaster starts in analysis mode, although without > importing any toasterconf.json file (which is probably ok, since I don't > need any releases or layer information from the layer index if I am > running builds from cli). I can then do source toaster stop and toaster > stops. From a clean shell, I can then do bitbake/bin/toaster and start > Toaster in build mode. The meta-yocto/conf/toasterconf.json file is > imported, the data from the layer index is fetched, and I can happily run > a build. > > However, if I try to source the toaster script from outside the poky > directory, I get this error: > > Installed 0 object(s) from 0 fixture(s) > Starting webserver... > Webserver address: http://0.0.0.0:8000/ > The BBPATH variable is not set and bitbake did not find a > conf/bblayers.conf file in the expected location. > Maybe you accidentally invoked bitbake from the wrong directory? > DEBUG: Removed the following variables from the environment: LESSOPEN, > SSH_CLIENT, VIRTUALENVWRAPPER_SCRIPT, TOASTER_CONF, LANG, LANGUAGE, SHLVL, > QT_QPA_PLATFORMTHEME, _VIRTUALENVWRAPPER_API, XDG_RUNTIME_DIR, > SSH_SOCKS_SERVER, socks_proxy, TOASTER_DIR, XDG_SESSION_ID, _, > SSH_CONNECTION, LESSCLOSE, BUILDDIR, SSH_TTY, OLDPWD, MAIL, LS_COLORS > Bitbake server start failed > Failed to read bitbake.lock ([Errno 2] No such file or directory: > './bitbake.lock'), invalid port > [1]+ Terminated python $BBBASEDIR/lib/toaster/manage.py > runserver "0.0.0.0:$WEB_PORT" < /dev/null >> ${BUILDDIR}/toaster_web.log > 2>&1 > lsof: status error on bitbake.lock: No such file or directory > lsof 4.86 > latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ > latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ > latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man > usage: [-?abhKlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[gG]] [+|-e s] > [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s] > [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] > [names] > Use the ``-h'' option to get more help information. > Failed start. > > This is not a toaster issue if it's an issue at all. Bitbake should be run from build directory, otherwise it complains: $ . oe-init-build-env $ cd ../ $ bitbake zlib The BBPATH variable is not set and bitbake did not find a conf/bblayers.conf file in the expected location. Maybe you accidentally invoked bitbake from the wrong directory? DEBUG: Removed the following variables from the environment: NO_AT_BRIDGE, LS_COLORS, LIBGL_DEBUG, MINICOM, CSHEDIT, HOSTTYPE, LESSOPEN, SSH_CLIENT, CVS_RSH, LD_LIBRARY_PATH, INPUTRC, VIRTUALENVWRAPPER_SCRIPT, CPU, LANG, SHLVL, XNLSPATH, LESS, G_BROKEN_FILENAMES, HISTSIZE, LESS_ADVANCED_PREPROCESSOR, gopher_proxy, MANPATH, OSTYPE, _VIRTUALENVWRAPPER_API, PROFILEREAD, XKEYSYMDB, XDG_RUNTIME_DIR, NNTPSERVER, G_FILENAME_ENCODING, HOST, CONFIG_SITE, LESSKEY, XDG_CONFIG_DIRS, LS_OPTIONS, GPG_TTY, XDG_SESSION_ID, _, SSH_CONNECTION, LESSCLOSE, BUILDDIR, PYTHONSTARTUP, SSH_TTY, OLDPWD, HOSTNAME, WINDOWMANAGER, SSH_SENDS_LOCALE, XDG_DATA_DIRS, COLORTERM, MAIL, MACHTYPE, PAGER, MORE I'm pretty sure we shouldn't assume that user will change directory after running . oe-init-build-env -- Regards, Ed ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] Fixes for toaster script 2015-10-15 12:31 ` Ed Bartosh @ 2015-10-15 12:53 ` Barros Pena, Belen 2015-10-15 16:32 ` Brian Avery 0 siblings, 1 reply; 14+ messages in thread From: Barros Pena, Belen @ 2015-10-15 12:53 UTC (permalink / raw) To: Bartosh, Eduard; +Cc: toaster@yoctoproject.org On 15/10/2015 13:31, "Ed Bartosh" <ed.bartosh@linux.intel.com> wrote: >This is not a toaster issue if it's an issue at all. >Bitbake should be run from build directory, otherwise it complains: >$ . oe-init-build-env >$ cd ../ >$ bitbake zlib >The BBPATH variable is not set and bitbake did not find a >conf/bblayers.conf file in the expected location. >Maybe you accidentally invoked bitbake from the wrong directory? >DEBUG: Removed the following variables from the environment: >NO_AT_BRIDGE, LS_COLORS, LIBGL_DEBUG, MINICOM, CSHEDIT, HOSTTYPE, >LESSOPEN, SSH_CLIENT, CVS_RSH, LD_LIBRARY_PATH, INPUTRC, >VIRTUALENVWRAPPER_SCRIPT, CPU, LANG, SHLVL, XNLSPATH, LESS, >G_BROKEN_FILENAMES, HISTSIZE, LESS_ADVANCED_PREPROCESSOR, gopher_proxy, >MANPATH, OSTYPE, _VIRTUALENVWRAPPER_API, PROFILEREAD, XKEYSYMDB, >XDG_RUNTIME_DIR, NNTPSERVER, G_FILENAME_ENCODING, HOST, CONFIG_SITE, >LESSKEY, XDG_CONFIG_DIRS, LS_OPTIONS, GPG_TTY, XDG_SESSION_ID, _, >SSH_CONNECTION, LESSCLOSE, BUILDDIR, PYTHONSTARTUP, SSH_TTY, OLDPWD, >HOSTNAME, WINDOWMANAGER, SSH_SENDS_LOCALE, XDG_DATA_DIRS, COLORTERM, >MAIL, MACHTYPE, PAGER, MORE > >I'm pretty sure we shouldn't assume that user will change directory >after running . oe-init-build-env You've convinced me :) Thanks! Belén ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] Fixes for toaster script 2015-10-15 12:53 ` Barros Pena, Belen @ 2015-10-15 16:32 ` Brian Avery 0 siblings, 0 replies; 14+ messages in thread From: Brian Avery @ 2015-10-15 16:32 UTC (permalink / raw) To: Barros Pena, Belen; +Cc: Bartosh, Eduard, toaster@yoctoproject.org upstreamed and pushed to toaster-next. -b On Thu, Oct 15, 2015 at 5:53 AM, Barros Pena, Belen <belen.barros.pena@intel.com> wrote: > > > On 15/10/2015 13:31, "Ed Bartosh" <ed.bartosh@linux.intel.com> wrote: > >>This is not a toaster issue if it's an issue at all. >>Bitbake should be run from build directory, otherwise it complains: >>$ . oe-init-build-env >>$ cd ../ >>$ bitbake zlib >>The BBPATH variable is not set and bitbake did not find a >>conf/bblayers.conf file in the expected location. >>Maybe you accidentally invoked bitbake from the wrong directory? >>DEBUG: Removed the following variables from the environment: >>NO_AT_BRIDGE, LS_COLORS, LIBGL_DEBUG, MINICOM, CSHEDIT, HOSTTYPE, >>LESSOPEN, SSH_CLIENT, CVS_RSH, LD_LIBRARY_PATH, INPUTRC, >>VIRTUALENVWRAPPER_SCRIPT, CPU, LANG, SHLVL, XNLSPATH, LESS, >>G_BROKEN_FILENAMES, HISTSIZE, LESS_ADVANCED_PREPROCESSOR, gopher_proxy, >>MANPATH, OSTYPE, _VIRTUALENVWRAPPER_API, PROFILEREAD, XKEYSYMDB, >>XDG_RUNTIME_DIR, NNTPSERVER, G_FILENAME_ENCODING, HOST, CONFIG_SITE, >>LESSKEY, XDG_CONFIG_DIRS, LS_OPTIONS, GPG_TTY, XDG_SESSION_ID, _, >>SSH_CONNECTION, LESSCLOSE, BUILDDIR, PYTHONSTARTUP, SSH_TTY, OLDPWD, >>HOSTNAME, WINDOWMANAGER, SSH_SENDS_LOCALE, XDG_DATA_DIRS, COLORTERM, >>MAIL, MACHTYPE, PAGER, MORE >> >>I'm pretty sure we shouldn't assume that user will change directory >>after running . oe-init-build-env > > You've convinced me :) > > Thanks! > > Belén > ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2015-10-15 16:32 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-10-14 12:33 [PATCH 0/4] Fixes for toaster script Ed Bartosh 2015-10-14 12:33 ` [PATCH 1/4] toaster: use path to the script to guess config path Ed Bartosh 2015-10-14 12:33 ` [PATCH 2/4] toaster: get rid of SRCFILE Ed Bartosh 2015-10-14 12:33 ` [PATCH 3/4] toaster: set TOASTER_MANAGED variable Ed Bartosh 2015-10-14 12:33 ` [PATCH 4/4] toaster: exit or return depending on the mode Ed Bartosh 2015-10-14 13:10 ` [PATCH 0/4] Fixes for toaster script Barros Pena, Belen 2015-10-14 20:00 ` Brian Avery 2015-10-14 23:55 ` Brian Avery 2015-10-15 0:55 ` Brian Avery 2015-10-15 8:13 ` Ed Bartosh 2015-10-15 10:50 ` Barros Pena, Belen 2015-10-15 12:31 ` Ed Bartosh 2015-10-15 12:53 ` Barros Pena, Belen 2015-10-15 16:32 ` Brian Avery
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.