public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH 1/3] bin/misc-functions.sh: Introduce eqalog and eqawarnlog functions.
@ 2014-10-25 16:15 Michael Palimaka
  2014-10-25 16:16 ` [gentoo-portage-dev] [PATCH 2/3] install-qa-check.d/05double-D: Write to log and improve consistency Michael Palimaka
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Michael Palimaka @ 2014-10-25 16:15 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Michael Palimaka

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



^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2014-10-27 19:33 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-25 16:15 [gentoo-portage-dev] [PATCH 1/3] bin/misc-functions.sh: Introduce eqalog and eqawarnlog functions Michael Palimaka
2014-10-25 16:16 ` [gentoo-portage-dev] [PATCH 2/3] install-qa-check.d/05double-D: Write to log and improve consistency Michael Palimaka
2014-10-26 15:14   ` Michael Palimaka
2014-10-25 16:16 ` [gentoo-portage-dev] [PATCH 3/3] install-qa-check.d/90world-writable: Write log and general cleanup Michael Palimaka
2014-10-26 15:16   ` Michael Palimaka
2014-10-25 19:42 ` [gentoo-portage-dev] [PATCH 1/3] bin/misc-functions.sh: Introduce eqalog and eqawarnlog functions Zac Medico
2014-10-25 20:25   ` Michał Górny
2014-10-25 20:28     ` Zac Medico
2014-10-25 20:41       ` Michał Górny
2014-10-25 20:53         ` Zac Medico
2014-10-25 19:53 ` Zac Medico
2014-10-25 19:54   ` Zac Medico
2014-10-25 20:00     ` Zac Medico
2014-10-25 20:13       ` [gentoo-portage-dev] " Michael Palimaka
2014-10-25 20:15         ` Zac Medico
2014-10-25 20:26   ` [gentoo-portage-dev] " Michał Górny
2014-10-25 20:32     ` Zac Medico
2014-10-25 20:57       ` Zac Medico
2014-10-26 19:31         ` [gentoo-portage-dev] " Michael Palimaka
2014-10-26 20:05           ` Zac Medico
2014-10-27 13:15             ` Michael Palimaka
2014-10-27 19:33               ` Zac Medico
2014-10-26 15:12 ` [gentoo-portage-dev] [PATCH 1/3] " Michael Palimaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox