Gentoo Archives: gentoo-portage-dev

From: Michael Palimaka <kensington@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Michael Palimaka <kensington@g.o>
Subject: [gentoo-portage-dev] [PATCH 1/3] bin/misc-functions.sh: Introduce eqalog and eqawarnlog functions.
Date: Sat, 25 Oct 2014 16:17:47
Message-Id: 1414253761-6310-1-git-send-email-kensington@gentoo.org
1 These functions are to be used for creating a log of QA violations in a
2 machine-readable format.
3
4 Stored in ${T]/qa.log, the log consists of one entry per line in the
5 following format: violation-tag data
6
7 For example:
8 deprecated-directory /usr/man
9 deprecated-directory /usr/info
10 world-writable /var/db/foo/bar
11 ---
12 bin/misc-functions.sh | 16 ++++++++++++++++
13 1 file changed, 16 insertions(+)
14
15 diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
16 index cc652a9..78da589 100755
17 --- a/bin/misc-functions.sh
18 +++ b/bin/misc-functions.sh
19 @@ -162,6 +162,22 @@ prepcompress() {
20 return 0
21 }
22
23 +eqalog() {
24 + local tag=$1 x
25 + shift
26 + for x in "$@" ; do
27 + echo "${tag}" "${x}" >> "${T}"/qa.log
28 + done
29 +}
30 +
31 +eqawarnlog() {
32 + eqalog "$@"
33 + shift
34 + for x in "$@" ; do
35 + eqawarn " $x"
36 + done
37 +}
38 +
39 install_qa_check() {
40 local f i qa_var x
41 if ! ___eapi_has_prefix_variables; then
42 --
43 2.0.4

Replies