Bug 2113 - [Hob2] Layer changes are not persisted between hob runs
Summary: [Hob2] Layer changes are not persisted between hob runs
Status: VERIFIED FIXED
Alias: None
Product: Hob
Classification: Build System, Metadata & Runtime
Component: hob (show other bugs)
Version: 1.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.2 M4
Assignee: Shane Wang
QA Contact:
URL:
Whiteboard: (1.2) Patch out
Depends on:
Blocks:
 
Reported: 2012-03-14 23:21 UTC by Joshua Lock - Disabled
Modified: 2012-04-18 00:16 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Lock - Disabled 2012-03-14 23:21:14 UTC
When using the Hob2 I can add and remove layers using the layer selection dialogue but if I exit Hob and relaunch the changes to the layer configuration are no longer present.

Steps to reproduce:

1. Start Hob
2. Open Layer dialogue
3. Add one or more layers
4. Close Layer dialogue
5. Exit Hob
6. Start Hob
7. Layers added in step 3 are no longer present in Layer selection dialogue
Comment 1 Shane Wang 2012-03-16 02:27:11 UTC
I don't think that was a bug.

What if the users want to start with a clean environment? They will complain this feature you made.

If the users really want to save the layers they selected, they could use "Save as Templates".

What do you think, Josh?
Comment 2 Joshua Lock - Disabled 2012-03-16 19:40:24 UTC
(In reply to comment #1)
> I don't think that was a bug.
> 
> What if the users want to start with a clean environment? They will complain
> this feature you made.

I disagree. I think a user would complain about having to add the layers they want to use each time. Imagine a user who always has a layer for their companies customisations, they have to add that layer each time they use hob.

For a user who wants to start with a clean environment we could add a "Defaults" button, or similar.
 
> If the users really want to save the layers they selected, they could use "Save
> as Templates".

I've not played around with the Templates functionality much but I think this solution is sub-optimal.

Adding Belen and Giulia for their UX input.
Comment 3 Belen Barros Pena 2012-03-19 15:53:09 UTC
Hi Joshua and Shane,

You both have a point: it all depends on what the most frequent use case is. What we are missing in order to make the right decision is information about how Yocto (and by extension Hob) is used / will be used in the real world. 

Since we won't have that information in the short term, we need to make some assumptions. Would both of you agree that it is reasonable to assume that lots of Yocto users will be tweaking a certain image over and over again? This assumption is in line with what I've been hearing in my conversations with people like Inaky and Damien, but you might have a different point of view about it.

If you agree with the assumption above, then it is important we keep the changes to the layers configuration between Hob sessions (i.e. changes made on the Layers dialog should not be lost when I close Hob).

I would not add a 'restore defaults' option just yet: I would keep the Layers dialog as simple as possible for the moment. The design will allow users to delete a layer with a single click, which is quite efficient. If users request the option to restore the default layers configuration, then we can work on a way to bring the option in.

What do you think?

Belen
Comment 4 Joshua Lock - Disabled 2012-03-19 20:23:26 UTC
(In reply to comment #3)
> Since we won't have that information in the short term, we need to make some
> assumptions. Would both of you agree that it is reasonable to assume that lots
> of Yocto users will be tweaking a certain image over and over again? This
> assumption is in line with what I've been hearing in my conversations with
> people like Inaky and Damien, but you might have a different point of view
> about it.

This is also my assumption.
Comment 5 Shane Wang 2012-03-21 03:34:45 UTC
Belen, I think your assumption is reasonable.

Belen and Josh, I agree.

By the way, should we remember machine setting between Hob sessions, some advanced settings as well (say file system type, bbthreads, etc). I also assume frequent users don't want to set them every time.
Comment 6 Shane Wang 2012-03-21 03:36:08 UTC
Machine means an arm company/user will not build x86 image at all.
Comment 7 Belen Barros Pena 2012-03-21 12:24:38 UTC
As a general rule, I would keep values set via the Settings dialogue between Hob sessions. So if I set the number of threads in the Settings dialogue, then I close Hob, when I open Hob again the number of threads is the same as when I left it (I don't need to set it again).

All other stuff (e.g. machine, base image, etc) should not be kept between sessions.

Do you think that's reasonable?

Belen
Comment 8 Joshua Lock - Disabled 2012-03-21 16:24:11 UTC
(In reply to comment #7)
> As a general rule, I would keep values set via the Settings dialogue between
> Hob sessions. So if I set the number of threads in the Settings dialogue, then
> I close Hob, when I open Hob again the number of threads is the same as when I
> left it (I don't need to set it again).
> 
> All other stuff (e.g. machine, base image, etc) should not be kept between
> sessions.
> 
> Do you think that's reasonable?

I agree with this, it's what we aimed for in the first version of Hob.
Comment 9 Shane Wang 2012-03-22 01:43:02 UTC
Clear. I am going to fix it.
Comment 10 Dave Stewart 2012-04-09 15:30:06 UTC
Guys - we talked about this, and it seems like the thread count should be persistent between hob invocations, but there are other things in Settings which we might want to reset when we spin it up again. 

Let's prefer the minimal change for 1.2 and we can revisit after, OK?
Comment 11 Belen Barros Pena 2012-04-10 18:04:56 UTC
Hi Dave,

Could you tell us a bit more about which Settings options you'd rather reset?
Comment 12 Shane Wang 2012-04-14 08:10:33 UTC
Nothing in the advanced setting will be reset.
In the current implementation, we are going to remember all layers and settings.

No worry.
Comment 13 Shane Wang 2012-04-14 08:10:56 UTC
Under Testing...
Comment 15 Joshua Lock - Disabled 2012-04-18 00:16:51 UTC
I can set layers and package format and have them remembered the next time I launch hob. Verified!