commit: 6f206114aa3b978fc7206cd2d329114db461ea55
Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 28 17:39:22 2014 +0000
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Thu Aug 28 17:39:22 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=6f206114
check ${T}"/logging/* existence before grepping
sometimes there are no files in ${T}"/logging/ and grep makes an ugly
error. check for files there before grepping. Fix check to remove
portageqa, it seem the opposite of test -s ( file exists and has size
greater than zero ) matched when the file doesn't exist... well, that is
the opposite after all.
---
tinderbox/bashrc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tinderbox/bashrc b/tinderbox/bashrc
index 8533e2b..6d21868 100644
--- a/tinderbox/bashrc
+++ b/tinderbox/bashrc
@@ -108,9 +108,11 @@ tinderbox_postinst_checks() {
SANDBOX_ON=0 cp "${T}"/testsfailed "${BUILD_DATA_DIR}" 2> /dev/null
SANDBOX_ON=0 find "${T}" -name "tinderbox-*.log" -not -empty -execdir
mv '{}' "${BUILD_DATA_DIR}" \;
- SANDBOX_ON=0 grep --no-filename QA "${T}"/logging/* >
"${BUILD_DATA_DIR}"/portageqa
+ if [ ls "${T}"/logging/* > /dev/null 2>&1 ] ; then
+ SANDBOX_ON=0 grep --no-filename QA "${T}"/logging/* >
"${BUILD_DATA_DIR}"/portageqa
+ fi
- if [[ ! -s "${BUILD_DATA_DIR}"/portageqa ]] ; then
+ if [[ ! -s "${BUILD_DATA_DIR}"/portageqa ]] && [ -f
"${BUILD_DATA_DIR}"/portageqa ] ; then
SANDBOX_ON=0 rm "${BUILD_DATA_DIR}"/portageqa
fi