image-buildinfo.bbclass: configurable location for build file
In a stateless image, /etc is not a good place for the "build" file. By definining the location with a variable it becomes possible to have the file created elsewhere on a per-image basis. The default is the same as before. (From OE-Core rev: 6750ea8160edccb156cb2ab68548adfc1c789895) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
898de507d3
commit
ff73130718
|
@ -12,6 +12,9 @@
|
||||||
# Desired variables to display
|
# Desired variables to display
|
||||||
IMAGE_BUILDINFO_VARS ?= "DISTRO DISTRO_VERSION"
|
IMAGE_BUILDINFO_VARS ?= "DISTRO DISTRO_VERSION"
|
||||||
|
|
||||||
|
# Desired location of the output file in the image.
|
||||||
|
IMAGE_BUILDINFO_FILE ??= "${sysconfdir}/build"
|
||||||
|
|
||||||
# From buildhistory.bbclass
|
# From buildhistory.bbclass
|
||||||
def image_buildinfo_outputvars(vars, listvars, d):
|
def image_buildinfo_outputvars(vars, listvars, d):
|
||||||
vars = vars.split()
|
vars = vars.split()
|
||||||
|
@ -61,7 +64,7 @@ def buildinfo_target(d):
|
||||||
|
|
||||||
# Write build information to target filesystem
|
# Write build information to target filesystem
|
||||||
python buildinfo () {
|
python buildinfo () {
|
||||||
with open(d.expand('${IMAGE_ROOTFS}${sysconfdir}/build'), 'w') as build:
|
with open(d.expand('${IMAGE_ROOTFS}${IMAGE_BUILDINFO_FILE}'), 'w') as build:
|
||||||
build.writelines((
|
build.writelines((
|
||||||
'''-----------------------
|
'''-----------------------
|
||||||
Build Configuration: |
|
Build Configuration: |
|
||||||
|
|
Loading…
Reference in New Issue