From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 041A415808B for ; Fri, 15 Apr 2022 10:30:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CAA42E08FF; Fri, 15 Apr 2022 10:29:50 +0000 (UTC) Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AAAF4E0845 for ; Fri, 15 Apr 2022 10:29:48 +0000 (UTC) Date: Fri, 15 Apr 2022 12:29:44 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=laumann.xyz; s=key1; t=1650018585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qXL16xH+/s+zgOvM+jcKIK45JaXgEGntn726C6LWR6E=; b=A21BMcaV9pLEMY3IkRYlOY3crfOSggxCJ8rq+C4+rmZ4KlhEFRJngR/WSacgeMPDG/ZbT7 w/nPloieSDJibYkR8xtaH3TCjy1CHl/Y1X2YkV4xPgJCfP3lWUf3ZBDFsyVreRphsGNE4q ddEZMXeuwWlbJNcO4Iaa5Q94FUcLBu8Xn8ZiScIIItbhzvSN1Iy9r51gAEPRXcjSnhWR4B j5iakW0qJ/9ScdDqxrqHYZKGCT5rSoUf/g23PZVqbB0w9j137CitPdXinLNBkk7zFcJVuu tQRAuiTAJ4eSTQCQeEET1Iz6ymld70eAXNd+dvc8glX1vZ18qMS7bQ9wX+bS3w== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Thomas Bracht Laumann Jespersen To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH v2] linux-info.eclass: Call ebegin, properly close with eend Message-ID: <20220415102944.z4nirsxvznv3w7c6@sofaking> Mail-Followup-To: gentoo-dev@lists.gentoo.org References: <20220413100535.12985-1-t@laumann.xyz> <8e1bc0fe-154f-e6c2-9221-8d81ab709bd3@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <8e1bc0fe-154f-e6c2-9221-8d81ab709bd3@gentoo.org> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: laumann.xyz X-Archives-Salt: 4b317363-26f1-411e-b85a-c52f0ed893e4 X-Archives-Hash: 64c8a4a5d8e5262b2ea1e64a15afff89 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 > > Signed-off-by: Thomas Bracht Laumann Jespersen > > --- > > > > 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