Bug 2155 - [Hob2] In the 'Image details' screen, it should not be necessary to select images whenever the build process outputs more than one file
Summary: [Hob2] In the 'Image details' screen, it should not be necessary to select im...
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.3 M2
Assignee: anliming
QA Contact:
URL:
Whiteboard: (testing)
Depends on:
Blocks:
 
Reported: 2012-03-22 15:04 UTC by Giulia
Modified: 2012-08-03 18:17 UTC (History)
11 users (show)

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


Attachments
Run Image dialog (to be used only when more than 1 image can be run on a virtual machine) (115.83 KB, application/pdf)
2012-03-22 15:04 UTC, Giulia
no flags Details
Image detail screen for a physical machine (69.10 KB, application/pdf)
2012-03-22 15:11 UTC, Giulia
no flags Details
Image detail screen for virtual machine (69.02 KB, application/pdf)
2012-03-22 15:14 UTC, Giulia
no flags Details
0-image-details.png (64.26 KB, image/png)
2012-05-15 11:55 UTC, Belen Barros Pena
no flags Details
1-image-types.png (32.43 KB, image/png)
2012-05-15 11:55 UTC, Belen Barros Pena
no flags Details
2-image-files.png (70.74 KB, image/png)
2012-05-15 11:56 UTC, Belen Barros Pena
no flags Details
3-emulator.png (14.39 KB, image/png)
2012-05-15 11:56 UTC, Belen Barros Pena
no flags Details
not-as-designed.png (72.96 KB, image/png)
2012-05-28 08:58 UTC, Belen Barros Pena
no flags Details
irrelevant-screen-selection.png (40.59 KB, image/png)
2012-05-28 08:59 UTC, Belen Barros Pena
no flags Details
selecting-for-what.png (45.20 KB, image/png)
2012-06-12 13:21 UTC, Belen Barros Pena
no flags Details
Image details screen - cases (672.61 KB, application/pdf)
2012-06-20 12:44 UTC, Belen Barros Pena
no flags Details
HOB build error (223.35 KB, image/png)
2012-07-24 12:56 UTC, Alexandru Palalau
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Giulia 2012-03-22 15:04:30 UTC
Created attachment 387 [details]
Run Image dialog (to be used only when more than 1 image can be run on a virtual machine)

In the 'Image details' screen, it should not be necessary to select an image whenever the build process outputs more than one file, as:

1. If users are building an image for a physical machine, they will only be able to deploy the 'live' image file. All image files will be available in the same directory by clicking the 'View files' button.

2. If users are building an image for a qemu machines, by default, the building process outputs 2 files: ext3 and tar.bz2. Of those 2, only the ext3 file can be run by the emulator, therefore no file selection is required (only display one file name).

Users will only need to make a selection if (and only if) the output of the build process includes more than 1 of the following image types:

 *   ext3
 *   ext2
 *   jffs2
 *   btrfs

In that case, when users click the 'Run Image' button, they will be prompted to select an image type using a modal dialog (in attachment). Only image types that can be run on a virtual machine will be displayed in the dialog.
Comment 1 Giulia 2012-03-22 15:11:57 UTC
Created attachment 388 [details]
Image detail screen for a physical machine
Comment 2 Giulia 2012-03-22 15:14:30 UTC
Created attachment 389 [details]
Image detail screen for virtual machine
Comment 4 Giulia 2012-04-03 15:39:18 UTC
This problem has not been  fixed yet so I'm re-opening the bug. If the problem can't be solved for this release can we maybe simply change the milestone instead of marking it as fixed?
Comment 5 Shane Wang 2012-04-17 08:40:01 UTC
Liming, please implement the run image dialog and other screens as mentioned in v1.3
Comment 7 Belen Barros Pena 2012-05-14 11:38:30 UTC
Hi Liming,

I cannot see the fix. I am using the master branch for verifying, as we were doing before the 1.2 release.

Should I be using a different branch for verifying the bugs?

Thanks!

Belen
Comment 8 Belen Barros Pena 2012-05-15 11:54:43 UTC
Hi Liming,

It turned out I was pulling the wrong branch. I can see the fix now, but I am afraid it still not fully there. 

To test the fix, I created a core-image-minimal image for qemux86 selecting as output the following image types:

ext2
ext3
tar.bz2

You can see my selections in the screenshot 1-image-types.png

As you can see in the screenshot 2-image-files.png, the image built correctly and generated ext2, ext3 and tar.bz2 files.

Here comes a list of what needs to be fixed:

1. In the image details screen, below the 'Directory' information, there is a line saying: "(Selected QEMU items to be as runnable image)" (see screenshot 0-image-details). Please delete this line.

