* [gentoo-dev] [PATCH v2] linux-info.eclass: Call ebegin, properly close with eend
@ 2022-04-13 10:05 Thomas Bracht Laumann Jespersen
2022-04-14 23:15 ` Mike
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Bracht Laumann Jespersen @ 2022-04-13 10:05 UTC (permalink / raw
To: gentoo-dev; +Cc: kernel, Thomas Bracht Laumann Jespersen, Sam James
A recent QA check added to portage informs of eend being called without
a preceding call to ebegin.
This warning was emitted during pkg_setup for net-vpn/openvpn, and was
traced back to the check_extra_config() function in linux-info.eclass.
The preference is here to call ebegin (instead of dropping the lone
eend) and in each of the possible exit branches for check_extra_config()
call eend appropriately.
Reported-by: Sam James <sam@gentoo.org>
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
---
v1 -> v2:
* Remove trailing "..." from call to ebegin - ebegin already outputs them
* call "eend 1" in the soft errors case, instead of "eend 0"
eclass/linux-info.eclass | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index 57b1f4c89ae..7b56a47016c 100644
--- a/eclass/linux-info.eclass
+++ b/eclass/linux-info.eclass
@@ -781,7 +781,7 @@ check_extra_config() {
require_configured_kernel
fi
- einfo "Checking for suitable kernel configuration options..."
+ ebegin "Checking for suitable kernel configuration options"
for config in ${CONFIG_CHECK}
do
@@ -857,6 +857,7 @@ check_extra_config() {
done
if [[ ${hard_errors_count} -gt 0 ]]; then
+ eend 1
eerror "Please check to make sure these options are set correctly."
eerror "Failure to do so may cause unexpected problems."
eerror "Once you have satisfied these options, please try merging"
@@ -864,6 +865,7 @@ check_extra_config() {
export LINUX_CONFIG_EXISTS_DONE="${old_LINUX_CONFIG_EXISTS_DONE}"
die "Incorrect kernel configuration options"
elif [[ ${soft_errors_count} -gt 0 ]]; then
+ eend 1
ewarn "Please check to make sure these options are set correctly."
ewarn "Failure to do so may cause unexpected problems."
else
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] [PATCH v2] linux-info.eclass: Call ebegin, properly close with eend
2022-04-13 10:05 [gentoo-dev] [PATCH v2] linux-info.eclass: Call ebegin, properly close with eend Thomas Bracht Laumann Jespersen
@ 2022-04-14 23:15 ` Mike
2022-04-15 10:29 ` Thomas Bracht Laumann Jespersen
0 siblings, 1 reply; 4+ messages in thread
From: Mike @ 2022-04-14 23:15 UTC (permalink / raw
To: gentoo-dev
On 4/13/22 06:05, Thomas Bracht Laumann Jespersen wrote:
> A recent QA check added to portage informs of eend being called without
> a preceding call to ebegin.
>
> This warning was emitted during pkg_setup for net-vpn/openvpn, and was
> traced back to the check_extra_config() function in linux-info.eclass.
>
> The preference is here to call ebegin (instead of dropping the lone
> eend) and in each of the possible exit branches for check_extra_config()
> call eend appropriately.
>
> Reported-by: Sam James <sam@gentoo.org>
> Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
> ---
>
> v1 -> v2:
> * Remove trailing "..." from call to ebegin - ebegin already outputs them
> * call "eend 1" in the soft errors case, instead of "eend 0"
>
> eclass/linux-info.eclass | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
> index 57b1f4c89ae..7b56a47016c 100644
> --- a/eclass/linux-info.eclass
> +++ b/eclass/linux-info.eclass
> @@ -781,7 +781,7 @@ check_extra_config() {
> require_configured_kernel
> fi
>
> - einfo "Checking for suitable kernel configuration options..."
> + ebegin "Checking for suitable kernel configuration options"
>
> for config in ${CONFIG_CHECK}
> do
> @@ -857,6 +857,7 @@ check_extra_config() {
> done
>
> if [[ ${hard_errors_count} -gt 0 ]]; then
> + eend 1
> eerror "Please check to make sure these options are set correctly."
> eerror "Failure to do so may cause unexpected problems."
> eerror "Once you have satisfied these options, please try merging"
> @@ -864,6 +865,7 @@ check_extra_config() {
> export LINUX_CONFIG_EXISTS_DONE="${old_LINUX_CONFIG_EXISTS_DONE}"
> die "Incorrect kernel configuration options"
> elif [[ ${soft_errors_count} -gt 0 ]]; then
> + eend 1
> ewarn "Please check to make sure these options are set correctly."
> ewarn "Failure to do so may cause unexpected problems."
> else
LGTM, I can commit this, after a reasonable amount of time with no further discussion.
Thanks for your contribution.
--
Mike Pagano
Gentoo Developer - Kernel Project
Gentoo Sources - Lead
E-Mail : mpagano@gentoo.org
GnuPG FP : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137
Public Key : http://http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137&op=index
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] [PATCH v2] linux-info.eclass: Call ebegin, properly close with eend
2022-04-14 23:15 ` Mike
@ 2022-04-15 10:29 ` Thomas Bracht Laumann Jespersen
2022-04-15 12:16 ` Mike Pagano
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Bracht Laumann Jespersen @ 2022-04-15 10:29 UTC (permalink / raw
To: gentoo-dev
On 14/04 19:15, Mike wrote:
>
> On 4/13/22 06:05, Thomas Bracht Laumann Jespersen wrote:
> > A recent QA check added to portage informs of eend being called without
> > a preceding call to ebegin.
> >
> > This warning was emitted during pkg_setup for net-vpn/openvpn, and was
> > traced back to the check_extra_config() function in linux-info.eclass.
> >
> > The preference is here to call ebegin (instead of dropping the lone
> > eend) and in each of the possible exit branches for check_extra_config()
> > call eend appropriately.
> >
> > Reported-by: Sam James <sam@gentoo.org>
> > Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
> > ---
> >
> > v1 -> v2:
> > * Remove trailing "..." from call to ebegin - ebegin already outputs them
> > * call "eend 1" in the soft errors case, instead of "eend 0"
> >
> > eclass/linux-info.eclass | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
> > index 57b1f4c89ae..7b56a47016c 100644
> > --- a/eclass/linux-info.eclass
> > +++ b/eclass/linux-info.eclass
> > @@ -781,7 +781,7 @@ check_extra_config() {
> > require_configured_kernel
> > fi
> > - einfo "Checking for suitable kernel configuration options..."
> > + ebegin "Checking for suitable kernel configuration options"
> > for config in ${CONFIG_CHECK}
> > do
> > @@ -857,6 +857,7 @@ check_extra_config() {
> > done
> > if [[ ${hard_errors_count} -gt 0 ]]; then
> > + eend 1
> > eerror "Please check to make sure these options are set correctly."
> > eerror "Failure to do so may cause unexpected problems."
> > eerror "Once you have satisfied these options, please try merging"
> > @@ -864,6 +865,7 @@ check_extra_config() {
> > export LINUX_CONFIG_EXISTS_DONE="${old_LINUX_CONFIG_EXISTS_DONE}"
> > die "Incorrect kernel configuration options"
> > elif [[ ${soft_errors_count} -gt 0 ]]; then
> > + eend 1
> > ewarn "Please check to make sure these options are set correctly."
> > ewarn "Failure to do so may cause unexpected problems."
> > else
>
>
> LGTM, I can commit this, after a reasonable amount of time with no further discussion.
> Thanks for your contribution.
Thanks! It's not perfect, I believe some of preceding lines may call eerror or
ewarn before eend gets called, so there's still room for improvement.
This change makes the QA notice go away though :-)
-- Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] [PATCH v2] linux-info.eclass: Call ebegin, properly close with eend
2022-04-15 10:29 ` Thomas Bracht Laumann Jespersen
@ 2022-04-15 12:16 ` Mike Pagano
0 siblings, 0 replies; 4+ messages in thread
From: Mike Pagano @ 2022-04-15 12:16 UTC (permalink / raw
To: gentoo-dev
On 4/15/22 06:29, Thomas Bracht Laumann Jespersen wrote:
> On 14/04 19:15, Mike wrote:
>>
>> On 4/13/22 06:05, Thomas Bracht Laumann Jespersen wrote:
>>> A recent QA check added to portage informs of eend being called without
>>> a preceding call to ebegin.
>>>
>>> This warning was emitted during pkg_setup for net-vpn/openvpn, and was
>>> traced back to the check_extra_config() function in linux-info.eclass.
>>>
>>> The preference is here to call ebegin (instead of dropping the lone
>>> eend) and in each of the possible exit branches for check_extra_config()
>>> call eend appropriately.
>>>
>>> Reported-by: Sam James <sam@gentoo.org>
>>> Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
>>> ---
>>>
>>> v1 -> v2:
>>> * Remove trailing "..." from call to ebegin - ebegin already outputs them
>>> * call "eend 1" in the soft errors case, instead of "eend 0"
>>>
>>> eclass/linux-info.eclass | 4 +++-
>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
>>> index 57b1f4c89ae..7b56a47016c 100644
>>> --- a/eclass/linux-info.eclass
>>> +++ b/eclass/linux-info.eclass
>>> @@ -781,7 +781,7 @@ check_extra_config() {
>>> require_configured_kernel
>>> fi
>>> - einfo "Checking for suitable kernel configuration options..."
>>> + ebegin "Checking for suitable kernel configuration options"
>>> for config in ${CONFIG_CHECK}
>>> do
>>> @@ -857,6 +857,7 @@ check_extra_config() {
>>> done
>>> if [[ ${hard_errors_count} -gt 0 ]]; then
>>> + eend 1
>>> eerror "Please check to make sure these options are set correctly."
>>> eerror "Failure to do so may cause unexpected problems."
>>> eerror "Once you have satisfied these options, please try merging"
>>> @@ -864,6 +865,7 @@ check_extra_config() {
>>> export LINUX_CONFIG_EXISTS_DONE="${old_LINUX_CONFIG_EXISTS_DONE}"
>>> die "Incorrect kernel configuration options"
>>> elif [[ ${soft_errors_count} -gt 0 ]]; then
>>> + eend 1
>>> ewarn "Please check to make sure these options are set correctly."
>>> ewarn "Failure to do so may cause unexpected problems."
>>> else
>>
>>
>> LGTM, I can commit this, after a reasonable amount of time with no further discussion.
>> Thanks for your contribution.
>
> Thanks! It's not perfect, I believe some of preceding lines may call eerror or
> ewarn before eend gets called, so there's still room for improvement.
>
> This change makes the QA notice go away though :-)
>
> -- Thomas
>
Committed
--
Mike Pagano
Gentoo Developer - Kernel Project
Gentoo Sources - Lead
E-Mail : mpagano@gentoo.org
GnuPG FP : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137
Public Key : http://http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137&op=index
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-15 12:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-13 10:05 [gentoo-dev] [PATCH v2] linux-info.eclass: Call ebegin, properly close with eend Thomas Bracht Laumann Jespersen
2022-04-14 23:15 ` Mike
2022-04-15 10:29 ` Thomas Bracht Laumann Jespersen
2022-04-15 12:16 ` Mike Pagano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox