diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-21 11:18:40 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-21 11:18:40 -0700 |
commit | 42cab46428e69cf7423053b10940a275c38c04ff (patch) | |
tree | 3d136311af222afb8d0d9bda838c1d5674b6cf4f /bin/misc-functions.sh | |
parent | 99832a79bff002a7494c4fb31701451c13a5a435 (diff) | |
download | portage-42cab46428e69cf7423053b10940a275c38c04ff.tar.gz portage-42cab46428e69cf7423053b10940a275c38c04ff.tar.bz2 portage-42cab46428e69cf7423053b10940a275c38c04ff.zip |
Bug #324191 - Add support for FEATURES=compress-build-logs. The causes
all build logs to be compressed while they are being written. Log file
names have an extension that is appropriate for the compression type.
Currently, only gzip(1) compression is supported, so build logs will
have a '.gz' extension when this feature is enabled.
Diffstat (limited to 'bin/misc-functions.sh')
-rwxr-xr-x | bin/misc-functions.sh | 8 |
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 |