diff options
| author | Patrick Ohly <patrick.ohly@intel.com> | 2017-03-20 13:26:18 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-22 11:35:21 +0000 |
| commit | ff731307188d7f6af2bd7490a841dba4d81c53e0 (patch) | |
| tree | e0d155f7dfdb7327af9f07a9dcb7a56a06620482 | |
| parent | 898de507d38c84a6f731abce554bcb4b384e4346 (diff) | |
| download | poky-ff731307188d7f6af2bd7490a841dba4d81c53e0.tar.gz | |
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>
| -rw-r--r-- | meta/classes/image-buildinfo.bbclass | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/image-buildinfo.bbclass b/meta/classes/image-buildinfo.bbclass index 85626f0a68..213fb9cf9b 100644 --- a/meta/classes/image-buildinfo.bbclass +++ b/meta/classes/image-buildinfo.bbclass | |||
| @@ -12,6 +12,9 @@ | |||
| 12 | # Desired variables to display | 12 | # Desired variables to display |
| 13 | IMAGE_BUILDINFO_VARS ?= "DISTRO DISTRO_VERSION" | 13 | IMAGE_BUILDINFO_VARS ?= "DISTRO DISTRO_VERSION" |
| 14 | 14 | ||
| 15 | # Desired location of the output file in the image. | ||
| 16 | IMAGE_BUILDINFO_FILE ??= "${sysconfdir}/build" | ||
| 17 | |||
| 15 | # From buildhistory.bbclass | 18 | # From buildhistory.bbclass |
| 16 | def image_buildinfo_outputvars(vars, listvars, d): | 19 | def image_buildinfo_outputvars(vars, listvars, d): |
| 17 | vars = vars.split() | 20 | vars = vars.split() |
| @@ -61,7 +64,7 @@ def buildinfo_target(d): | |||
| 61 | 64 | ||
| 62 | # Write build information to target filesystem | 65 | # Write build information to target filesystem |
| 63 | python buildinfo () { | 66 | python buildinfo () { |
| 64 | with open(d.expand('${IMAGE_ROOTFS}${sysconfdir}/build'), 'w') as build: | 67 | with open(d.expand('${IMAGE_ROOTFS}${IMAGE_BUILDINFO_FILE}'), 'w') as build: |
| 65 | build.writelines(( | 68 | build.writelines(( |
| 66 | '''----------------------- | 69 | '''----------------------- |
| 67 | Build Configuration: | | 70 | Build Configuration: | |
