Skip to contentSkip to conversation

configure: Send error message from spice check to /dev/null

PATCH Superseded Stefan Weil 3 participants 5 messages Oct 7, 2010 – Oct 9, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Send error message from spice check to /dev/null

pkg-config is not always available (e.g. on win32 hosts), but we don't want to see the 'command not found' error message.

Redirect stdout and stderr to /dev/null.

---
 configure |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
configure +7 -1
index e67d076..2d06d87 100755
@@ -21,6 +21,9 @@ trap "rm -f $TMPC $TMPO $TMPE" EXIT INT QUIT TERM
 rm -f config.log
 
 compile_object() {
+  echo >>config.log
+  cat $TMPC >>config.log
+  echo >>config.log
   echo $cc $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log
   $cc $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log 2>&1
 }
@@ -28,6 +31,9 @@ compile_object() {
 compile_prog() {
   local_cflags="$1"
   local_ldflags="$2"
+  echo >>config.log
+  cat $TMPC >>config.log
+  echo >>config.log
   echo $cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags >> config.log
   $cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags >> config.log 2>&1
 }
@@ -2089,7 +2095,7 @@ int main(void) { spice_server_new(); return 0; }
 EOF
   spice_cflags=$($pkgconfig --cflags spice-protocol spice-server 2>/dev/null)
   spice_libs=$($pkgconfig --libs spice-protocol spice-server 2>/dev/null)
-  if $pkgconfig --atleast-version=0.5.3 spice-server &&\
+  if $pkgconfig --atleast-version=0.5.3 spice-server >/dev/null 2>&1 && \
      compile_prog "$spice_cflags" "$spice_libs" ; then
     spice="yes"
     libs_softmmu="$libs_softmmu $spice_libs"
Signature · 1 line
1.7.1
#1 lore raw

Review

Quoted 7 lines · Stefan Weil

pkg-config is not always available (e.g. on win32 hosts), but we don't want to see the 'command not found' error message.

  compile_object() {
(quoted diff) +3 -0
+  echo>>config.log
+  cat $TMPC>>config.log
+  echo>>config.log

This looks unrelated.

configure compile_object() { · line 36

Quoted 7 lines
configure +3 -0
@@ -28,6 +31,9 @@ compile_object() {
  compile_prog() {
    local_cflags="$1"
    local_ldflags="$2"
+  echo>>config.log
+  cat $TMPC>>config.log
+  echo>>config.log

This too.

configure int main(void) { spice_server_new(); return 0; }

Quoted 4 lines
configure +1 -1
    spice_cflags=$($pkgconfig --cflags spice-protocol spice-server 2>/dev/null)
    spice_libs=$($pkgconfig --libs spice-protocol spice-server 2>/dev/null)
-  if $pkgconfig --atleast-version=0.5.3 spice-server&&\
+  if $pkgconfig --atleast-version=0.5.3 spice-server>/dev/null 2>&1&&  \

Fine with me, the other pkgconfig calls are covered already, the third missing is just an oversight and the fix is ObliviouslyCorrect[tm].

cheers,
Gerd

#2 lore raw

Am 07.10.2010 21:05, schrieb Gerd Hoffmann:

Quoted 10 lines · Stefan Weil

Review

Quoted 7 lines

pkg-config is not always available (e.g. on win32 hosts), but we don't want to see the 'command not found' error message.

  compile_object() {
(quoted diff) +3 -0
+  echo>>config.log
+  cat $TMPC>>config.log
+  echo>>config.log

This looks unrelated.

Ups, that was the wrong patch (some test code).
Sorry - I'll fix that immediately.

Thanks for your feedback.

Quoted 25 lines

configure compile_object() { · line 36

Quoted 8 lines
configure +3 -0
@@ -28,6 +31,9 @@ compile_object() {
  compile_prog() {
    local_cflags="$1"
    local_ldflags="$2"
+  echo>>config.log
+  cat $TMPC>>config.log
+  echo>>config.log

This too.

Quoted 7 lines
(quoted diff) +0 -0
    spice_cflags=$($pkgconfig --cflags spice-protocol spice-server 
 2>/dev/null)
    spice_libs=$($pkgconfig --libs spice-protocol spice-server 

2>/dev/null)

(quoted diff) +1 -1
-  if $pkgconfig --atleast-version=0.5.3 spice-server&&\
+  if $pkgconfig --atleast-version=0.5.3 spice-server>/dev/null 

2>&1&& \

Fine with me, the other pkgconfig calls are covered already, the third missing is just an oversight and the fix is ObliviouslyCorrect[tm].

cheers,
Gerd

#3 lore raw

PATCH v2 1/1 configure: Send error message from spice check to /dev/null

In reply to Gerd Hoffmann

pkg-config is not always available (e.g. on win32 hosts), but we don't want to see the 'command not found' error message.

Redirect stdout and stderr to /dev/null.

v2:

* Removed changes which should not have been here.

---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
configure +1 -1
index e67d076..cc19d82 100755
@@ -2089,7 +2089,7 @@ int main(void) { spice_server_new(); return 0; }
 EOF
   spice_cflags=$($pkgconfig --cflags spice-protocol spice-server 2>/dev/null)
   spice_libs=$($pkgconfig --libs spice-protocol spice-server 2>/dev/null)
-  if $pkgconfig --atleast-version=0.5.3 spice-server &&\
+  if $pkgconfig --atleast-version=0.5.3 spice-server >/dev/null 2>&1 && \
      compile_prog "$spice_cflags" "$spice_libs" ; then
     spice="yes"
     libs_softmmu="$libs_softmmu $spice_libs"
Signature · 1 line
1.7.1
Applied
#4 lore raw

Thanks, applied.

Quoted 33 lines · Stefan Weil

pkg-config is not always available (e.g. on win32 hosts), but we don't want to see the 'command not found' error message.

Redirect stdout and stderr to /dev/null.

v2:

* Removed changes which should not have been here.

---
 configure |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
configure +0 -0
index e67d076..cc19d82 100755
@@ -2089,7 +2089,7 @@ int main(void) { spice_server_new(); return 0; }

 EOF
  spice_cflags=$($pkgconfig --cflags spice-protocol spice-server 2>/dev/null) spice_libs=$($pkgconfig --libs spice-protocol spice-server 2>/dev/null)
-  if $pkgconfig --atleast-version=0.5.3 spice-server &&\
+  if $pkgconfig --atleast-version=0.5.3 spice-server >/dev/null 2>&1 && \
     compile_prog "$spice_cflags" "$spice_libs" ; then spice="yes"
    libs_softmmu="$libs_softmmu $spice_libs"
--
1.7.1