From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Cc: saul.wold@intel.com
Subject: [PATCHv2 2/2] scripts: Add yocto-compat-layer-wrapper
Date: Thu, 30 Mar 2017 14:01:14 -0600 [thread overview]
Message-ID: <1490904074-5530-2-git-send-email-anibal.limon@linux.intel.com> (raw)
In-Reply-To: <1490904074-5530-1-git-send-email-anibal.limon@linux.intel.com>
This script will be used to create it's own build directory to make
runs of yocto-compat-layer.py againts layers isolated.
Example:
$ source oe-init-build-env
$ yocto-compat-layer-wrapper LAYER_DIR LAYER_DIR_N
[YOCTO #11164]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
scripts/yocto-compat-layer-wrapper | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100755 scripts/yocto-compat-layer-wrapper
diff --git a/scripts/yocto-compat-layer-wrapper b/scripts/yocto-compat-layer-wrapper
new file mode 100755
index 0000000..db4b687
--- /dev/null
+++ b/scripts/yocto-compat-layer-wrapper
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+# Yocto Project compatibility layer tool wrapper
+#
+# Creates a temprary build directory to run Yocto Project Compatible
+# script to avoid a contaminated environment.
+#
+# Copyright (C) 2017 Intel Corporation
+# Released under the MIT license (see COPYING.MIT)
+
+if [ -z "$BUILDDIR" ]; then
+ echo "Please source oe-init-build-env before run this script."
+ exit 2
+fi
+
+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 "$@"
+retcode=$?
+
+rm -rf $build_dir
+
+exit $retcode
--
2.1.4
prev parent reply other threads:[~2017-03-30 19:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-30 20:01 [PATCHv2 1/2] scripts/lib/compatlayer: detect_layers always use realpath's Aníbal Limón
2017-03-30 20:01 ` Aníbal Limón [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1490904074-5530-2-git-send-email-anibal.limon@linux.intel.com \
--to=anibal.limon@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=saul.wold@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox