[Toaster] [PATCH] toaster: Improve messaging when conf file not found
Barros Pena, Belen
belen.barros.pena at intel.com
Mon Nov 9 02:42:05 PST 2015
On 06/11/2015 18:15, "toaster-bounces at yoctoproject.org on behalf of Brian
Avery" <toaster-bounces at yoctoproject.org on behalf of
avery.brian at gmail.com> wrote:
>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.
> 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
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
>
>-b
>
>On Fri, Nov 6, 2015 at 4:25 AM, Belen Barros Pena
><belen.barros.pena at linux.intel.com> wrote:
>> From: Belen Barros Pena <belen.barros.pena at intel.com>
>>
>> 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.
>>
>> Signed-off-by: Belen Barros Pena <belen.barros.pena at intel.com>
>> ---
>> bitbake/bin/toaster | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
>> index 2c3432c..db02bc3 100755
>> --- a/bitbake/bin/toaster
>> +++ b/bitbake/bin/toaster
>> @@ -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
>> toaster at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/toaster
>--
>_______________________________________________
>toaster mailing list
>toaster at yoctoproject.org
>https://lists.yoctoproject.org/listinfo/toaster
More information about the toaster
mailing list