Bug 9235 - oe-init-build-env: to receive an argument/variable for appending to local.conf
Summary: oe-init-build-env: to receive an argument/variable for appending to local.conf
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 2.2 M1
Assignee: Mariano Lopez
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-03-10 18:27 UTC by Benjamin Esquivel
Modified: 2016-06-09 21:19 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Esquivel 2016-03-10 18:27:42 UTC
This is a different request than what is implemented via the templates.

The proposal is to have an argument/environment variable to pass to the oe-init-build-env* script with a file to append to the local.conf. This gives you the possibility to either add or override current local.conf variables.

examples:

$ . ./oe-init-build-env builddir /path/to/append-file.conf
or
$ CONFAPPEND=/path/to/appends.conf . ./oe-init-build-env builddir
Comment 1 Richard Purdie 2016-03-30 10:26:34 UTC
I guess I'm wondering why we wouldn't just use the -R and -r options to bitbake which allow the appending or prepending of a configuration file?

oe-init-build-env is meant to be simple and I really would prefer not to complicate that script any further.

What is the problem we're trying to solve here?
Comment 2 Mariano Lopez 2016-03-30 21:57:04 UTC
The -R or -r bitbake options are good, but is a bit of a pain tospecify the file every time bitbake is run.

What we were thinking was when using oe-init-build-env script have an env var with the file name and append the file name to local.conf (at the time the build dir is created). The bitbake case would be to have the env var and bitbake could append the config, instead of using -r or -R.
Comment 3 Ed Bartosh 2016-03-31 11:42:04 UTC
Bitbake has a set environment variables which set values for command line options, e.g. BITBAKE_UI(-u), BBSERVER(--remote-server), BBTOKEN(--token) etc.

What do you think about adding two more env variables(BBREAD, BBPOSTREAD?) to set values for -r and -R ?
Comment 4 Benjamin Esquivel 2016-03-31 17:38:32 UTC
(In reply to comment #3)
> Bitbake has a set environment variables which set values for command line
> options, e.g. BITBAKE_UI(-u), BBSERVER(--remote-server), BBTOKEN(--token)
> etc.
> 
> What do you think about adding two more env variables(BBREAD, BBPOSTREAD?)
> to set values for -r and -R ?

I'd say that adding such environment variables for -r/-R should work fine for the intended purpose.

Richard?
Comment 5 Richard Purdie 2016-04-14 08:46:04 UTC
I guess we could do this if people would find it really useful, I'd prefer names like BBPRECONF and BBPOSTCONF though.
Comment 6 Ed Bartosh 2016-04-19 16:51:57 UTC
Fix has been sent for review: http://lists.openembedded.org/pipermail/bitbake-devel/2016-April/007349.html
Comment 7 Ed Bartosh 2016-05-06 10:24:17 UTC
The fix has been merged to master: https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=21b314d4d1e5b8fbeb4cc57006f0a110f0b3aa8f
Comment 8 Mariano Lopez 2016-06-07 20:34:24 UTC
The functionality is still missing; there is a typo in the var used. I sent a patch to correct that:

http://lists.openembedded.org/pipermail/bitbake-devel/2016-June/007549.html
Comment 9 Mariano Lopez 2016-06-09 21:19:48 UTC
This has been solved in commit: 

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=40e789d1fee7f0df2d23230fff38325119ad2935