From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/2] scripts: use OE_TMPDIR instead of TMPDIR external variable
Date: Wed, 28 Sep 2011 12:39:40 +0100 [thread overview]
Message-ID: <84f26e49034f00a6df1eeb9d918de6bb7e8347fc.1317209028.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1317209028.git.paul.eggleton@linux.intel.com>
In-Reply-To: <cover.1317209028.git.paul.eggleton@linux.intel.com>
On OpenSUSE within an X session, TMPDIR is set to the system temporary
directory (/tmp) which is incorrect for these scripts. Thus, change
runqemu and oe-setup-rpmrepo to use OE_TMPDIR from the external
environment rather than TMPDIR.
Fixes [YOCTO #1530]
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
scripts/oe-setup-rpmrepo | 8 +++++++-
scripts/qemuimage-testlib | 4 ++--
scripts/runqemu | 7 ++++++-
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/scripts/oe-setup-rpmrepo b/scripts/oe-setup-rpmrepo
index 03372b6..fc2f7a8 100755
--- a/scripts/oe-setup-rpmrepo
+++ b/scripts/oe-setup-rpmrepo
@@ -17,9 +17,15 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Don't use TMPDIR from the external environment, it may be a distro
+# variable pointing to /tmp (e.g. within X on OpenSUSE)
+# Instead, use OE_TMPDIR for passing this in externally.
+TMPDIR="$OE_TMPDIR"
+
function usage() {
echo "Usage: $0 <rpm-dir>"
- echo " <rpm-dir>: default is $TPMDIR/deploy/rpm"
+ echo " <rpm-dir>: default is $TMPDIR/deploy/rpm"
}
if [ $# -gt 1 ]; then
diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib
index 9ffaa7c..6a1b900 100644
--- a/scripts/qemuimage-testlib
+++ b/scripts/qemuimage-testlib
@@ -467,8 +467,8 @@ Test_Create_Qemu()
export MACHINE=$QEMUARCH
# Create Qemu in localhost VNC Port 1
- echo "Running xterm -display ${DISPLAY} -e 'TMPDIR=${TMPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE} && /bin/sleep 60' &"
- xterm -display ${DISPLAY} -e "TMPDIR=${TMPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE} && /bin/sleep 60" &
+ echo "Running xterm -display ${DISPLAY} -e 'OE_TMPDIR=${OE_TMPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE} && /bin/sleep 60' &"
+ xterm -display ${DISPLAY} -e "OE_TMPDIR=${OE_TMPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE} && /bin/sleep 60" &
# Get the pid of the xterm processor, which will be used in Test_Kill_Qemu
PID=$!
diff --git a/scripts/runqemu b/scripts/runqemu
index 0f943b5..31e9822 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -55,6 +55,11 @@ SCRIPT_QEMU_OPT=""
SCRIPT_QEMU_EXTRA_OPT=""
SCRIPT_KERNEL_OPT=""
+# Don't use TMPDIR from the external environment, it may be a distro
+# variable pointing to /tmp (e.g. within X on OpenSUSE)
+# Instead, use OE_TMPDIR for passing this in externally.
+TMPDIR="$OE_TMPDIR"
+
# Determine whether the file is a kernel or QEMU image, and set the
# appropriate variables
process_filename() {
@@ -260,7 +265,7 @@ SPITZ_DEFAULT_FSTYPE=ext3
setup_tmpdir() {
if [ -z "$TMPDIR" ]; then
- # BUILDDIR unset, try and get TMPDIR from bitbake
+ # Try to get TMPDIR from bitbake
type -P bitbake &>/dev/null || {
echo "In order for this script to dynamically infer paths";
echo "to kernels or filesystem images, you either need";
--
1.7.4.1
next prev parent reply other threads:[~2011-09-28 11:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 11:39 [PATCH 0/2] Fix TMPDIR usage in scripts v2 Paul Eggleton
2011-09-28 11:39 ` Paul Eggleton [this message]
2011-09-28 11:39 ` [PATCH 2/2] scripts/oe-setup-rpmrepo: use setup_tmpdir from runqemu Paul Eggleton
2011-09-28 13:30 ` [PATCH 0/2] Fix TMPDIR usage in scripts v2 Paul Eggleton
-- strict thread matches above, loose matches on Subject: below --
2011-09-28 15:28 [PATCH 0/2] Fix TMPDIR usage in scripts v3 Paul Eggleton
2011-09-28 15:28 ` [PATCH 1/2] scripts: use OE_TMPDIR instead of TMPDIR external variable Paul Eggleton
2011-09-28 9:26 [PATCH 0/2] Fix TMPDIR usage in scripts Paul Eggleton
2011-09-28 9:26 ` [PATCH 1/2] scripts: use OE_TMPDIR instead of TMPDIR external variable Paul Eggleton
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=84f26e49034f00a6df1eeb9d918de6bb7e8347fc.1317209028.git.paul.eggleton@linux.intel.com \
--to=paul.eggleton@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/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