From: Aníbal Limón Date: Mon, 5 Jun 2017 22:06:42 +0000 (-0500) Subject: scripts/yocto-compat-layer-wrapper: Use realpath of output_log X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~21175 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0addd079966ece97abc2e0ba3e7d6434d23692aa;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git scripts/yocto-compat-layer-wrapper: Use realpath of output_log We are using a temp directory, use the realpath for output log to store the results in the original BUILDDIR. [YOCTO #11571] Signed-off-by: Aníbal Limón Signed-off-by: Ross Burton --- diff --git a/scripts/yocto-compat-layer-wrapper b/scripts/yocto-compat-layer-wrapper index db4b6871b81..b6baeb484ed 100755 --- a/scripts/yocto-compat-layer-wrapper +++ b/scripts/yocto-compat-layer-wrapper @@ -13,13 +13,29 @@ if [ -z "$BUILDDIR" ]; then exit 2 fi +# since we are using a temp directory, use the realpath for output +# log option +output_log='' +while getopts o: name +do + case $name in + o) output_log=$(realpath "$OPTARG") + esac +done +shift $(($OPTIND - 1)) + +# generate a temp directory to run compat layer script base_dir=$(realpath $BUILDDIR/../) cd $base_dir build_dir=$(mktemp -p $base_dir -d -t build-XXXX) source oe-init-build-env $build_dir -yocto-compat-layer.py "$@" +if [[ $output_log != '' ]]; then + yocto-compat-layer.py -o "$output_log" "$*" +else + yocto-compat-layer.py "$@" +fi retcode=$? rm -rf $build_dir