Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130885 - net-irc/epic4 ignores "/usr/share/epic/script/local" if "~/.ircrc" exists
Summary: net-irc/epic4 ignores "/usr/share/epic/script/local" if "~/.ircrc" exists
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial
Assignee: Packages in net-irc
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-22 13:35 UTC by John R. Graham
Modified: 2006-10-18 14:21 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 John R. Graham gentoo-dev 2006-04-22 13:35:17 UTC
The Gentoo ebuild for Epic4 provides a pretty nifty and comprehensive startup script in "/usr/share/epic/script/local".  What I discovered is that, probably because it establishes so many aliases and "on event" handlers, the author had deemed it unsafe to execute the file on top of user's "~/.ircrc" or "~/.epicrc" scripts, probably because any extensive scripting the user might put in those files would have a measurable likelihood of breaking the complex "local" script.

The first line of "/usr/share/epic/script/local" is:
    if (fexist(~/.ircrc) == -1 && fexist(~/.epicrc == -1)) {
and the last line is:
    }
which handily prevents the execution of the body of "local" if either of those files exist.

All I wanted to do in my "~/.ircrc" was to set my nickname and then /msg NickServ on FreeNote with my password to enable my use of my (registered) nickname.  But when I created this miniscule file, the nice "white on blue" status line in Epic turned to "black on light gray".  Now I know that this is going to sound silly but it took me over two hours of digging around (go ahead and laugh) to figure that out.

Now, my opinion is that this behavior is pretty nonintuitive, but, I'm ignorant and the author may be exactly right.  Assuming he does have a point, I would like to suggest that a little additional pearl of wisdom be placed into the pkg_postinst() section of the ebuild, such as the following:

    einfo "This provided local startup script adds a number of nifty"
    einfo "features to Epic including tab completion, a comprehensive set"
    einfo "of aliases, and channel-by-channel logging.  To prevent"
    einfo "unintentional conflicts with your own scripting, if either the"
    einfo "~/.ircrc or ~/.epicrc script files exist, then the local script"
    einfo "is *not* run.  If you like the script but want to make careful"
    einfo "additions (such as selecting your usual servers or setting your"
    einfo "nickname), simply copy /usr/share/epic/script/local to ~/.ircrc"
    einfo "and then add your additions to the copy."

Alternatively, we could delete just the first and last lines of  /usr/share/epic/script/local and call it a day.

What do you all think?

- John
Comment 1 Markus Ullmann (RETIRED) gentoo-dev 2006-10-18 14:21:31 UTC
Added your note to latest ebuilds, thanks for reporting as it seemed it took you quite some time to track it ;)