commit:     d3264b37b65a81045cd7a0d0daf5b52f1af1c335
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 31 01:04:15 2014 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Oct 31 01:04:15 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=d3264b37

emerge-wrapper: improve warning messages

The current output isn't clear as to what is wrong.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 wrappers/emerge-wrapper | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index 154d82e..9ba46b4 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -21,11 +21,13 @@ err() { echo "emerge-wrapper: $*" 1>&2; exit 1; }
 
 emit_setup_warning()
 {
-       ${setup_warning:-false} && return 0
-       setup_warning=true
-       echo "!!! WARNING - Cannot auto-configure CHOST ${CHOST}"
-       echo "!!! You should edit ${conf}"
-       echo "!!! by hand to complete your configuration"
+       if ! ${setup_warning} ; then
+               setup_warning=true
+               echo "!!! WARNING - Cannot auto-configure CHOST ${CHOST};"
+               echo "!!! You should edit ${conf}"
+               echo "!!! by hand to complete your configuration."
+       fi
+       echo "!!!  $*"
 }
 
 cross_wrap_etc()
@@ -44,13 +46,13 @@ cross_wrap_etc()
                . "${MAIN_REPO_PATH}"/eclass/toolchain-funcs.eclass
                tc-arch
        )
-       [[ ${ARCH} == "unknown" ]] && emit_setup_warning
+       [[ ${ARCH} == "unknown" ]] && emit_setup_warning "No ARCH is known for 
this target."
 
        LIBC="__LIBC__"
        case ${CHOST} in
                *gnu*)    LIBC=glibc ;;
                *uclibc*) LIBC=uclibc ;;
-               *)        emit_setup_warning ;;
+               *)        emit_setup_warning "No LIBC is known for this 
target." ;;
        esac
 
        sed -i \

Reply via email to