aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/distro-manifest-generator.sh
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@iot.bzh>2019-07-16 17:23:50 +0000
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-07-23 15:31:19 +0000
commit1040e324b6b77c20f45493f2d6cfe6a163f9dbf7 (patch)
tree47be11d09e1eec349f6126216f5da14394311a9f /scripts/distro-manifest-generator.sh
parentf2e6e87245e6c53c176fa1e2a16fbe59bd776112 (diff)
aglsetup: add -t|--topic and -V|--version options
New options are: * -t|--topic : add a 'topic' to current setup (default: empty) * -V|--version : display aglsetup version The topic value can be any string and it is propagated to aglsetup.manifest, which in turn is used by distro-build-manifest to put it in DIST_BUILD_TOPIC variable in all build manifests (deploy dir, target image, sdk) Using the --topic option to specify a unique identifier will help to provide a common ID for all builds in the same "family" even if features and layers differ. For this purpose, a topic could be: * a gerrit review id + a patchset number * a project name (git repo) + a Change-Id * a random UUID * ... When run with -V or --version, aglsetup writes its version on stdout and sets the variable AGLSETUP_VERSION then exits. As aglsetup can only be called by being sourced, the AGLSETUP_VERSION variable is finally set in the caller environment. The version can be used for various purposes. The immediate goal is to detect if --topic option is supported or not. Bug-AGL: SPEC-2646 Cherry-picked-from: master (8cbd61a838bfa3f46f66b5641c27c0492ceba2d8) Change-Id: I28184f6b922bac23cc0cdb6892acd36783d18f06 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'scripts/distro-manifest-generator.sh')
-rwxr-xr-xscripts/distro-manifest-generator.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/distro-manifest-generator.sh b/scripts/distro-manifest-generator.sh
index c019c8374..05070a606 100755
--- a/scripts/distro-manifest-generator.sh
+++ b/scripts/distro-manifest-generator.sh
@@ -194,6 +194,9 @@ function _getgitmanifest() {
# Manifest build timestamp
DIST_BUILD_TS="$timestamp"
+ # build topic from setup topic
+ DIST_BUILD_TOPIC="${DIST_SETUP_TOPIC}"
+
# what to retain from setup manifest?
# to generate the full list: cat setup.manifest | grep = | cut -f1 -d"=" | awk '{printf("%s ",$1);}'
declare -A SETUP_VARS
@@ -203,9 +206,9 @@ function _getgitmanifest() {
# extra vars not coming from setup.manifest but generated here
declare -A EXTRA_VARS
- EXTRA_VARS[deploy]="DIST_SETUP_MANIFEST DIST_BUILD_TS DIST_LAYERS DIST_LAYERS_MD5 DIST_BUILD_HASH DIST_BUILD_ID"
- EXTRA_VARS[target]="DIST_LAYERS DIST_BUILD_HASH DIST_BUILD_ID DIST_BUILD_TS"
- EXTRA_VARS[sdk]="DIST_LAYERS DIST_BUILD_HASH DIST_BUILD_ID DIST_BUILD_TS"
+ EXTRA_VARS[deploy]="DIST_SETUP_MANIFEST DIST_BUILD_TS DIST_LAYERS DIST_LAYERS_MD5 DIST_BUILD_HASH DIST_BUILD_ID DIST_BUILD_TOPIC"
+ EXTRA_VARS[target]="DIST_LAYERS DIST_BUILD_HASH DIST_BUILD_ID DIST_BUILD_TS DIST_BUILD_TOPIC"
+ EXTRA_VARS[sdk]="DIST_LAYERS DIST_BUILD_HASH DIST_BUILD_ID DIST_BUILD_TS DIST_BUILD_TOPIC"
# BITBAKE_VARS may be defined from external file to source (--source arg)
# this is used to dump extra vars from inside bitbake recipe