Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 846503 - app-doc/eclass-manpages: list exported phases
Summary: app-doc/eclass-manpages: list exported phases
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-19 21:56 UTC by Sam James
Modified: 2023-10-23 17:35 UTC (History)
5 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-05-19 21:56:16 UTC
I think we should always list exported phases somewhere on the generated eclassdoc page for an eclass.

A section just for a list of phases something provides is useful, even if the specific phases can or should be documented themselves as normal functions.

This has bit me quite a few times when helping out new folks (and I often forget they're missing!)

(See also: bug 773271 because we've said we'd ideally just add new such things into pkgcore instead.)
Comment 1 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2022-05-21 20:27:20 UTC
This shouldn't be too hard to add (found out where this is implemented in pkgcore).

What I need is an example of how you want it to look, preferably as rst format. Like one eclass, and how and where the section should be. Then I can add it :)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-22 19:09:28 UTC
(In reply to Arthur Zamarin from comment #1)
> This shouldn't be too hard to add (found out where this is implemented in
> pkgcore).
> 
> What I need is an example of how you want it to look, preferably as rst
> format. Like one eclass, and how and where the section should be. Then I can
> add it :)

Thanks!

Note that the issue of inherited exported phases (e.g. foo.eclass inheriting bar.eclass and bar.eclass exports some phases too) did come up in #gentoo-dev-help, but I'm inclined to say to keep things simple and easier to understand, we ignore this, and just parse literally the directly exported phases by an individual eclass.

I'm not super familiar with rst, but I'd just think something like:
"""
Exported phases
===============

* src_prepare
* src_configure
* src_compile

"""

Or do you need something more that I'm not understanding?
Comment 3 Larry the Git Cow gentoo-dev 2023-10-23 17:35:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=d12bea98c17f10f039ebb2331353c6ea794674cf

commit d12bea98c17f10f039ebb2331353c6ea794674cf
Author:     Arthur Zamarin <arthurzam@gentoo.org>
AuthorDate: 2023-10-23 17:03:28 +0000
Commit:     Arthur Zamarin <arthurzam@gentoo.org>
CommitDate: 2023-10-23 17:03:28 +0000

    eclassdoc: output exported phases
    
    Closes: https://bugs.gentoo.org/846503
    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>

 src/pkgcore/ebuild/eclass.py  | 11 +++++++++++
 src/pkgcore/scripts/pmaint.py |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)