summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2017-06-05 17:06:42 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-09 17:12:14 +0100
commit24b7e71350316d81e0f7eb5c11e2d5014adfd50f (patch)
treee25d2c75d334135ec1479f7120c353d9ce7cc012 /scripts
parentdd3473c7e679bb4bab7bf82f1b9fae910039a343 (diff)
downloadpoky-24b7e71350316d81e0f7eb5c11e2d5014adfd50f.tar.gz
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] (From OE-Core rev: 0addd079966ece97abc2e0ba3e7d6434d23692aa) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/yocto-compat-layer-wrapper18
1 files changed, 17 insertions, 1 deletions
diff --git a/scripts/yocto-compat-layer-wrapper b/scripts/yocto-compat-layer-wrapper
index db4b6871b8..b6baeb484e 100755
--- a/scripts/yocto-compat-layer-wrapper
+++ b/scripts/yocto-compat-layer-wrapper
@@ -13,13 +13,29 @@ if [ -z "$BUILDDIR" ]; then
13 exit 2 13 exit 2
14fi 14fi
15 15
16# since we are using a temp directory, use the realpath for output
17# log option
18output_log=''
19while getopts o: name
20do
21 case $name in
22 o) output_log=$(realpath "$OPTARG")
23 esac
24done
25shift $(($OPTIND - 1))
26
27# generate a temp directory to run compat layer script
16base_dir=$(realpath $BUILDDIR/../) 28base_dir=$(realpath $BUILDDIR/../)
17cd $base_dir 29cd $base_dir
18 30
19build_dir=$(mktemp -p $base_dir -d -t build-XXXX) 31build_dir=$(mktemp -p $base_dir -d -t build-XXXX)
20 32
21source oe-init-build-env $build_dir 33source oe-init-build-env $build_dir
22yocto-compat-layer.py "$@" 34if [[ $output_log != '' ]]; then
35 yocto-compat-layer.py -o "$output_log" "$*"
36else
37 yocto-compat-layer.py "$@"
38fi
23retcode=$? 39retcode=$?
24 40
25rm -rf $build_dir 41rm -rf $build_dir