Bug 4388

Summary: After building an image, Hob reports the estimated image size in the "Edit Packages" screen
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: normal    
Priority: Medium CC: belen.barros.pena, cristian.iorga, jessica.zhang, poky.bs.watcher, poky.watcher, razvanx.ionescu, valentin.popa
Version: 1.4   
Target Milestone: 1.5 M2   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
29pckg-22.1MB.png
none
29pckgs-8.6MB.png none

Description Belen Barros Pena 2013-04-22 17:11:26 UTC
Created attachment 1197 [details]
29pckg-22.1MB.png

This bug replaces bug 2618.

Steps to reproduce:

1. Launch Hob
2. Select a machine and base image (for example, atom-pc and core-image-minimal) 
3. Build the image
4. The Image details screen will come up and show a total image size (see screenshot 29pckg-22.1MB.png)
5. Click the "edit packages" button

Outcome: the "Edit packages" screen will show a different total image size to the one displayed in the "Image details" screen (see screenshot 29pckgs-8.6MB.png).

To fix this, I think we ought to make explicit that what we are showing in the packages screen is an estimated total image size. This involves changing the label "Total image size" to "Estimated total image size" in the packages screen (both during the building process and when editing packages after the build completes).

Regarding the calculations for the estimated size, I think we have 2 options. 

1. After building, we display the final total image size in the "Edit packages" screen. If users make any changes to the included packages, we provide an estimate that takes into account the final total image size. 

2. After building, we revert back to the estimated size as shown during the building process. Since we now specify this is an estimate, at least users know it might not be accurate.

I would prefer option 1, but I am not sure it's feasible.
Comment 1 Belen Barros Pena 2013-04-22 17:11:49 UTC
Created attachment 1198 [details]
29pckgs-8.6MB.png
Comment 2 Belen Barros Pena 2013-04-22 17:13:19 UTC
Assigning to Cristiana, since she was dealing with bug 2618
Comment 4 Belen Barros Pena 2013-05-28 11:14:13 UTC
In the packages screen, we should probably change the label "Total image size" to "Estimated total image size". If that's too long, "Estimated image size" will also do.

About the reported image size in the packages screen, I am a bit puzzled. If I build an image and then click the "edit packages" button, I now get the same image size in the packages screen and in the image details screen, which is good. 

However, when I remove some packages, things go a bit funny. If I build core-image-minimal for qemux86 I get an image size of 8.1MB and a selected packages size of 6.5MB. If I then click the 'edit packages' button and remove eglibc, my image size goes down to 1.5MB, only 0.3MB bigger than the reported selected package size (1.2MB).

On the other hand, if I remove sysvinit, the selected package size goes down to 6.3MB, but the total image size goes up to 8.2MB, which makes no sense to me. 

IMAGE_ROOTFS_SIZE is set to 64 and IMAGE_ROOTFS_EXTRA_SPACE is set to 0 in Hob.

By the way, if I build an image and then click the 'Edit packages' button, I am dumped into the "all packages" tab for some reason. The tab selected by default should be the "Included packages" tab.
Comment 5 Belen Barros Pena 2013-05-30 10:00:44 UTC
Reopening so that we can look into how we are calculating the estimated image size. 

We should also address the labeling and the selected tab issues.
Comment 6 Cristiana Voicu 2013-07-30 07:16:20 UTC
Hi Belen,

Regarding the solution for this bug, I don't know another way to compute the image size. I propose to change the label to "Estimated total image size". 
Is this ok for you Belen?

Thanks,
Cristiana
Comment 7 Belen Barros Pena 2013-07-30 08:44:19 UTC
(In reply to comment #6)
> Hi Belen,
> 
> Regarding the solution for this bug, I don't know another way to compute the
> image size. I propose to change the label to "Estimated total image size". 
> Is this ok for you Belen?

That sounds good. Thanks, Cristiana!

Belen 

> 
> Thanks,
> Cristiana
Comment 8 Cristiana Voicu 2013-07-30 11:59:56 UTC
I have sent a patch with this change. I changed the name of the label into "Estimated image size" because Estimated total image size was too long.
Changed the status to patch review.
Comment 9 Cristiana Voicu 2013-08-07 07:28:55 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 10 Cristiana Voicu 2013-08-07 07:30:59 UTC
Sorry, wrong bug. the patch for this bug is at:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=adcce841b470cdec3788bc2e54c0588d34d94ea3

(In reply to comment #9)
> 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 11 Razvan Ionescu 2013-10-07 13:54:53 UTC
Verified with poky: adcce841b470cdec3788bc2e54c0588d34d94ea3
Now both image sizes are the same (e.g. core-image-minimal-atom-pc - 7.3MB)