]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts/yocto-compat-layer-wrapper: Use realpath of output_log
authorAníbal Limón <anibal.limon@linux.intel.com>
Mon, 5 Jun 2017 22:06:42 +0000 (17:06 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 9 Jun 2017 16:12:04 +0000 (17:12 +0100)
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 <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/yocto-compat-layer-wrapper

index db4b6871b81d012ede2eb61b67c6aeaf8a3c8465..b6baeb484eda21992fbbf1109c0677770e90edc3 100755 (executable)
@@ -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