These functions are to be used for creating a log of QA violations in a
machine-readable format.

Stored in ${T]/qa.log, the log consists of one entry per line in the
following format: violation-tag data

For example:
deprecated-directory /usr/man
deprecated-directory /usr/info
world-writable /var/db/foo/bar
---
 bin/misc-functions.sh | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index cc652a9..78da589 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -162,6 +162,22 @@ prepcompress() {
        return 0
 }
 
+eqalog() {
+       local tag=$1 x
+       shift
+       for x in "$@" ; do
+               echo "${tag}" "${x}" >> "${T}"/qa.log
+       done
+}
+
+eqawarnlog() {
+       eqalog "$@"
+       shift
+       for x in "$@" ; do
+               eqawarn "  $x"
+       done
+}
+
 install_qa_check() {
        local f i qa_var x
        if ! ___eapi_has_prefix_variables; then
-- 
2.0.4


Reply via email to