Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280191 - eselect fails with invalid identifier error (ec_do_list-options, ec_do_list-modules)
Summary: eselect fails with invalid identifier error (ec_do_list-options, ec_do_list-m...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: eselect (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2009-08-03 17:12 UTC by Frank Peters
Modified: 2009-11-04 22:48 UTC (History)
0 users

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


Attachments
Output of emerge --info (emerge.info,2.62 KB, text/plain)
2009-08-03 17:13 UTC, Frank Peters
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Peters 2009-08-03 17:12:40 UTC
Any attempt to execute eselect will produce the following error:

`ec_do_list-options': not a valid identifier
`ec_do_list-modules': not a valid identifier

Evidently, the two function names do not follow bash convention by including hyphens.

To fix this problem, these two function names should be rewritten to use underscores rather than hyphens:

ec_do_list_options
ec_do_list_modules

When this is done, the problem disappears and eselect runs normally.

Important Note: This particular eselect failure does not occur on all systems. In most cases, perhaps, the problem does not occur.  However, the use of hyphens in bash variables and function names is poor practice and rewriting these two names with underscores will insure that eselect will not fail anywhere.


Reproducible: Always

Steps to Reproduce:
1. eselect <any options>
2. 
3.
Comment 1 Frank Peters 2009-08-03 17:13:28 UTC
Created attachment 200032 [details]
Output of emerge --info
Comment 2 Frank Peters 2009-08-03 20:00:49 UTC
The issue is resolved, unless others want to comment.  See #280174
Comment 3 James Earl Spahlinger 2009-08-03 21:20:40 UTC
Thanks for reporting, I'm going to go ahead and mark this as a duplicate of your other bug because the same resolution seems to have solved both of them. To be sure, please do comment on the other bug and mark it as fixed if the issue is fixed for you.

*** This bug has been marked as a duplicate of bug 280174 ***
Comment 4 Ulrich Müller gentoo-dev 2009-10-11 10:45:41 UTC
Not a dupe, but a valid issue. Reopening.
Comment 5 Ulrich Müller gentoo-dev 2009-10-11 11:07:47 UTC
eselect translates actions (like "eselect list-modules") directly into function names, so it's not entirely trivial to change the name.

I've committed a fix to SVN (r692,r693). As a side effect, eselect will accept action names like "list_*" in addition to their hyphen counterparts, but I think that's acceptable.
Comment 6 Ulrich Müller gentoo-dev 2009-11-04 22:48:44 UTC
Fixed in eselect-1.2.5.
Thanks for reporting.