Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 835824 - Add QA warning for 'eend' without 'ebegin'
Summary: Add QA warning for 'eend' without 'ebegin'
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 837899
Blocks:
  Show dependency tree
 
Reported: 2022-03-23 02:54 UTC by Sam James
Modified: 2022-07-10 16:32 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-23 02:54:51 UTC
Complementary bug to bug 835823.

'eend' without 'ebegin' doesn't make much sense and will lead to confusing output in the build log.

We should have an eqawarn for such instances.

Relevant snippet from #gentoo-qa:
"""
[14:32:38]  <@sam_> ulm: two questions about ebegin/eend
[14:32:45]  <@sam_> ulm: is it valid to call eend without ebegin?
[14:32:51]  <@sam_> ulm: ... and the opposite (ebegin without eend)? :)
[14:33:01]  <@sam_> ulm: i've read pms already obviously but i just want to double check
[14:33:24]  <@sam_> we have some cases in tree of e.g. einfo/eend!
[14:53:06]  <@ulm> eend Indicates that the process begun with an ebegin message has completed.
[14:53:29]  <@ulm> sam_: obviously it is intended to be called after ebegin
[14:53:59]  <@ulm> but I think it won't error out if it isn't
[14:55:35]  <@ulm> I'd rather not make that incorrect usage an error
[14:56:15]  <@ulm> only thing that can happen is bad formatting of the output, which isn't a good reason to abort the build process
[14:56:41]  <@ulm> sam_: maybe portage should output a qa warning
[16:12:25]  <@sam_> ulm: what about the opposite?
[16:12:30]  <@sam_> same? just add a warning?
[16:33:38]  <@ulm> yeah, warning too
"""
Comment 1 Larry the Git Cow gentoo-dev 2022-04-12 02:00:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=23c4a45827fccebb969d5130ccc234ed3d1a9b35

commit 23c4a45827fccebb969d5130ccc234ed3d1a9b35
Author:     Thomas Bracht Laumann Jespersen <t@laumann.xyz>
AuthorDate: 2022-04-11 13:46:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-04-12 01:59:50 +0000

    eend: Output QA warning if ebegin has not been called
    
    The assumption here is that ebegin-eend aren't nested.
    
    Closes: https://bugs.gentoo.org/835824
    Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
    Closes: https://github.com/gentoo/portage/pull/807
    Signed-off-by: Sam James <sam@gentoo.org>

 bin/isolated-functions.sh | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 2 Larry the Git Cow gentoo-dev 2022-04-15 08:37:00 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb044a3dd58f5d6ac0fa66dfe07daf3c6773480e

commit bb044a3dd58f5d6ac0fa66dfe07daf3c6773480e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-04-15 08:35:57 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-04-15 08:36:54 +0000

    sys-apps/portage: backport new QA checks; /run warning removal
    
    portage.git is currently undergoing a fair bit of refactoring
    and other non-trivial changes, so let's backport some useful bits.
    
    - Backport QA checks (eend w/o ebegin, ebegin w/o eend, /var/tmp install dir)
    - Drop obsolete /run-not-mounted warning
    
    Bug: https://bugs.gentoo.org/835824
    Bug: https://bugs.gentoo.org/835823
    Bug: https://bugs.gentoo.org/832853
    Bug: https://bugs.gentoo.org/493154
    Bug: https://bugs.gentoo.org/837536
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/files/3.0.30-qa-checks.patch      | 137 ++++++++++
 .../portage/files/3.0.30-revert-run-warn.patch     |  64 +++++
 sys-apps/portage/portage-3.0.30-r2.ebuild          | 276 +++++++++++++++++++++
 3 files changed, 477 insertions(+)