2. The bug explained that users should not be required to select an image file, since this is not necessary. The only exception to this rule is when the output of the build process includes more than one of the following image types: ext3, ext2, jffs2 and btrfs. In this case, when the user clicks on the 'Run image' button, users should see the Run Image dialog (see the first screenshot on this bug), since all those 4 files can be run in the qemu emulator and therefore users must tell us which one they want to run. 

In the test I did, because the output of the build process included ext2 and ext3 files, I should have seen the 'Run Image' dialog and I should have selected which of those 2 files I wanted to run in the emulator. Instead, the emulator just ran. From the screenshot 3-emulator.png it looks like it is defaulting to running the ext2 file.

If you have any questions, please let me know.

Cheers

Belen
Comment 9 Belen Barros Pena 2012-05-15 11:55:27 UTC
Created attachment 509 [details]
0-image-details.png
Comment 10 Belen Barros Pena 2012-05-15 11:55:51 UTC
Created attachment 510 [details]
1-image-types.png
Comment 11 Belen Barros Pena 2012-05-15 11:56:11 UTC
Created attachment 511 [details]
2-image-files.png
Comment 12 Belen Barros Pena 2012-05-15 11:56:32 UTC
Created attachment 512 [details]
3-emulator.png
Comment 13 anliming 2012-05-16 06:09:40 UTC
Hi Belen, The patch I had submitted has some case I don't care as your metioned, Thanks! but there has another case need to be concern, and this case can effect how to set the work way about 'running image' or 'deploy image'.please to review.
Maybe there has someone want to running the image only use the image which be build by hob and with their own kernel file. 
the current work way of clicked the 'running image' as this bug design is:
if there has only one qemu image and one kernel file after building, it can be run by clicked the 'running image' button directly. can not support this case.please to refer it?(metioned by Dongxiao)
Comment 14 anliming 2012-05-16 15:20:49 UTC
Hi Belen, I add a temp patch to poky-contrib for your test, which changed as your metion, but It seem as same as the original work way and view of this page before change this bug. http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=limx/hob-bug-fixes-continue
Comment 15 Belen Barros Pena 2012-05-21 08:33:09 UTC
Hi Liming,

Just tested this using your branch, but it doesn't seem to be working. I've built a qemux86 core-image-minimal with output ext2, ext3 and tar.bz2. When I click the 'Run image' button, I get the dialog to select a kernel, but nothing to select which image file (ext2 or ext3) I want to run in the emulator. It looks like it is still running ext2 by default.

Thanks for bringing up the kernel case: I've opened a separate bug to make sure I don't forget about it ;)

https://bugzilla.yoctoproject.org/show_bug.cgi?id=2476

Belen
Comment 16 Belen Barros Pena 2012-05-28 08:58:19 UTC
Hi there,

This is still not working as designed: we are back to forcing screen selections every time, instead of requiring selection only when necessary (see screenshot not-as-designed.png).

Forcing selection causes screens like the one shown in the attached file irrelevant-screen-selection.png, where selecting files is meaningless since you can do nothing with them.

Belen
Comment 17 Belen Barros Pena 2012-05-28 08:58:54 UTC
Created attachment 544 [details]
not-as-designed.png
Comment 18 Belen Barros Pena 2012-05-28 08:59:13 UTC
Created attachment 545 [details]
irrelevant-screen-selection.png
Comment 19 anliming 2012-05-28 13:26:03 UTC
Ok,I know. your means to add a dialog when nessery (there has more than one image). but sorry I don't changed it because below(maybe something I am wrong): 
1) we will need to change the primary action button as image type and machine type, if we add a new dialog we will change them, as the same 'action' button.
2) I code layer we make the 'Image detail' and 'My image' pages as the basic
code, only different is they deploy the 'config' box on it or not.
Comment 20 Belen Barros Pena 2012-05-30 10:31:21 UTC
Sorry, Liming,

I am not sure I understand. Could you explain a bit more?

The point I am trying to make is that most of the times the step of selecting a file to run or deploy is not necessary. So it doesn't make sense to force people to make a selection when we could just take action for them by picking the image file applicable to the action they have selected. 

In the rare cases when there are 2 or more files that can be run or deploy, then we ask people to select between the relevant files. It's about catering the design for the main use case (what happens the majority of times), and not to the edge cases.

This final screen is very important, and even if it takes a bit longer, I really would like to get it right.

Thanks

