Bug 1281 - packages not reload correctly when changing Machine type
Summary: packages not reload correctly when changing Machine type
Status: RESOLVED FIXED
Alias: None
Product: Hob
Classification: Build System, Metadata & Runtime
Component: hob (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.1
Assignee: Joshua Lock - Disabled
QA Contact:
URL:
Whiteboard:
Depends on: 1249
Blocks:
  Show dependency tree
 
Reported: 2011-07-24 05:32 UTC by Jiajun Xu
Modified: 2011-09-06 08:07 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiajun Xu 2011-07-24 05:32:52 UTC
Tree/Branch: 1.1_M2
Commit: a62982ffb6b35acc70bb30a429fc854cf9a8873f

With 1.1 M2 branch, by default in local.conf, qemux86 is choosen and if we launch hob, qemux86 is also loaded by default. For core-image-sato against qemux86, there are 285 packages. If we change machine type to others, for example, routerstationpro and choose core-image-sato for "base image" also, the number is same with qemux86.
But actually, if we close the hob and re-launch hob, the number of core-image-sato against routerstationpro will be loaded correctly, 256.

So each time when we change a machine, we need to restart hob to get the corret package list.
Comment 1 Jessica 2011-07-24 19:24:20 UTC
I tried with latest master, for qemux86 and routerstationpro will always be 277 even after I restarted hob
Comment 3 Jiajun Xu 2011-08-02 01:51:01 UTC
I find with commit 46cf540e63a848512617b20fd8492f81bfb2f704, the issue still exists. So reopen the bug now.
Comment 4 Joshua Lock - Disabled 2011-08-05 15:18:41 UTC
After some investigation it looks like the reparse is correct and the correct data is available but the way the previous selections are reloaded after changing machines is buggy.
Comment 5 Joshua Lock - Disabled 2011-08-05 18:03:11 UTC
Or perhaps not, maybe the reparse isn't working correctly - work here is ongoing...
Comment 6 Joshua Lock - Disabled 2011-08-10 16:55:30 UTC
I've root caused this at last. The problem is that we store the customisations from the UI in a post-file, that is; a configuration file which is parsed *after* all of the standard configuration files.

bitbake.conf includes the conf/machine/${MACHINE}.conf file before the post file is parsed and therefore there's a critical mismatch between which MACHINE is set in the GUI and which files are loaded.

The simplest solution is to switch to a prefile, parsed before bitbake.conf, to store the UI's settings. This may have other repercussions, however.
Comment 7 Joshua Lock - Disabled 2011-09-01 15:38:51 UTC
Long term we need to look at adding user-wide configuration and intercepting the data store initialisation to set configuration values, however this is an invasive change so for now is deferred for future work in bug 1441.

Short term we need to switch to using a pre and post configuration file in tandem and add some less generic code to lib/bb/ui/crumbs/configurator.py to store the right variables in the right files.