diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-01-17 04:42:23 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-01-17 04:43:47 -0500 |
commit | e50fc80a8c1633b37f7c25242f0f01e2683111f6 (patch) | |
tree | 5a2d7c1be0e1d8895cb95f0d3795fa6a918afd89 /eclass/linux-info.eclass | |
parent | dev-ruby/rails: add ruby22 (diff) | |
download | gentoo-e50fc80a8c1633b37f7c25242f0f01e2683111f6.tar.gz gentoo-e50fc80a8c1633b37f7c25242f0f01e2683111f6.tar.bz2 gentoo-e50fc80a8c1633b37f7c25242f0f01e2683111f6.zip |
linux-info.eclass: fix error/warning messages with ~!SYMBOLS
For ebuilds that do things like ~!IDE, the current warning system would
drop the ~ but not the !. This would lead to doing variable expansion
like ${WARNING_!IDE} which is invalid shell code.
Diffstat (limited to 'eclass/linux-info.eclass')
-rw-r--r-- | eclass/linux-info.eclass | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index a913af29aead..25edb18a2e29 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -716,13 +716,15 @@ check_extra_config() { ewarn "to absence of any configured kernel sources or compiled" ewarn "config:" for config in ${CONFIG_CHECK}; do - local_error="ERROR_${config#\~}" + config=${config#\~} + config=${config#\!} + local_error="ERROR_${config}" msg="${!local_error}" - if [[ "x${msg}" == "x" ]]; then - local_error="WARNING_${config#\~}" + if [[ -z ${msg} ]]; then + local_error="WARNING_${config}" msg="${!local_error}" fi - ewarn " - ${config#\~}${msg:+ - }${msg}" + ewarn " - ${config}${msg:+ - }${msg}" done ewarn "You're on your own to make sure they are set if needed." export LINUX_CONFIG_EXISTS_DONE="${old_LINUX_CONFIG_EXISTS_DONE}" |