Belen
Comment 21 anliming 2012-06-01 10:20:37 UTC
Hi Belen, please to review, and how about your advice about it.
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=limx/hob-bug-fixes-another
Comment 22 anliming 2012-06-05 01:55:40 UTC
cherry-pick to other branch, it's the same commit as above item listed here.
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=limx/hob-bug-fixes-continue&id=4ebc546e7ec432cbeebc0662fc8096d1904cd344
Comment 23 anliming 2012-06-11 03:13:25 UTC
It had be merged to master, please to review.
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e91f1e28bc1742f010225c49410e49b1257c15c7
Comment 24 Belen Barros Pena 2012-06-12 13:21:30 UTC
Created attachment 570 [details]
selecting-for-what.png

Hi Liming, 

I can see what you've done by changing the actions available for each file type, but I still think it would be neater if we simply implement a dialog that appears only when it is absolutely necessary.

It is very strange when you open an image you've built a while ago which cannot be run in the emulator (e.g. for atom-pc) and you can still select an image file when you really can do nothing with it (the only option on the screen in building a new image). See attached file selecting-for-what.png

Is there any reason why you are so reticent to implement the dialog we designed in the first place?

Thanks!

Belen
Comment 25 Belen Barros Pena 2012-06-12 13:22:10 UTC
Reopening because it is still not fixed
Comment 26 anliming 2012-06-13 02:16:43 UTC
Let me test my understanding. Correct me if you find anything wrong.
Then I will continue to implement.
1.for building detail page (after building success)
a.If only generated one file, there has some cases below,
runnable: allow it to run directly by clicked 'run image' and no dialog. display it as show of the picture 'Image detail screen for virtual machine' which be listed above, and add the related core image box as design.
deployable: allow it to be deployed by clicked 'deploy image' and with display similar to the runnable case.
can't run/deploy: primary action is 'save as template',
runable and deployable: this case is rare, primary action is 'run image',the other actions are 'deploy image' and 'save as template'
b.If there have more than one file after building success.
runnable: add the related core image select box. and if cliced the 'run image' button, it will popup the files selection dialog, then the user can select which one they want to do and action will changed as the file type.
deployable: the view only list its name and directory. by clicked the 'deploy image' button, it will popup the selection dialoy with the corresponding action button. if user selected one, then he can click that button to confirmed it action, then we will did that action as selected file type.
can't runnable and deployable: no the popuped dialog, in mainly detail page there has 'save as temploy' action to user.
runnable and deployable: the view similar to the 'deployable and runnable case' listed above, in popuped file selection dialog, the 'runnable' is priority than 'deploy', and we will change the action as selected file type.
Comment 27 anliming 2012-06-13 02:36:50 UTC
Plase to review continue,If opened the 'my image' page:
The mainly display only give the file selection box and image size info box, if selected an runnable image, the page will add a core image selection box.
the primary action button will changed as selected file, the default selection gived by program. 
a)if user selected a 'runnable' file:
it listed the core image selection box, it allowed to run directly by click button
b)if user selected a 'deployable' file:
no core image selection box, and allowed to popup the deploy dialog.
c)if user selected a 'can't runnable or deployable' file:
only give the 'build new image' action. and this case is posiable now.
d)if user selected a 'runnable and deployable' file:
the priority action is 'run image', and other action 'deploy' will be listed too.
Comment 28 Belen Barros Pena 2012-06-14 15:06:27 UTC
Hi Liming,

Thanks for your comments: they list very well the different combinations. I have posted a question on the mailing list about allowing the 'runnable and deployable case' for Hob users. 

I also have a quick question for you. This is my list of 'runnable' files:

ext3
ext2
jffs2
btrfs
vmdk

Is it complete? Am I missing any?

Thanks!

Belen
Comment 29 anliming 2012-06-15 02:14:10 UTC
Hi Belen, the program queryed the bitbake/meta, it can only support the qemu machine, and ext2, ext3 to runnable directly.
Comment 30 Belen Barros Pena 2012-06-15 08:48:25 UTC
So, just to make sure I understad this correctly: the only runnable files are ext2 and ext3 when built for qemu machines. 

Thanks!

Belen

