Bug 10170

Summary: Unable to set PREMIRRORS bitbake variable
Product: [Build System, Metadata & Runtime] Toaster Reporter: Alexander Egorenkov <egorenar-dev>
Component: toasterAssignee: Alexander Egorenkov <Alexander.Egorenkov>
Status: RESOLVED FIXED QA Contact: Libertad <libertad.gonzalez.de.la.cruz>
Severity: normal    
Priority: Medium CC: Alexander.Egorenkov, belen.barros.pena, brian.avery, david.reyna, jessica.zhang, michael.g.wood, stanciux.mihail
Version: 2.1   
Target Milestone: 2.1.2   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: New (Never tested)
Verified: Documentation change: Don't know
Attachments:
Description Flags
error.png
none
Bitbake variables containing ':' cannot be set in Toaster, this patch fixes it none

Description Alexander Egorenkov 2016-08-22 17:14:36 UTC
I'm not able to set PREMIRRORS BitBake variable with Toaster.

How to reproduce:
- Create a new project
- Go to the page 'BitBake Variables'
- Try to add a new variable which contains spaces, e.g. PREMIRRORS (it must contain spaces)
- Toaster shows an error dialog

Regards
Comment 1 Belen Barros Pena 2016-08-22 17:21:39 UTC
The problem is on krogoth stable: I can't reproduce this with toaster-next. 

I don't think the spaces are the issue. Entering this

git://.*/* http://<my-ip>/yocto-cache http://.*/*

In the "value" field prompts the problem. I've attached a screenshot.
Comment 2 Belen Barros Pena 2016-08-22 17:22:07 UTC
Created attachment 3377 [details]
error.png
Comment 3 David Reyna 2016-08-22 22:24:47 UTC
I also cannot replicate in toaster-next. I am setting up a krogoth installation.
Comment 4 Alexander Egorenkov 2016-08-23 07:53:30 UTC
Created attachment 3381 [details]
Bitbake variables containing ':' cannot be set in Toaster, this patch fixes it
Comment 5 Alexander Egorenkov 2016-08-23 07:55:11 UTC
I backported the fix from toaster-next to krogoth.
The problem occurs when the value of a variable contains ':'.
Comment 6 Alexander Egorenkov 2016-08-23 07:57:52 UTC
Another question.
With the above patch i'm able to set a variable containing ':' but
what about multi-line values like in the case of PREMIRRORS, do i concatenate all lines ?
Comment 7 Belen Barros Pena 2016-08-23 09:14:46 UTC
(In reply to comment #6)
> Another question.
> With the above patch i'm able to set a variable containing ':' but
> what about multi-line values like in the case of PREMIRRORS, do i
> concatenate all lines ?

Concatenating the lines should work. If it doesn't, please leave a comment and we'll look into it. Thanks!
Comment 8 Belen Barros Pena 2016-08-23 09:22:20 UTC
(In reply to comment #4)
> Created attachment 3381 [details]
> Bitbake variables containing ':' cannot be set in Toaster, this patch fixes
> it

Wonderful: thanks for the patch. Any chance you could submit it to the Toaster mailing list? That way we can start the process of merging it to the next version of 2.1

You can subscribe to the mailing list from here

https://lists.yoctoproject.org/listinfo/toaster

And here are some instructions on how to send the patch:

https://wiki.yoctoproject.org/wiki/Contribute_to_Toaster

If you have any questions, let us know.
Comment 9 Alexander Egorenkov 2016-08-23 09:59:45 UTC
(In reply to comment #8)
> (In reply to comment #4)
> > Created attachment 3381 [details]
> > Bitbake variables containing ':' cannot be set in Toaster, this patch fixes
> > it
> 
> Wonderful: thanks for the patch. Any chance you could submit it to the
> Toaster mailing list? That way we can start the process of merging it to the
> next version of 2.1
> 
> You can subscribe to the mailing list from here
> 
> https://lists.yoctoproject.org/listinfo/toaster
> 
> And here are some instructions on how to send the patch:
> 
> https://wiki.yoctoproject.org/wiki/Contribute_to_Toaster
> 
> If you have any questions, let us know.


Done.
Comment 10 Belen Barros Pena 2016-08-24 09:21:03 UTC
Patch submitted to the toaster mailing list

https://lists.yoctoproject.org/pipermail/toaster/2016-August/005120.html