summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-05-22 19:53:44 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-05-23 23:59:04 +0100
commitaa1d259decdfd73a49e0c49e88a8ec5675453266 (patch)
treeb377d276f6febf29c116b499c5f4bbc4030f8687 /eclass
parentapp-emulation/wine-staging: Drop old (diff)
downloadgentoo-aa1d259decdfd73a49e0c49e88a8ec5675453266.tar.gz
gentoo-aa1d259decdfd73a49e0c49e88a8ec5675453266.tar.bz2
gentoo-aa1d259decdfd73a49e0c49e88a8ec5675453266.zip
linux-info.eclass: avoid lexicographical compare on numbers, bug #705248
Originally found in bug #705240 as: ``` error=0 ... if [[ ${error} > 0 ]]; then ... ``` '>' are string comparisons. They are benign in this case, but let's be consistent and use integer comparison. Closes: https://bugs.gentoo.org/705248 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/linux-info.eclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 44eebcf52a92..405ef5571e1c 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -813,7 +813,7 @@ check_extra_config() {
linux_chkconfig_present ${config} || error=1
fi
- if [[ ${error} > 0 ]]; then
+ if [[ ${error} -gt 0 ]]; then
local report_func="eerror" local_error
local_error="ERROR_${config}"
local_error="${!local_error}"
@@ -848,14 +848,14 @@ check_extra_config() {
fi
done
- if [[ ${hard_errors_count} > 0 ]]; then
+ if [[ ${hard_errors_count} -gt 0 ]]; then
eerror "Please check to make sure these options are set correctly."
eerror "Failure to do so may cause unexpected problems."
eerror "Once you have satisfied these options, please try merging"
eerror "this package again."
export LINUX_CONFIG_EXISTS_DONE="${old_LINUX_CONFIG_EXISTS_DONE}"
die "Incorrect kernel configuration options"
- elif [[ ${soft_errors_count} > 0 ]]; then
+ elif [[ ${soft_errors_count} -gt 0 ]]; then
ewarn "Please check to make sure these options are set correctly."
ewarn "Failure to do so may cause unexpected problems."
else