diff options
author | 2014-10-30 21:04:15 -0400 | |
---|---|---|
committer | 2014-10-30 21:04:15 -0400 | |
commit | d3264b37b65a81045cd7a0d0daf5b52f1af1c335 (patch) | |
tree | 7a2bfaad46ca430311cdf003401331f022f61d4e | |
parent | cross-pkg-config: avoid bashism (diff) | |
download | crossdev-d3264b37b65a81045cd7a0d0daf5b52f1af1c335.tar.gz crossdev-d3264b37b65a81045cd7a0d0daf5b52f1af1c335.tar.bz2 crossdev-d3264b37b65a81045cd7a0d0daf5b52f1af1c335.zip |
emerge-wrapper: improve warning messages
The current output isn't clear as to what is wrong.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rwxr-xr-x | wrappers/emerge-wrapper | 16 |
1 files 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 \ |