Bug 3176

Summary: Hob shows layer misconfiguration error after deleting meta-yocto layer
Product: [Build System, Metadata & Runtime] Hob Reporter: Ioana Grigoropol <ioanax.grigoropol>
Component: hobAssignee: Cristiana Voicu <cristiana.voicu>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: andreea.b.proca, cristian.iorga, jessica.zhang, poky.bs.watcher, poky.watcher, richard.purdie, song.liu, tocallaghan, valentin.popa
Version: 1.3   
Target Milestone: 1.4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Bug Depends on: 3372    
Bug Blocks:    
Attachments:
Description Flags
Layer Edit
none
Error message
none
distro-not-set.png none

Description Ioana Grigoropol 2012-09-26 13:40:36 UTC
Created attachment 847 [details]
Layer Edit

When editing the layers on the 'Image configuration' page, I am able to delete the meta-yocto layer (see attm) but I shoudn't be allowed to do that. 
After restarting Hob, I receive an error(see attm).

This error is thrown by bitbake because without meta-yocto layer, the LAYER_CONF_VERSION will be taken from meta where it is set to a lower version (LAYER_CONF_VERSION ?= "5").
Comment 1 Ioana Grigoropol 2012-09-26 13:41:12 UTC
Created attachment 848 [details]
Error message
Comment 2 Paul Eggleton 2012-10-02 16:45:13 UTC
This is a result of us having to bump LAYER_CONF_VERSION from 5 to 6 in meta-yocto because of the meta-yocto-bsp split, but in OE-Core (which is what you have left when you remove meta-yocto) LAYER_CONF_VERSION is still at 5 as it was not affected by this change; thus if you remove meta-yocto you get the lower version which no longer matches LCONF_VERSION in your bblayers.conf.

Unfortunately we had no choice but to bump LAYER_CONF_VERSION in meta-yocto. The only quick way to fix it would be either to bump LAYER_CONF_VERSION in OE-Core or ignore the version going backwards from 6 to 5 in sanity.bbclass and skip 6 the next time we bump it in OE-Core; unfortunately in either case we would need to make changes in OE-Core and there's not much of a justification to make a change there as it only really affects Poky.
Comment 3 Paul Eggleton 2012-10-03 15:32:31 UTC
Just to be clear for anyone reading this, this bug does not only affect Hob - it will also happen if you have had meta-yocto in your bblayers.conf and then you later remove it and run bitbake from the command line. The workaround in all cases for the moment is to set LCONF_VERSION back to 5 in bblayers.conf.
Comment 4 Scott Rifenbark 2012-10-03 15:42:35 UTC
I have added a note to the "Enabling Your Layer" section in the YP Development Manual that describes the consequences of removing the meta-yocto layer.  The note references this bug.  See http://www.yoctoproject.org/docs/1.3/dev-manual/dev-manual.html#enabling-your-layer for the section.

Scott
Comment 5 Richard Purdie 2012-10-04 15:03:24 UTC
I think I'm leaning towards setting a variable in bblayers.conf which lists layers which cannot be removed. The UI would then enforice this and our bblayers.conf file would list meta-yocto and hence resolve this issue.
Comment 6 T OCallaghan 2012-10-06 23:15:26 UTC
Attempted to switch to 1.3_M5 to test the self hosting build. 

Made no changes to conf, all that was done was to switch branches from denzil to 1.3_M5 in poky and meta-intel. 

The problem is that the bblayer.conf.sample has LCONF_VERSION=6, but for the build to run it requires bblayer.conf to have LCONF_VERSION=5
Comment 7 Belen Barros Pena 2012-10-09 16:24:49 UTC
Created attachment 883 [details]
distro-not-set.png

I would be quite happy with Richard's solution.

If we decide this is not acceptable, we need to keep in mind that removing this layer impacts the selected distro, and consider telling the user so. 

Removing meta-yocto seems to set the distro to 'Default', but it's not doing it properly. Initially, the distro combo box shows up blank and 'Default' only appears when you click on the 'Distro' combo box (check attached screenshot distro-not-set.png).
Comment 8 Cristiana Voicu 2012-11-27 13:40:04 UTC
merged to master
Comment 9 Andreea Brandusa Proca 2012-12-06 10:27:37 UTC
Verified in commit: 381c4b69c7e8b452f4d3de2f8214e6e5f6a9abe7.