Skip to content

Commit

Permalink
linux-info.eclass: fix error/warning messages with ~!SYMBOLS
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vapier committed Jan 17, 2016
1 parent 2475f3c commit e50fc80
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions eclass/linux-info.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit e50fc80

Please sign in to comment.