qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dinah Baum <dinahbaum123@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Dinah Baum" <dinahbaum123@gmail.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>
Subject: [PATCH 1/2] configure: Add 'mkdir build' check
Date: Wed,  8 Feb 2023 18:31:10 -0500	[thread overview]
Message-ID: <20230208233111.398577-2-dinahbaum123@gmail.com> (raw)
In-Reply-To: <20230208233111.398577-1-dinahbaum123@gmail.com>

QEMU configure script goes into an infinite error printing loop
when in read only directory due to 'build' dir never being created.

Checking if 'mkdir dir' succeeds prevents this error.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/321
---
 configure | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 64960c6000..3b384914ce 100755
--- a/configure
+++ b/configure
@@ -31,10 +31,11 @@ then
         fi
     fi
 
-    mkdir build
-    touch $MARKER
+    if mkdir build
+    then
+        touch $MARKER
 
-    cat > GNUmakefile <<'EOF'
+        cat > GNUmakefile <<'EOF'
 # This file is auto-generated by configure to support in-source tree
 # 'make' command invocation
 
@@ -56,8 +57,12 @@ force: ;
 GNUmakefile: ;
 
 EOF
-    cd build
-    exec "$source_path/configure" "$@"
+        cd build
+        exec "$source_path/configure" "$@"
+    else
+        echo "ERROR: Unable to use ./build dir, try using a ../qemu/configure build"
+        exit 1
+    fi
 fi
 
 # Temporary directory used for files created while
-- 
2.30.2



  reply	other threads:[~2023-02-08 23:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 23:31 [PATCH 0/2] *** configure: Add 'mkdir build' check *** Dinah Baum
2023-02-08 23:31 ` Dinah Baum [this message]
2023-02-16  5:48   ` [PATCH 1/2] configure: Add 'mkdir build' check Dinah B
2023-02-16 14:21   ` Peter Maydell
2023-02-08 23:31 ` [PATCH 2/2] configure: './configure --help' should work Dinah Baum
2023-02-16 14:06 ` [PATCH 0/2] *** configure: Add 'mkdir build' check *** Peter Maydell

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=20230208233111.398577-2-dinahbaum123@gmail.com \
    --to=dinahbaum123@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.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;
as well as URLs for NNTP newsgroup(s).