Bug 5448 - Hob changes to local.conf are too intrusive
Summary: Hob changes to local.conf are too intrusive
Status: VERIFIED FIXED
Alias: None
Product: Hob
Classification: Build System, Metadata & Runtime
Component: hob (show other bugs)
Version: 1.6
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.6
Assignee: Cristiana Voicu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-11-04 12:23 UTC by Belen Barros Pena
Modified: 2013-12-13 11:56 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Belen Barros Pena 2013-11-04 12:23:59 UTC
Hob should look at local.conf and touch only those variables you can set via its interface. 

As an example of the intrusive behaviour, Hob will currently comment out your 

INHERIT += 'buildhistory'

line without telling you anything about it, which confused the bejaysus out of us all for about a month. Hob should not touch such line, since you cannot enable/disable build history using Hob.
Comment 1 Paul Eggleton 2013-11-04 13:56:48 UTC
I think I can understand why this is happening now, but the problem is it simply isn't clear from a user perspective. I have to say I think Hob is being a bit too heavy-handed with its modifications to local.conf and this is one example; we need to find a less intrusive way to do what needs to be done.

Can we start with an examination of why Hob is modifying INHERIT?
Comment 2 Cristiana Voicu 2013-11-05 15:46:46 UTC
(In reply to comment #1)
> I think I can understand why this is happening now, but the problem is it
> simply isn't clear from a user perspective. I have to say I think Hob is
> being a bit too heavy-handed with its modifications to local.conf and this
> is one example; we need to find a less intrusive way to do what needs to be
> done.
> 
> Can we start with an examination of why Hob is modifying INHERIT?

When Hob makes an operation on variable, it comments all the other operations made previously on the specific variable. This is happening with INHERIT, too. 
During the build, Hob makes more the one change on INHERIT and in the end it looks like: 
#added by hob
INHERIT = " image_types poky-sanity package_rpm  buildstats image-mklibs image-prelink debian devshell sstate license sanity packageinfo image_types"

You will see this change in conf/.hob.conf. I agrred with Richard that INHERIT should not be placed in local.conf, so it is the only variable kept in another place, specific to hob. 

Also, I saw that now in toaster this seeting is done in another file, too. So I think that INHERIT, in general, should not placed in local.conf.
Comment 3 Paul Eggleton 2013-11-05 16:21:00 UTC
OK, I have a couple of concerns:

* The above is adding things to INHERIT that will already be added through other means even if you have commented out all INHERIT lines in local.conf (e.g. package_rpm, poky-sanity, image_types ...). This could be problematic.

* I'm still not clear as to why Hob needs to set this variable; the value you're setting it to does not appear to contain anything specific to Hob.
Comment 4 Cristiana Voicu 2013-11-06 08:04:09 UTC
(In reply to comment #3)
> OK, I have a couple of concerns:
> 
> * The above is adding things to INHERIT that will already be added through
> other means even if you have commented out all INHERIT lines in local.conf
> (e.g. package_rpm, poky-sanity, image_types ...). This could be problematic.
> 
> * I'm still not clear as to why Hob needs to set this variable; the value
> you're setting it to does not appear to contain anything specific to Hob.

I have investigated on this, and found that in fact Hob appends to INHERIT only packageinfo and image_types. The rest of them are appended by bitbake during the build. I think it needs image_types, in order to populate image_types in settings, and packageinfo to populate the packages list page.
Comment 5 Paul Eggleton 2013-11-06 10:16:28 UTC
OK, packageinfo I can perhaps understand. image_types shouldn't really be inherited globally though - it's meant to be inherited by images via image.bbclass and IMAGE_CLASSES. Off the top of my head I can't think of an alternative solution for getting the image types however.

Honestly I think a much safer way to deal with this would be for INHERIT to be handled as a special case instead of in the same way other variables are handled. It seems like we don't need to remove values from INHERIT, only to add them; so .hob.conf should just do INHERIT += "image_types packageinfo".
Comment 6 Cristiana Voicu 2013-11-06 11:12:32 UTC
(In reply to comment #5)
> OK, packageinfo I can perhaps understand. image_types shouldn't really be
> inherited globally though - it's meant to be inherited by images via
> image.bbclass and IMAGE_CLASSES. Off the top of my head I can't think of an
> alternative solution for getting the image types however.
> 
> Honestly I think a much safer way to deal with this would be for INHERIT to
> be handled as a special case instead of in the same way other variables are
> handled. It seems like we don't need to remove values from INHERIT, only to
> add them; so .hob.conf should just do INHERIT += "image_types packageinfo".

OK, I will treat it as a special case. We already have a command to append in a file, so this will be simple to resolve.
Thank you for advices!
Comment 8 Belen Barros Pena 2013-12-13 11:56:06 UTC
Verified in master:ba8506ee342a1a579ceb309f3f50285eaad84f25