Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 390765

Summary: add a EBUILD_PHASE_FUNC variable that contains the exact func name
Product: Gentoo Hosted Projects Reporter: SpanKY <vapier>
Component: PMS/EAPIAssignee: PMS/EAPI <pms>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard: in-eapi-5
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 174380    

Description SpanKY gentoo-dev 2011-11-16 23:14:21 UTC
EBUILD_PHASE being related to, but not exactly the same as, the active function name is annoying.  i'd like to be able to dynamically script/expand func names based on the active func which means i need a variable that contains it.

otherwise i have to add a stupid func like:
ebuild_phase_to_func() {
    case ${EBUILD_PHASE} in
    clean) echo pkg_clean;;
    setup) echo pkg_setup;;
    ...
    esac
}

i'd suggest EBUILD_PHASE_FUNC, but i don't particularly care what the name is
Comment 2 Ulrich Müller gentoo-dev 2012-09-23 06:37:44 UTC
(In reply to comment #1)
> PMS patch:
> 
> http://git.overlays.gentoo.org/gitweb/?p=proj/pms.git;a=commit;
> h=76ddca560da42fd968c53a2a0c38a6ac840a7ad4

Commit in master:
http://git.overlays.gentoo.org/gitweb/?p=proj/pms.git;a=commit;h=293018c0bc17aff55d231e897a8967aacdef212b