Gentoo Archives: gentoo-portage-dev

From: Michael Palimaka <kensington@g.o>
To: gentoo-portage-dev@l.g.o, "Michał Górny" <mgorny@g.o>, zmedico@g.o
Subject: [gentoo-portage-dev] Re: [PATCH 1/3] bin/misc-functions.sh: Introduce eqalog and eqawarnlog functions.
Date: Sun, 26 Oct 2014 19:31:53
Message-Id: 544D4C27.4010108@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH 1/3] bin/misc-functions.sh: Introduce eqalog and eqawarnlog functions. by Zac Medico
1 On 26/10/14 07:57, Zac Medico wrote:
2 > On 10/25/2014 01:32 PM, Zac Medico wrote:
3 >> On 10/25/2014 01:26 PM, Micha³ Górny wrote:
4 >>> Dnia 2014-10-25, o godz. 12:53:15
5 >>> Zac Medico <zmedico@g.o> napisa³(a):
6 >>>
7 >>>> On 10/25/2014 09:15 AM, Michael Palimaka wrote:
8 >>>>> +eqalog() {
9 >>>>> + local tag=$1 x
10 >>>>> + shift
11 >>>>> + for x in "$@" ; do
12 >>>>> + echo "${tag}" "${x}" >> "${T}"/qa.log
13 >>>>> + done
14 >>>>> +}
15 >>>>> +
16 >>>>> +eqawarnlog() {
17 >>>>> + eqalog "$@"
18 >>>>> + shift
19 >>>>> + for x in "$@" ; do
20 >>>>> + eqawarn " $x"
21 >>>>> + done
22 >>>>> +}
23 >>>>> +
24 >>>>
25 >>>> These functions are internals, so they need to be prefixed with __ like
26 >>>> __eqalog and __eqawarnlog.
27 >>>
28 >>> eqawarnlog shouldn't be internal since we support adding QA checks
29 >>> in repositories. In fact, I am planning to move some Gentoo-specific QA
30 >>> checks out of portage code.
31 >>
32 >> It's a PMS thing. If it's not in PMS and the package manager provides
33 >> it, it's supposed to be prefixed.
34 >
35 > Note that we could have unprefixed aliases inside misc-functions.sh,
36 > since misc-functions.sh env is never saved.
37 >
38
39 I've sent updated patches based on the last feedback. Should I send a
40 new one with the aliases, and if so, should the portage checks use the
41 alias or real function?
42
43 Just let me know what to change. I have no opinion what goes where. :-)

Replies