Bug 9278 - Old conf/templateconf.cfg in existing build directory prevents shoing common targets list
Summary: Old conf/templateconf.cfg in existing build directory prevents shoing common ...
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium+ minor
Target Milestone: 2.1 M4
Assignee: Bill Randle
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-03-16 21:23 UTC by Paul Eggleton
Modified: 2016-04-01 17:26 UTC (History)
2 users (show)

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


Attachments
RFC proposed patch (3.19 KB, patch)
2016-03-21 17:47 UTC, Bill Randle
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2016-03-16 21:23:07 UTC
If I run . ./oe-init-build-env in my poky checkout, I find that as of the meta-yocto -> meta-poky rename I no longer see any of the "common targets" printed. Digging a little, the issue is that my existing build directory has a conf/templateconf.cfg which still points to meta-yocto/conf; if I edit that and change it to contain meta-poky/conf then the next time I source oe-init-build-env it prints the common targets list as expected.
Comment 1 Bill Randle 2016-03-21 17:47:21 UTC
Created attachment 3050 [details]
RFC proposed patch

I have come up with three different ways this problem can be solved. The first two involve changes to oe-core, the third one has changes to met-poky only. The first two options are a simpler implementation, but the disadvantage is it adds (more) Yocto specific code to oe-core files, which is not desirable. I will mention them briefly here anyway for historical interest.

Option A is simply an added check in the scripts/oe-setup-builddir script to check for meta-yocto/conf in conf/templateconf.cfg and delete the file so it is automatically recreated with the correct meta-poky/conf path.

Option B is to add some additional code to oecore_update_bblayers() in meta/classes/sanity.bbclass. There is already special case code in this function to check for the meta-yocto -> meta-poky change and edit an existing conf/bblayers.conf file. This option would add the templateconf file check and update to this existing Yocto specific code block.

The proposed solution (option C) adds the templateconf check in the poky_update_bblayersconf() function in meta-poky/classes/poky-sanity.bbclass. The REQUIRED_POKY_BBLAYERS_CONF_VERSION variable is incremented to force the function to be called, which will then check the templateconf.cfg file and update if necessary.
Comment 2 Bill Randle 2016-03-21 18:27:01 UTC
Proposed patch sent to Yocto mailing list.
Comment 3 Bill Randle 2016-04-01 17:26:27 UTC
Fix (based on Option C) merged to master and verified by Richard Purdie.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta-poky?id=54eca753082af7d4c44379f879945f449d4f56cf