diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2017-06-05 17:06:42 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-09 17:12:14 +0100 |
commit | 24b7e71350316d81e0f7eb5c11e2d5014adfd50f (patch) | |
tree | e25d2c75d334135ec1479f7120c353d9ce7cc012 /scripts | |
parent | dd3473c7e679bb4bab7bf82f1b9fae910039a343 (diff) | |
download | poky-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-x | scripts/yocto-compat-layer-wrapper | 18 |
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 |
14 | fi | 14 | fi |
15 | 15 | ||
16 | # since we are using a temp directory, use the realpath for output | ||
17 | # log option | ||
18 | output_log='' | ||
19 | while getopts o: name | ||
20 | do | ||
21 | case $name in | ||
22 | o) output_log=$(realpath "$OPTARG") | ||
23 | esac | ||
24 | done | ||
25 | shift $(($OPTIND - 1)) | ||
26 | |||
27 | # generate a temp directory to run compat layer script | ||
16 | base_dir=$(realpath $BUILDDIR/../) | 28 | base_dir=$(realpath $BUILDDIR/../) |
17 | cd $base_dir | 29 | cd $base_dir |
18 | 30 | ||
19 | build_dir=$(mktemp -p $base_dir -d -t build-XXXX) | 31 | build_dir=$(mktemp -p $base_dir -d -t build-XXXX) |
20 | 32 | ||
21 | source oe-init-build-env $build_dir | 33 | source oe-init-build-env $build_dir |
22 | yocto-compat-layer.py "$@" | 34 | if [[ $output_log != '' ]]; then |
35 | yocto-compat-layer.py -o "$output_log" "$*" | ||
36 | else | ||
37 | yocto-compat-layer.py "$@" | ||
38 | fi | ||
23 | retcode=$? | 39 | retcode=$? |
24 | 40 | ||
25 | rm -rf $build_dir | 41 | rm -rf $build_dir |