toaster: Improve messaging when conf file not found
PATCH 1/1 toaster: Improve messaging when conf file not found
From: Belen Barros Pena <[email protected]>
If the toasterconf.json file specified in TOASTER_CONF does not exist, you get a message asking you to set TOASTER_CONF to the path of a valid configuration file.
The message, however, doesn't tell you where to set TOASTER_CONF. Specify that you set TOASTER_CONF in the bitbake/bin/toaster script to save people the proverbial grepping.
--- bitbake/bin/toaster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/bin/toaster +1 -1
@@ -200,7 +200,7 @@ if [ "$TOASTER_CONF" = "" ]; then export TOASTER_CONF=$(python -c "import os; print os.path.realpath('$TOASTER_CONF')") fi if [ ! -f $TOASTER_CONF ]; then - echo "$TOASTER_CONF configuration file not found. set TOASTER_CONF to specify a path" + echo "$TOASTER_CONF configuration file not found. Set the TOASTER_CONF variable in the \"bitbake/bin/toaster\" script to specify the path to a Toaster configuration file." [ "$TOASTER_MANAGED" = '1' ] && exit 1 || return 1 fi # this defines the dir toaster will use for
Signature · 1 line
2.4.9 (Apple Git-60)
2 things.
1) encouraging people to modify the script scares me. these variables are better/more safely set in the environment. we should probably do something like:
echo " "$TOASTER_CONF configuration file not found. Set the TOASTER_CONF variable in your env and export it i.e. $>export TOASTER_CONF=/home/me/mytoasterconf.json"
2) I switched (again) the way toasterconf's are done in response to a valid Khem/Paul complaint wrt the fact that we should use the same template approach that bb uses to decide between meta/conf and meta-yocto/conf.
https://lists.yoctoproject.org/pipermail/toaster/2015-November/003268.html
-b
Quoted 37 lines · Belen Barros Pena
From: Belen Barros Pena <[email protected]>
If the toasterconf.json file specified in
TOASTER_CONFdoes not exist, you get a message asking you to setTOASTER_CONFto the path of a valid configuration file.The message, however, doesn't tell you where to set
TOASTER_CONF. Specify that you setTOASTER_CONFin the bitbake/bin/toaster script to save people the proverbial grepping.Signed-off-by Belen Barros Pena <[email protected]>--- bitbake/bin/toaster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)bitbake/bin/toaster +1
-2@@ -200,7 +200,7 @@ if [ "$TOASTER_CONF" = "" ]; then export TOASTER_CONF=$(python -c "import os; print os.path.realpath('$TOASTER_CONF')") fi if [ ! -f $TOASTER_CONF ]; then - echo "$TOASTER_CONF configuration file not found. set TOASTER_CONF to specify a path" + echo "$TOASTER_CONF configuration file not found. Set the TOASTER_CONF variable in the \"bitbake/bin/toaster\" script to specify the path to a Toaster configuration file." [ "$TOASTER_MANAGED" = '1' ] && exit 1 || return 1 fi # this defines the dir toaster will use for --2.4.9 (Apple Git-60)
--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster
Quoted 3 lines · On 06/11/2015 18:15, "[email protected] on behalf of Brian…
2 things.
1) encouraging people to modify the script scares me. these variables are better/more safely set in the environment.
Sorry, I didn't really mean to suggest the right way of setting the variable. The point of the patch was highlighting that the string, as is, tells me what to do, but not how to do it, which:
1. It's not very useful
2. Means that I am likely to do it wrong (as in fact I did).
Whichever way is the right way of setting the variable, it needs to be explained whenever toasterconf.json is not found.
Quoted 11 lines
we should probably do
something like:
echo " "$TOASTER_CONF configuration file not found. Set theTOASTER_CONFvariable in your env and export it i.e. $>export TOASTER_CONF=/home/me/mytoasterconf.json"2) I switched (again) the way toasterconf's are done in response to a valid Khem/Paul complaint wrt the fact that we should use the same template approach that bb uses to decide between meta/conf and meta-yocto/conf.
https://lists.yoctoproject.org/pipermail/toaster/2015-November/003268.html
Right, the string in this patch has the same problem:
"echo "$TOASTER_CONF configuration file not found. Set TOASTER_CONF to specify file or fix .templateconf""
This string needs to tell me:
1. How to set TOASTER_CONF
2. How to fix .templateconf
We can fix the text after the patch is merged: no hurry.
Cheers
Belén
Tibh
Quoted 51 lines
-b
Quoted 41 lines · Belen Barros Pena
From: Belen Barros Pena <[email protected]>
If the toasterconf.json file specified in
TOASTER_CONFdoes not exist, you get a message asking you to setTOASTER_CONFto the path of a valid configuration file.The message, however, doesn't tell you where to set
TOASTER_CONF. Specify that you setTOASTER_CONFin the bitbake/bin/toaster script to save people the proverbial grepping.Signed-off-by Belen Barros Pena <[email protected]>--- bitbake/bin/toaster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)bitbake/bin/toaster +0
-1@@ -200,7 +200,7 @@ if [ "$TOASTER_CONF" = "" ]; then export TOASTER_CONF=$(python -c "import os; print os.path.realpath('$TOASTER_CONF')") fi if [ ! -f $TOASTER_CONF ]; then - echo "$TOASTER_CONF configuration file not found. set TOASTER_CONFto specify a path"
+ echo "$TOASTER_CONF configuration file not found. Set theTOASTER_CONFvariable in the \"bitbake/bin/toaster\" script to specify the path to a Toaster configuration file."[ "$TOASTER_MANAGED" = '1' ] && exit 1 || return 1 fi # this defines the dir toaster will use for -- 2.4.9 (Apple Git-60)--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toasterSignature · 4 lines
_______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster