Bug 4193

Summary: Save and retrieve customised image recipes (was Templates)
Product: [Build System, Metadata & Runtime] Hob Reporter: Belen Barros Pena <belen.barros.pena>
Component: hobAssignee: Cristiana Voicu <cristiana.voicu>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: Medium+ CC: andreea.b.proca, belen.barros.pena, cristian.iorga, jessica.zhang, poky.bs.watcher, poky.watcher, valentin.popa
Version: unspecified   
Target Milestone: 1.5 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on:    
Bug Blocks: 4713    
Attachments:
Description Flags
User-generated base image recipes
none
User-generated base image recipes
none
User-generated base image recipes
none
Custom save base image dialog
none
Custom save base image dialog
none
Labelling changes none

Description Belen Barros Pena 2013-04-04 09:23:22 UTC
We are reinventing the templates functionality in Hob. 

After some discussion on the mailing list and within the Hob team, we are leaning towards providing functionality to save customised builds as the user's own image recipes that can then be retrieved for reuse.
Comment 1 Bogdan Marinescu 2013-04-08 07:54:57 UTC
Is there any design document available from this (at least from the UI standpoint)?
Comment 2 Belen Barros Pena 2013-04-08 09:15:20 UTC
not yet ...
Comment 3 Belen Barros Pena 2013-05-20 13:35:59 UTC
Created attachment 1218 [details]
User-generated base image recipes

Our first designs for this feature (the document is work in progress).
Comment 4 Belen Barros Pena 2013-05-23 17:24:48 UTC
Created attachment 1221 [details]
User-generated base image recipes

Updated document to use customised Gtk FileChooserDialog instead of custom dialogs. 

We still need to resolve the "small" issue of how to provide deleting functionality for user-generated base images.
Comment 5 Belen Barros Pena 2013-05-30 10:19:10 UTC
Created attachment 1230 [details]
User-generated base image recipes

Update to the design document: changed how we dismiss the base image saved confirmation message to match the build complete confirmation message behaviour (pages 7 and 9).
Comment 6 Cristiana Voicu 2013-06-19 14:26:24 UTC
I am changing the milestone for this bug, because I had to work on the changes in Hob related to bitbake-wroker.
Comment 7 Cristiana Voicu 2013-07-08 11:43:22 UTC
Hi Belen,

I have created the branch on poky contrib with the implementation for this feature. Sorry for the delay.
Here is the link:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=cvoicu/hobtemplates

I am waiting for your feedback.
Thanks,
Cristiana
Comment 8 Belen Barros Pena 2013-07-10 14:58:36 UTC
(In reply to comment #7)
> Hi Belen,
> 
> I have created the branch on poky contrib with the implementation for this
> feature. Sorry for the delay.
> Here is the link:
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=cvoicu/
> hobtemplates

After some testing, the only major issue we encountered is ensuring users provide valid names for their .bb files. 

Apparently, the naming rules are as follows:

* valid characters are a-z (no uppercase allowed) and 0-9
* ASCII hyphens
* ASCII underscore (only one, since it marks the beginning of the version
information)
* ASCII periods (only after the underscore)

We have agreed to help users to provide valid names using a custom save dialog. I am working on design documentation right now. 

We have also opened a separate bug for deleting user-generated base image recipes (if we allow them to create them, we should allow them to get rid of them too). See bug 4840.

> 
> I am waiting for your feedback.
> Thanks,
> Cristiana
Comment 9 Belen Barros Pena 2013-07-11 15:17:56 UTC
Created attachment 1322 [details]
Custom save base image dialog
Comment 10 Belen Barros Pena 2013-07-12 10:07:27 UTC
Created attachment 1326 [details]
Custom save base image dialog
Comment 11 Cristiana Voicu 2013-07-16 14:20:03 UTC
I have implemented this feature as per the last design document. I have updated the poky contrib branch. Also the patches are rebased based on the last commit on master.
Cristiana
Comment 12 Belen Barros Pena 2013-07-24 13:02:36 UTC
Created attachment 1354 [details]
Labelling changes
Comment 13 Cristiana Voicu 2013-07-25 08:27:17 UTC
Hi Belen,

I have updated the branch with the last changes. After your review I will send the new patches on the list.
Thanks,
Cristiana

(In reply to comment #12)
> Created attachment 1354 [details]
> Labelling changes
Comment 14 Belen Barros Pena 2013-07-25 10:49:20 UTC
Looking good. There is only one tiny thing: there is a space missing in
the "Invalid characters in image recipe name" alert. At the very end,
between "hyphen" and the "(". Let the label wrap to
a new line if it needs to.

And Paul is not happy with "Create your own image recipe" in the image
recipes combo. In fact, he hates it. We have agreed on: "Start with an
empty image recipe".

Sorry about all the back and forth: I know this is annoying work. We are almost there, though! :)

Belén

(In reply to comment #13)
> Hi Belen,
> 
> I have updated the branch with the last changes. After your review I will
> send the new patches on the list.
> Thanks,
> Cristiana
> 
> (In reply to comment #12)
> > Created attachment 1354 [details]
> > Labelling changes
Comment 15 Cristiana Voicu 2013-07-25 11:43:18 UTC
Thank you for the feedback. I have sent version 2 of the patch set on the list.
Cristiana

(In reply to comment #14)
> Looking good. There is only one tiny thing: there is a space missing in
> the "Invalid characters in image recipe name" alert. At the very end,
> between "hyphen" and the "(". Let the label wrap to
> a new line if it needs to.
> 
> And Paul is not happy with "Create your own image recipe" in the image
> recipes combo. In fact, he hates it. We have agreed on: "Start with an
> empty image recipe".
> 
> Sorry about all the back and forth: I know this is annoying work. We are
> almost there, though! :)
> 
> Belén
> 
> (In reply to comment #13)
> > Hi Belen,
> > 
> > I have updated the branch with the last changes. After your review I will
> > send the new patches on the list.
> > Thanks,
> > Cristiana
> > 
> > (In reply to comment #12)
> > > Created attachment 1354 [details]
> > > Labelling changes
Comment 16 Cristiana Voicu 2013-08-07 07:31:21 UTC
16 patches for this enhancement were merged to master
the laste one is:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e76fdac6f15f2f80ed888db0dba38b2d2d1db35c
Comment 17 Andreea Brandusa Proca 2013-08-22 10:12:22 UTC
Verified in master:6382979cca1d1c57467f983ba9611f91555b20a9.