aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@iot.bzh>2018-11-20 18:33:21 +0000
committerJosé Bollo <jose.bollo@iot.bzh>2018-11-22 14:01:34 +0000
commitf059765855313acf2fd1f011d833d8da09dcdb21 (patch)
tree615efd3963d820eb2707e4efb25613a70f5b879c
parent04bf517aac819a6ee4a9b3a14f32ee7dd9807bc2 (diff)
distro-build-manifest: don't use BB_ENV_EXTRAWHITE
To keep the workflow compliant with upstream Yocto projects, it's better to not use BB_ENV_EXTRAWHITE to pass variables to recipes. This commit updates aglsetup to generate the file agl-init-build-env as 'before' (=before the addition of distro-build-manifest) Bug-AGL: SPEC-720, SPEC-1741 Change-Id: I96df245e099c15a1d2425052c4d8cc64363042c8 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
-rwxr-xr-xscripts/.aglsetup_genconfig.bash16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/.aglsetup_genconfig.bash b/scripts/.aglsetup_genconfig.bash
index 1e6eb1ee8..e95605a65 100755
--- a/scripts/.aglsetup_genconfig.bash
+++ b/scripts/.aglsetup_genconfig.bash
@@ -302,6 +302,8 @@ BUILDDIR=$DEFAULT_BUILDDIR
SETUPSCRIPT=
FORCE=
RPMREVISION=
+SETUP_MANIFEST=aglsetup.manifest
+
while true; do
case "$1" in
-m|--machine) MACHINE=$2; shift 2;;
@@ -407,6 +409,12 @@ function genconfig() {
append_fragment $BUILDDIR/conf/local.conf $file
verbose " + $file"
done
+ # special fragment to call distro-manifest-generator.sh from
+ # meta-agl-profile-core/recipes-core/distro-build-manifest/distro-build-manifest.bb
+ append_fragment $BUILDDIR/conf/local.conf /dev/stdin "# generated by $(realpath $BASH_SOURCE)" <<-EOF
+ DISTRO_SETUP_MANIFEST = "$(realpath -Ls $BUILDDIR)/$SETUP_MANIFEST"
+ DISTRO_MANIFEST_GENERATOR = "$(dirname $(realpath $BASH_SOURCE))/distro-manifest-generator.sh"
+ EOF
FRAGMENTS_SETUP=$(sed 's/ /\n/g' <<<$FRAGMENTS_SETUP | sort)
debug "setup fragments: $FRAGMENTS_SETUP"
@@ -470,8 +478,6 @@ fi
####### step 2: generate aglsetup.manifest #######
-SETUP_MANIFEST=aglsetup.manifest
-
infon "Generating setup manifest: $BUILDDIR/$SETUP_MANIFEST ... "
for x in /etc/os-release /usr/lib/os-release; do
[[ -f $x ]] && . $x
@@ -518,12 +524,6 @@ fi
if [ -n "\$SSTATE_DIR" ]; then
BB_ENV_EXTRAWHITE="\$BB_ENV_EXTRAWHITE SSTATE_DIR"
fi
-
-# build manifest generator used in distro-build-manifest.bb
-BB_ENV_EXTRAWHITE="\$BB_ENV_EXTRAWHITE DISTRO_SETUP_MANIFEST DISTRO_MANIFEST_GENERATOR"
-export DISTRO_SETUP_MANIFEST=$(realpath -Ls $BUILDDIR)/$SETUP_MANIFEST
-export DISTRO_MANIFEST_GENERATOR=$(dirname $(realpath $BASH_SOURCE))/distro-manifest-generator.sh
-
export BB_ENV_EXTRAWHITE
unset TEMPLATECONF
EOF