Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 220116 - eselect modules need a way to determine their own name
Summary: eselect modules need a way to determine their own name
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: eselect (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2008-05-03 14:01 UTC by Ulrich Müller
Modified: 2009-05-18 20:19 UTC (History)
0 users

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 Ulrich Müller gentoo-dev 2008-05-03 14:01:07 UTC
There is no documented way how eselect modules can determine their own name.

do_action sets ESELECT_MODULE_NAME, but it is undocumented. In other cases where a module is sourced (e.g. "eselect list-modules" or "eselect modules list"), the variable is not set. So something like:
DESCRIPTION="Manage ${ESELECT_MODULE_NAME} symlink"
will not work. (Of course one could extract the name from BASH_SOURCE instead, but it seems to me that it is too fragile for this purpose.)

Suggestion: Either always set the variable and document it, or add a convenience function for the module's name.

I can prepare a patch if you approve this suggestion.
Comment 1 Ulrich Müller gentoo-dev 2009-05-18 20:19:49 UTC
Fixed in eselect-1.1_rc1.