(In reply to comment #29)
> Hi Belen, the program queryed the bitbake/meta, it can only support the qemu
> machine, and ext2, ext3 to runnable directly.
Comment 31 anliming 2012-06-18 01:28:14 UTC
Hi Belen, how about your adivce to correct it?
Comment 32 Belen Barros Pena 2012-06-18 08:59:11 UTC
Hi Liming,

Working on it. I am trying to get in touch with the engineers working in the image-writer. We need to find out if they will handle the 'more than one deployable file' case or if Hob needs to do it.

Belen

(In reply to comment #31)
> Hi Belen, how about your adivce to correct it?
Comment 33 Belen Barros Pena 2012-06-20 12:44:31 UTC
Created attachment 600 [details]
Image details screen - cases
Comment 34 Belen Barros Pena 2012-06-20 12:45:01 UTC
Hi Liming,

Could you have  a look to the file 'Image details screen - cases' (https://bugzilla.yoctoproject.org/attachment.cgi?id=600) and tell me what you think? 

Thanks!

Belen
Comment 35 anliming 2012-06-29 05:29:10 UTC
Hi Belen, Thanks for your work, and I had changed the code as your design, except for how to response to the click 'image' button in building success detail page. I think, the image should give user a chance to broswe the all images even in this page.
your question in the pdf about if we can support the function 'save as template' on 'my image' page, I say yes for your understanding, we don't support 'save as template' in this page, even it jump from the building success page.
please to review.
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=limx/hob-bug-fixes-continue
Comment 36 Belen Barros Pena 2012-07-02 15:32:40 UTC
Hi Liming,

I am testing this in the branch you gave me, but I am not sure I am looking at the right thing. I cannot see any of the changes outlined in 

https://bugzilla.yoctoproject.org/attachment.cgi?id=600

Just wondering if something has changed since last Friday when you posted the link to the branch. 

Thanks!

Belen
Comment 37 Belen Barros Pena 2012-07-02 16:14:21 UTC
Hi Liming,

Just saw this has been merged to master. I'll test there.

Cheers

Belen

(In reply to comment #36)
> Hi Liming,
> 
> I am testing this in the branch you gave me, but I am not sure I am looking
> at the right thing. I cannot see any of the changes outlined in 
> 
> https://bugzilla.yoctoproject.org/attachment.cgi?id=600
> 
> Just wondering if something has changed since last Friday when you posted
> the link to the branch. 
> 
> Thanks!
> 
> Belen
Comment 38 anliming 2012-07-03 11:17:36 UTC
There has a bug, I had fixed it, please to test this branch which base on new master.http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=limx/hob-bug-fixes-continue
Comment 39 Shane Wang 2012-07-04 07:24:02 UTC
Liming, verifying on the private branch doesn't make any sense. Try your best to push the patch to the master, and then it can be verified on the master or the release branches.
Comment 40 anliming 2012-07-05 00:21:43 UTC
Hi Shane, yes I know. the branch had be merged to poky master.http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=5d79175b87fe352c3f4d62a1e49df2a7052488d9
Comment 41 Alexandru Palalau 2012-07-24 12:56:24 UTC
Created attachment 659 [details]
HOB build error

HOB build undefined error under poky-5d79175b87fe352c3f4d62a1e49df2a7052488d9
Comment 42 Alexandru Palalau 2012-07-24 12:58:06 UTC
Trying to test the mentioned changes, HOB always returned the error presented in HOB_build_error, when building an image.
Comment 43 anliming 2012-07-25 01:31:41 UTC
Hi Alexandru Palalau: Sorry, I don't get more information from your picture in attachment to help me to give you advice about the issue in building process, but I suggest you to do an new build directory then to rebuild again. but I have another question, if you want to test this bug, you no need to use the /meta/intel, you can use an build successful distro and meta, because this bug dose not to resolve the build issue. Thank you!
Comment 44 Laurentiu Serban 2012-07-31 14:34:00 UTC
Hello,
I am reopening this due the fact that there are some things to be clarified:

1. tar.bz2 image type is not shown (along with ext2 and ext3) after the "Run image" button is pressed. Is this intended?
2. Only ext2 and ext3 image types are listed. Is this intended?
3. I understood from the comments that only the image types are going to be displayed in order to be selected (if more than one) and not the images. Is this correct?

Thank you.
Comment 45 anliming 2012-08-01 01:33:26 UTC
hi Laurentiu Serban, 
all processing when you clicked the button and the related UI be as the UI design, please to refer to the spec https://bugzilla.yoctoproject.org/attachment.cgi?id=600
1) the tar.bz2 will not be shown when you clicked 'run image' button, because it not belong with 'runnable' or 'deployable' category, it's right 2) it should only the 'ext2' and 'ext3' be listed in the 'run image' dialog, because so far hob only support the qemu image type to run, so you can't get together qemu image and other deploy image,3) yes.
Thanks!
Comment 46 anliming 2012-08-02 07:18:52 UTC
Hi Laurentiu Serban, did you clear, if no issue or question, please to change the bug state.thanks!
Comment 47 Laurentiu Serban 2012-08-03 18:17:10 UTC
Liming, thank you for the comments.
I am setting this to verified.