Bug 2565

Summary: [HOB] Limit the list of build profiles to the ones which are sensible
Product: [Build System, Metadata & Runtime] Hob Reporter: Dave Stewart <david.c.stewart>
Component: hobAssignee: Constantin Musca <constantinx.musca>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: alexandru.damian, belen.barros.pena, bluelightning, constantinx.musca, corneliux.stoicescu, cristiana.voicu, dvhart, jessica.zhang, jiajun.xu, poky.bs.watcher, poky.watcher, richard.purdie
Version: 1.2   
Target Milestone: 1.4 M2   
Hardware: x86   
OS: Multiple   
Whiteboard: a0a265e352b074b54928cf50563561c92aa2f814
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Bug Depends on: 3446    
Bug Blocks: 2345, 2566    

Description Dave Stewart 2012-06-08 21:53:19 UTC
When you run Hob and after recipes are parsed, you are presented with a drop down box with a long list of what I would call "build profiles". Hob calls this "Select a base image"

However, some of these don't make sense. For example, when I set the Distro to be poky-tiny, I think the only reasonable build profiles are core-image-minimal-*

But instead, I am offered options like core-image-sato and core-image-lsb. These clearly make no sense in a poky-tiny build. Please grey them out or better yet, remove them from the list altogether.
Comment 1 Shane Wang 2012-06-13 02:12:34 UTC
In bitbake command line, when poky-tiny is set and core-image-sato is built, an error will occur to say libx11 is missing. So, I suspect Hob will report the same issue during the build stage.

This is to add the feature to detect which images are impossible for some distro.
Comment 2 Paul Eggleton 2012-10-25 14:04:18 UTC
This should be able to be handled by blacklisting the image recipes; it's very likely for something like poky-tiny we would want to blacklist certain normal recipes that are expected not to build with that distro as well. To do this, we would need to add the following to the poky-tiny distro configuration:

INHERIT_DISTRO += "blacklist"
PNBLACKLIST[core-image-sato] = "not buildable with poky-tiny"
PNBLACKLIST[core-image-lsb] = "not buildable with poky-tiny"
...

After doing this, these images/recipes should no longer show up in Hob, and as a bonus this mechanism will make these unavailable for bitbake on the command line as well.

Darren (added to CC), can you suggest any recipes that you know of which can't or shouldn't be built with poky-tiny and should be added to this list?
Comment 3 Darren Hart 2012-11-16 19:23:03 UTC
I don't have an exhaustive list. If it pulls in gettext, it fails. diffutils fails. I haven't tried building sato or lsb to see where they explode.

My concern with the distro blacklist thing is that it cannot be all inclusive. Any new images or new layers with images will appear in HOB as buildable, even though they most likely are not. For this particular problem, a whitelist might be more appropriate. New layers wishing to build with tiny would have to test their builds and explicitly append their image to the tiny whitelist.

That said, I don't know that we can do a whitelist of just images and ignore the check for packages.
Comment 4 Constantin Musca 2013-01-03 13:07:43 UTC
We decided to use the blacklist approach and all the inappropriate images were blacklisted.

Cheers,
Constantin
Comment 5 Belen Barros Pena 2013-01-03 15:30:18 UTC
Hi!

I've looked at the fix by changing the selected distro in the Advanced Configuration dialog and looking then at how many base images are displayed in the drop down menu. 

The outcome seems to be to reduce the number of base images available when you select poky-tiny (from 19 to 5). All other distro selections display the full 19 base images. The base images displayed don't change based on the machine selection.

If this is the expected behaviour, then this is fixed. 

I've found 2 problems though:

1. Selecting poky-bleeding as your distro doesn't seem to work. When I select poky-bleeding as the distro and then hit the Save button, the selection is not saved: when I open the Advanced Configuration dialog again, the distro selection has been changed to 'poky'.

2. When I change the distro and click Save, the image configuration screen remembers my previous base image selection (which is fine), but the base image drop down menu still displays the 'select a base image' option (that option should only show when no base image is selected). When you select that option, Hob seems to hang (the interface becomes inactive and shows a spinning cursor indefinitely). 

Should I open bugs for these 2 issues?

Thanks!
Comment 6 Constantin Musca 2013-01-03 15:43:46 UTC
(In reply to comment #5)
> Hi!
> 
> I've looked at the fix by changing the selected distro in the Advanced
> Configuration dialog and looking then at how many base images are displayed
> in the drop down menu. 
> 
> The outcome seems to be to reduce the number of base images available when
> you select poky-tiny (from 19 to 5). All other distro selections display the
> full 19 base images. The base images displayed don't change based on the
> machine selection.
> 
> If this is the expected behaviour, then this is fixed. 
> 
> I've found 2 problems though:
> 
> 1. Selecting poky-bleeding as your distro doesn't seem to work. When I
> select poky-bleeding as the distro and then hit the Save button, the
> selection is not saved: when I open the Advanced Configuration dialog again,
> the distro selection has been changed to 'poky'.
> 
> 2. When I change the distro and click Save, the image configuration screen
> remembers my previous base image selection (which is fine), but the base
> image drop down menu still displays the 'select a base image' option (that
> option should only show when no base image is selected). When you select
> that option, Hob seems to hang (the interface becomes inactive and shows a
> spinning cursor indefinitely). 
> 
> Should I open bugs for these 2 issues?
> 
> Thanks!

Yes, please open bugs for these issues.

Cheers,
Constantin
Comment 8 Stoicescu Cornel 2013-01-04 15:28:35 UTC
Since the blacklist resolves the poky-tiny issue and only applies to it, I am closing this as verified! 

master: 09359e6ec00901abfe49157f1f9730117b4d284b