summaryrefslogtreecommitdiffstats
path: root/bin/misc-functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/misc-functions.sh')
-rwxr-xr-xbin/misc-functions.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 3a199bdf7..123edc0ec 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -474,10 +474,12 @@ install_qa_check() {
)
abort="no"
i=0
+ local grep_cmd=grep
+ [[ $PORTAGE_LOG_FILE = *.gz ]] && grep_cmd=zgrep
while [[ -n ${msgs[${i}]} ]] ; do
m=${msgs[$((i++))]}
# force C locale to work around slow unicode locales #160234
- f=$(LC_ALL=C grep "${m}" "${PORTAGE_LOG_FILE}")
+ f=$(LC_ALL=C $grep_cmd "${m}" "${PORTAGE_LOG_FILE}")
if [[ -n ${f} ]] ; then
vecho -ne '\a\n'
eqawarn "QA Notice: Package has poor programming practices which may compile"
@@ -487,8 +489,10 @@ install_qa_check() {
abort="yes"
fi
done
+ local cat_cmd=cat
+ [[ $PORTAGE_LOG_FILE = *.gz ]] && cat_cmd=zcat
[[ $reset_debug = 1 ]] && set -x
- f=$(cat "${PORTAGE_LOG_FILE}" | \
+ f=$($cat_cmd "${PORTAGE_LOG_FILE}" | \
"${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH"/check-implicit-pointer-usage.py || die "check-implicit-pointer-usage.py failed")
if [[ -n ${f} ]] ; then